Detect new disk on KVM without stopping the VM ?

jmjosebest

Renowned Member
Jan 16, 2009
192
40
93
Hi,

I have added a new disk unit on a KVM VM.
It's possible to force a detect in CentOS without stop/start the VM?

Thanks.
 
Hi,

I have added a new disk unit on a KVM VM.
It's possible to force a detect in CentOS without stop/start the VM?

Thanks.

you need to add

"hotplug:1" in your vm config file, before add the disk.

(you can put the disk unused, then add the hotplug:1, then re-add the disk).

This works with virtio and iscsi disks. (but not ide)

also you need a recent kernel (don't know which centos version you use), and you need to have 2 modules loaded in your guest:

- acpiphp
- pci_hotplug