Linux – Console after installing guests with KVM and virt-install

installationkvm-virtualizationlinuxvirtual-machinesvirtualization

I'm trying to install a few virtual machines with KVM onto my Debian Jessie System.
I researched a lot but have not yet found a helping answer to my problem.

I'm connected via ssh to my host machine and try to install a new guest machine by running the following command as root:

virt-install --connect qemu:///system -n vpsName --memory=5000 --vcpus=4 --disk path=/var/lib/libvirt/images/nix.img,size=125 -c /home/localuser/images/debian-8.6.0-amd64-netinst.iso --graphics vnc,listen=0.0.0.0 --noautoconsole --os-type linux --os-variant generic --accelerate --network=bridge:br0 --hvm

After a few seconds, I get the following message:

Domain installation still in progress. You can reconnect to
the console to complete the installation process.

My precise question is now: How do I get to the installer-console with the standard install-prompts (hostname, country, …) of the Debian installer?

One method I tried, was VNC on the opened port but I cannot connect. It asks for a password and then freezes after password-entry.

Another thing I tried was to open the ssh connection with the -Y option and then installed by specifying —-graphics none --console pty,target_type=serial. That didn't work either; I'm stuck at a frozen command line.

I'm sure, I'm not the only one who had that issue. Unfortunately I couldn't find a similar post with a helpful answer yet.

Thank you for helping me!

Regards.

Best Answer

virsh console DOMAIN is the way to connect. You can get the domain name or number with virsh list --all