Update 0.KVM.md

This commit is contained in:
Ste Vaidis 2024-08-20 09:09:05 +03:00
parent 8c0b418a7f
commit f9d58dfe00

View File

@ -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 ```bash
qemu-img convert -f qcow2 -O qcow2 -o preallocation=off old.qcow2 new.qcow2 qemu-img convert -f qcow2 -O qcow2 -o preallocation=off old.qcow2 new.qcow2