vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
791 stars 266 forks source link

Add an option to allow Linux Live ISOs to boot on Windows VMs #7172

Open tescande opened 1 year ago

tescande commented 1 year ago

Problem It is not possible to access disk drives on a VM created with a Windows template when booted on a Linux OS. Some users are using gparted to tweak their Windows partitioning and thus need to live-boot the VM on a Linux system (gparted live iso for instance).

The cause is the value of the xen-platform PCI device ID which is set to 0x0002 for Windows VMs and the Linux driver only handles this device with a device ID value of 0x0001. This results in the driver not being probed and disk drives not visible.

Workaround It is possible to temporarily fix the issue by modifying the device ID in the VM parameters before it is started using xe vm-param-set.

Possible solution It could be interesting in XO to be able to set the device ID to a Linux friendly value for the next VM boot, and restore it afterward. It is important to restore it to its initial value since Windows Update relies on this device ID to update the device driver.

Jarli01 commented 9 months ago

I agree booting from "USB" really an ISO of an existing VM would be highly beneficial. What've I've resorted too in these cases if needed is to just build a linux VM and attach the Windows VM disk to the linux system.

Once attached to that linux system, use whatever linux tools are needed (gparted, chntpw etc) and then shutdown this linux VM. Detach the disk from the Linux VM and reboot the Windows one.

Problem solved.