I found myself needing to add a physical disk thats installed on a KVM host on to one of its guests. Although this is not always advised, it can be helpful in data recovery scenarios.
Find which disk you want to add by using ‘fdisk -l’, looking at the listed partitions.
Second, you can make sure its not mounted with the ‘mount’ command.
third, use virsh to edit the VM ‘virsh edit VMNAME’.
fourth add a disk config:
<disk type=’block’ device=’disk’>
<driver name=’qemu’ type=’raw’/>
<target dev=’vdb’ bus=’virtio’/>
last, define the new config in the VM:
virsh define /etc/libvirt/qemu/VMNAME.xml
Arch Linux is a sleek and nimble, super lightweight Linux distribution that is wonderfully fast and constantly evolving. We’ll Install it.