Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

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

share|improve this answer
    
That was it. Thanks! –  larsks Dec 21 '12 at 21:37

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.