Attaching a Disk to KVM Guest on Command Line

Again, just a quick note to remind myself how to attach a disk to a VM guest from the command line. The following steps is based on these assumptions: A spare disk: an LVM volume name db2_data on data volume group The name/domain of the VM is db2 List the name of the VM guest and available logical volume. [root@mathvm5 ~]# virsh list | grep db2 20 db2 running [root@mathvm5 ~]# lvs | grep db2 db2 vm -wi-ao---- 80....

December 2, 2020 · 1 min · 170 words · kenno