Commit 1d5ea0e7 by Avi Junowicz

How to add a extra disk to running VM

parent 8a3fb7aa
Showing with 29 additions and 0 deletions
main server
cd /var/lib/libvirt/images/
qemu-img create -f raw external.img 100G
virsh attach-disk test --source /var/lib/libvirt/images/external.img --target sdb --persistent
On VM
reboot
fdisk -l
cfdisk /dev/sdc (based on the name in fdisk -l)
mkfs.ext4 /dev/sdc
mkdir /mcz
mount /dev/sdc /mcz
add in /etc/fstab
/dev/vda /mcz ext4 defaults 0 0
cd mcz
mv /opt/mcz/user_images .
ln -s /mcz/user_images/ /opt/mcz/user_images
ln -s /mcz/logs/ logs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment