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?


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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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