title: libvirt: virt-install hangs on installation
body: <p>After reading <a href="https://wiki.libvirt.org/page/VM_lifecycle#Creating_a_domain" rel="nofollow noreferrer">wiki libvirt</a> I started <code>virt-install</code> to install VM off the Debian10 netinstall ISO image:</p>
  <pre><code>% 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
  </code></pre>
  <p>I can see in debug output that <code>virt-install</code> analyzes ISO image, extracts initrd.gz and vmlinuz and the last message before it hangs:</p>
  <pre><code>[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 ^]
  </code></pre>
  <p>If I press 'Ctrl-]' virt-install exits and <code>qemu-kvm</code> process is still in the memory.</p>
  <p>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?</p>
  <p>Thanks.</p>
  <p><strong>UPDATE</strong></p>
  <p>As suggested by DanielB, I enabled setial port on the guest side and enabled virt-install output on the serial console:</p>
  <pre><code>% 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
  </code></pre>