From f9d58dfe00463baabf3c3e7d4419c75147bc951f Mon Sep 17 00:00:00 2001 From: Ste Vaidis Date: Tue, 20 Aug 2024 09:09:05 +0300 Subject: [PATCH] Update 0.KVM.md --- 0.KVM.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/0.KVM.md b/0.KVM.md index 7834dd9..3a3097c 100644 --- a/0.KVM.md +++ b/0.KVM.md @@ -1,6 +1,33 @@ +# Create +```bash +sudo virt-install \ +--name Rocky_Linux_Dev \ +--ram 4096 \ +--vcpus 4 \ +--os-type linux \ +--os-variant rhel9-unknown \ +--import \ +--disk path=/mnt/KVM/linux.qcow2,format=qcow2 \ +--network bridge=virbr0,model=virtio \ +--graphics vnc,listen=0.0.0.0 +``` -Convert the existing disk in a new dynamic size disk +# Permissions + +```bash +sudo chown -R libvirt-qemu:kvm /media/KVM +sudo chmod 750 /media/KVM +sudo chmod 640 /media/KVM/linux.qcow2 +``` + +Options like noexec, nosuid, or nodev that might be restricting access. + +```bash +mount | grep /media/ste/282d1750-fabe-4bb6-8c14-bba01e67a260 +``` + +# Convert disk in a new dynamic size disk ```bash qemu-img convert -f qcow2 -O qcow2 -o preallocation=off old.qcow2 new.qcow2