$ qemu-img create -f qcow2 images/template.qcow2 80G Formatting 'images/template.qcow2', fmt=qcow2 size=85899345920 cluster_size=65536 lazy_refcounts=off refcount_bits=16
virt-install
とローカル VNC クライアントを用いてインストール$ virt-install \ > --name=template \ > --disk=images/template.qcow2,bus=virtio \ > --vcpus=2 --ram=2048 \ > --graphics vnc,password=*******,listen=0.0.0.0,keymap=ja \ > --cdrom iso/ubuntu-20.04.2-live-server-amd64.iso WARNING Graphics requested but DISPLAY is not set. Not running virt-viewer. WARNING No console to launch for the guest, defaulting to --wait -1 Starting install... Domain installation still in progress. Waiting for installation to complete.
5900 + `virsh vncdisplay kvmguest3`
なのでkvmhost:5902
にアクセスする。kvmhost:~$ virsh list --all Id Name State --------------------------- 6 kvmguest1 running 7 kvmguest2 running 9 kvmguest3 running - kvmguest4 shut off - kvmguest5 shut off - kvmguest6 shut off kvmhost:~$ virsh vncdisplay kvmguest3 :2
$ sudo apt update $ sudo apt upgrade $
Domain has shutdown. Continuing. Domain creation completed. Restarting guest. $
osinfo-query' not found, but can be installed with: sudo apt install libosinfo-bin kimi@sstw:~$ sudo apt install libosinfo-bin
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8" GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8" GRUB_TERMINAL="console serial"
$ sudo update-grub
$ virsh list Id Name State -------------------------- 17 template running kimi@sstw:~Connected to domain template Escape character is ^] template login:
$ virsh list Id Name State -------------------------- 17 template running kimi@sstw:~Connected to domain template Escape character is ^] template login: