After reading wiki libvirt I started virt-install
to install VM off the Debian10 netinstall ISO image:
% sudo virt-install --debug --connect qemu:///system --virt-type kvm --name vm-debian --memory 1024 --disk path=/var/lib/libvirt/images/vm-debian.img,size=10 --graphics none --cdrom /var/lib/libvirt/images/debian-10.6.0-amd64-netinst.iso --location /var/lib/libvirt/images/debian-10.6.0-amd64-netinst.iso --network network=default,mac=00:22:bb:cc:dd:ee --os-variant debian10
I can see in debug output that virt-install
analyzes ISO image, extracts initrd.gz and vmlinuz and the last message before it hangs:
[Wed, 11 Nov 2020 13:49:51 virt-install 729328] DEBUG (cli:370) Running: virsh --connect qemu:///system console vm-debian
Connected to domain vm-debian
Escape character is ^]
If I press 'Ctrl-]' virt-install exits and qemu-kvm
process is still in the memory.
What exactly is happening here? Am I doing something wrong? Perhaps this method of installation in libvirt environment is obsolete, and there exists something more simple and straightforward?
Thanks.
UPDATE
As suggested by DanielB, I enabled setial port on the guest side and enabled virt-install output on the serial console:
% virt-install --name debian10 --virt-type kvm --memory 1024 \
--disk path=/var/lib/libvirt/images/vm-debian10.img,size=10 \
--graphics none \
--console pty,target_type=serial \
--cdrom /var/lib/libvirt/images/debian-10.6.0-amd64-netinst.iso \
--location /var/lib/libvirt/images/debian-10.6.0-amd64-netinst.iso \
--network bridge=virbr0 \
--os-type linux --os-variant debian10 \
--extra-args console=ttyS0,115200n8 serial