mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
pygrub and qemuu need to be able to access a VM's disks locally in order to be able to pull out the kernel and provide emulated disk access, respectively. This can be done either by accessing the local disk directly, or by plugging the target disk into dom0 to allow access. Unfortunately, while the plugging machinery works for pygrub, it does not yet work for qemuu; this means that at the moment, disks with hotplug scripts or disks with non-dom0 backends cannot be provided as emulated devices to HVM domains. Fortunately, disks using hotplug scripts created in dom0 do create a block device as part of set-up, which can be accessed locally; and if they use block-common.sh:write_dev, this path will be written to physical-device-path. Modify libxl__device_disk_setdefault() to be able to fish this path out of xenstore and pass it to the caller. Unfortunately, at the time pygrub runs, the devices have not yet been set up. Rather than try to stash the domid somewhere to pass, we just pass INVALID_DOMID. This allows qemuu to emulate block devices created with custom hotplug scripts. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Tested-by: George Dunlap <george.dunlap@citrix.com>