Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

Your Answer


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.