skip to Main Content

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

2

Answers


  1. Chosen as BEST ANSWER

    I managed to proceed with installation only with graphics enabled, i.e. passing --graphics vnc,listen=0.0.0.0 to virt-install. This will start virt-viewer (should be installed).


  2. This is not a hang – whats happening is that because you used -graphics none, no graphical console is created and thus it assumes you’re trying todo a serial console installation. virt-install is displaying the serial port output, and letting you type in input, but your guest OS does not appear to be activating the serial port on the guest side, so you see no output and anything you type is ignored by the guest.

    IOW, the fix for the root cause issue here is that the guest OS installer needs to be told to run over the serial port in some manner. The alternate workaround is to enable graphics as your followup mentioned

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search