LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "xs_rm failed for %s", dom_path);
xs_rm(ctx->xsh, XBT_NULL, libxl__xs_libxl_path(gc, domid));
- xs_rm(ctx->xsh, XBT_NULL, libxl__sprintf(gc,
- "/local/domain/0/device-model/%d", domid));
xs_rm(ctx->xsh, XBT_NULL, libxl__sprintf(gc,
"/local/domain/%d/hvmloader", domid));
int libxl__destroy_device_model(libxl__gc *gc, uint32_t domid)
{
+ char *path = libxl__device_model_xs_path(gc, LIBXL_TOOLSTACK_DOMID,
+ domid, "");
+ if (!xs_rm(CTX->xsh, XBT_NULL, path))
+ LOG(ERROR, "xs_rm failed for %s", path);
+ /* We should try to destroy the device model anyway. */
return kill_device_model(gc,
GCSPRINTF("/local/domain/%d/image/device-model-pid", domid));
}