Tag Archives: hotplug

Adding a disk to the virtual machine on the fly

It is possible to add a disk to your virtual machine, and get it working without restarting the guest. You just have to rescan the PCI bus, to detect the new controller, with:

echo 1 > /sys/bus/pci/rescan

After the above command, the new controller should be visible and the guest should see the new disk(s). PCI hotplug is also available, but you have to load some kernel modules to make it work.

I did not test it, but it should work if you load acpiphp and pci_hotplug (according to Daniel’s post).