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

Why on kvm guest there is not file /sys/block/vdX/device/delete? maybe is like that because i can remove the drive from physical host?

I know i can attach and detach virtual disk to kvm guest using virtio driver disk in this following way, without reboot the vm

virsh attach-disk 3 /home/user01/vmdisk/LunMirror.img vde
virsh detach-disk 3 vde

How can i remove the virtual disk from the kvm guest?

share|improve this question
add comment

2 Answers

To remove a disk from a guest, you issue a detach command on the host. The guest doesn't control which hardware it gets, the admin of the host does.

share|improve this answer
add comment

You do not need to do anything on the guest's side to hot unplug a disk. After running detach on the host it should disappear in the guest. If this does not work, make sure you have the acpiphp and pci_hotplug kernel modules loaded.

share|improve this answer
add comment

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.