2024-01-09 16:27:16 +03:00
|
|
|
# QEMU
|
|
|
|
|
|
|
|
## Install libs.
|
|
|
|
|
|
|
|
~~~
|
2024-01-19 09:52:59 +03:00
|
|
|
sudo pacman -S qemu-full virt-manager libvirt dnsmasq dmidecode
|
2024-01-09 16:27:16 +03:00
|
|
|
~~~
|
|
|
|
|
|
|
|
## Configure libvirt.
|
|
|
|
~~~
|
|
|
|
|
2024-01-19 09:52:59 +03:00
|
|
|
virsh -c qemu:///system net-autostart default
|
|
|
|
|
|
|
|
# or virsh net-start default
|
2024-01-09 16:27:16 +03:00
|
|
|
~~~
|
|
|
|
|
|
|
|
## 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
|
|
|
|
~~~
|