KVM acceleration is for Linux machines
HVF acceleration is for MacOS Hypervisor.Framework
qemu-img options explained
-f
specify disk format
VDI/HDD bla bla VirtualBox and VMWare formats
qcow2, qed, qcow - QEMU specific formats qcow2 is the latest and greatest
(the others are deprecated)
qemu-system-x86_64 explained
-smp
number of processors
-cdrom
iso image to boot from
-hda
disk image to boot from
-m
amount of RAM
-vga
type of virtual graphic card
-machine
what kind of virtual machine
q35
newer virtual chipset
accel
virtualization acceleration support
KVM for linux/windows(?) host OS
HVF for MacOS Hypervisor.Framework
-device
adds a device driver
types of devices
controller/bridge/hub
USB
storage
network
input
display
sound
misc/uncategorised
CPU
watchdog
sample
e1000,netdev=net0
Intel Gigabit Ethernet with ID net0
-netdev
configure network backend with ID 'str'
user,id=net0,hostfwd=tcp::5555-:22
id
identity of the network backend
hostfwd
has format hostip:hostport-guestip:guestport
hence
tcp : :555 - :22
e1000 options:
acpi-index=< uint32> - (default: 0)
addr=< int32> - Slot and optional function number, example: 06.0 or 06 (default: -1)
autonegotiation=< bool> - on/off (default: true)
bootindex=< int32>
extra_mac_registers=< bool> - on/off (default: true)
failover_pair_id=< str>
init-vet=< bool> - on/off (default: true)
mac=< str> - Ethernet 6-byte MAC Address, example: 52:54:00:12:34:56
migrate_tso_props=< bool> - on/off (default: true)
mitigation=< bool> - on/off (default: true)
multifunction=< bool> - on/off (default: false)
netdev=< str> - ID of a netdev to use as a backend
rombar=< uint32> - (default: 1)
romfile=< str>
romsize=< uint32> - (default: 4294967295)
x-pcie-extcap-init=< bool> - on/off (default: true)
x-pcie-lnksta-dllla=< bool> - on/off (default: true)
Creating a new virtual disk
qemu-img create -f qcow2 disk.qcow 10G
Booting up with the ISO disk inserted
qemu-system-x86_64
-hda disk.qcow
-cdrom ubuntu_qemu_mini.iso
-smp 2
-machine type=q35,accel=hvf
-m 4G
-vga virtio
qemu-system-x86_64
-hda disk.qcow
-smp 2
-machine type=q35,accel=hvf
-m 4G
-vga std
qemu-system-x86_64
-hda disk.qcow
-smp 2
-machine type=q35,accel=hvf
-m 4G
-vga std
-device e1000,netdev=net0
-netdev user,id=net0,hostfwd=tcp::5555-:22