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` :::info [QEMU 網路設定 – 橋接與NAT](https://moon-half.info/p/4151) ::: Set up qemu/kvm, virt-manager === ```bash # 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 ``` :::info [libvert: qemu/kvm ](https://transang.me/install-kvm-on-arch-linux/) [win7 GPU passthrough](https://www.youtube.com/watch?v=mnVbbD7G0Bo) [qemu documentation](https://qemu-project.gitlab.io/qemu/system/invocation.html#hxtool-2) [Manjaro/Arch Linux 如何安裝QEMU-KVM與Virt Manager虛擬機管理系統](https://www.youtube.com/watch?v=bbljnDcnbnA) [Install KVM, QEMU and Virt Manager on Arch Linux / Manjaro](https://computingforgeeks.com/install-kvm-qemu-virt-manager-arch-manjar/) ::: ###### tags: `QEMU`