2

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?

2 Answers 2

2

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.

2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .