I can successfully attach disks to a running KVM instance using virsh attach-disk...

virsh attach-disk node-1 /dev/vg_lunsr/lun1  vdb
Disk attached successfully

...but these new devices aren't seen by the guest without a reboot, which almost defeats the purpose of dynamic attachment. If these were SCSI devices I would use e.g. /sys/class/scsi_host/host0/scan to request the SCSI drivers to scan for new devices. Is there an equivalent capability for the virtio block driver?


Yes, it mostly depends on what distro is running inside the guest. On Debian/Ubuntu, you certainly want to load this kernel module:

modprobe acpiphp

and then try to hot plug your devices. It will appear without guest reboot. You can find more information about hot plugging in libvirt here


This most likely depends on your guests kernel/KVM/udev version. Just tried it with centos 6.3 and as soon as i added the disk. Device /dev/vdb was available on the running guest.

Your Answer

