cheat-sheets/qemu.md
2024-01-19 09:52:59 +03:00

627 B

QEMU

Install libs.

sudo pacman -S qemu-full virt-manager libvirt dnsmasq dmidecode

Configure libvirt.


virsh -c qemu:///system net-autostart default

# or virsh net-start default

Create virtual disk.


qemu-img create -f qcow2 /path/virtual/disk.qcow 100G

Install img.


qemu-system-x86_64 -hda /path/virtual/disk.qcow \
  -boot d -cdrom /path/file.iso \
  -enable-kvm \
  -m 4096 \
  -smp 4

  # -nographic \
  # -virtfs local,path=/path/my/folder,mount_tag=host0,security_model=mapped,id=host0

Run virtual.


qemu-system-x86_64 -hda /path/virtual/disk.qcow -m 2048