After reading wiki libvirt I started virt-install to install Ubuntu(14.04,16.04,18.04,20.04) by a serial console installation,I installed ubuntu14.04-server and connected successfully,but something went wrong when I try to install Ubuntu18.04 and Ubuntu20.04.
I have tried ubuntu-18.04.6-server-amd64.iso,ubuntu-18.04-server-amd64.iso,ubuntu-20.04.1-legacy-server-amd64.iso.They both install successfully(the message says Installation Complete) but don't link after reboot(there‘s nothing to show but the hint).I have waited for an hour but nothing changed.
Connected to domain pzwtest
Escape character is ^]
I have tried to install ubuntu14.04,and it worked succefully,after the installation ,I only waited for few seconds and the login prompts displayed in the tty.
And the installation commands are as follows(Every use the same commands because their initrd and vmlinuz paths are same.The image's capacity is 25G)
virt-install --virt-type kvm --name pzwtest --ram 8192 --vcpus 2 \
--location=/home/ridx/kvm/ubuntu-18.04.6-server-amd64.iso,initrd=install/initrd.gz,kernel=install/vmlinuz \
--disk /home/ridx/pzw/kvm/pzwtest.qcow2,format=qcow2 \
--network network=default \
--graphics=none --console=pty,target_type=serial\
--extra-args="console=tty0 console=ttyS0" \
--os-type=linux --os-variant=generic\
--debug
The Ubuntu16.04 and Ubuntu18.04 and so on needs open the console access,when I use vnc listen to connect with my VM,then use commands as follows.It can be connected by console(virsh console name)