Try   HackMD

set up qemu_x86_64

  1. Create qcow2
    $ qemu-img create -f qcow2 Image.img 10G
  2. Installing
    $ qemu-system-x86_64 -cpu host -accel kvm -m 4G -hda Image.img -cdrom CD.iso
  3. Run with window
    $ qemu-system-x86_64 -cpu host -accel kvm -m 4G -hda Image.img
  4. Run headless(after u set up ssh you can do so)
    $ qemu-system-x86_64 -cpu host -accel kvm -m 4G -hda Image.img -nic user,hostfwd=tcp:127.0.0.1:2222-:22 -nographic &
  5. connect with ssh
    $ ssh -p 2222 user@localhost

Set up qemu/kvm, virt-manager

# check virtualization is avaliable
$ lscpu
Virtualization features:
Virtualization:        VT-x

# check kvm is enable in kernl
$ zgrep CONFIG_KVM /proc/config.gz

# install needed packages
$ pacman -S archlinux-keyring
$ pacman -S qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat dmidecode
$ pacman -S ebtables iptables
$ pacman -S libguestfs

# enable user account to use kvm
# uncomment following two lines
sudo vim /etc/libvirt/libvirtd.conf
unix_sock_group = "libvirt"
unix_sock_rw_perms = "0770"

# add account to libvert group
$ newgrp libvirt
$ sudo usermod -a -G libvirt $(whoami)

# start services
$ sudo systemctl enable libvirtd.service
$ sudo systemctl start libvirtd.service

# Virt logger (Optional)
$ sudo systemctl start virtlogd.service

# Enable Nested Virtualization (Optional)
### Intel Processor ###
sudo modprobe -r kvm_intel
sudo modprobe kvm_intel nested=1

### To make this configuration persistent,run:
echo "options kvm-intel nested=1" | sudo tee /etc/modprobe.d/kvm-intel.conf

### Confirm that Nested Virtualization is set to Yes:
### Intel Processor ###
$ systool -m kvm_intel -v | grep nested
    nested              = "Y"
    nested_early_check  = "N"
$ cat /sys/module/kvm_intel/parameters/nested 
Y
tags: QEMU