0

Please let me know if I am doing something incorrectly or if this is a bug.

Host OS: Debian 9.6 Stretch amd64

Package:

ii  libvirt-daemon                       3.0.0-4+deb9u3                           amd64        Virtualization daemon
ii  libvirt-daemon-system                3.0.0-4+deb9u3                           amd64        Libvirt daemon configuration files
ii  libvirt-glib-1.0-0:amd64             1.0.0-1                                  amd64        libvirt GLib and GObject mapping library
ii  libvirt0                             3.0.0-4+deb9u3                           amd64        library for interfacing with different virtualization systems
ii  python-libvirt                       3.0.0-2                                  amd64        libvirt Python bindings
ii  qemu-kvm                             1:2.8+dfsg-6+deb9u5                      amd64        QEMU Full virtualization on x86 hardware
ii  virt-viewer                          5.0-1                                    amd64        Displaying the graphical console of a virtual machine
ii  virtinst                             1:1.4.0-5                                all          Programs to create and clone virtual machines

Also verified on: Host OS: Ubuntu 18.04.1 LTS amd64

Packages:

ii  libvirt-clients                                             4.0.0-1ubuntu8.5                             amd64        Programs for the libvirt library
ii  libvirt-daemon                                              4.0.0-1ubuntu8.5                             amd64        Virtualization daemon
ii  libvirt-daemon-driver-storage-rbd                           4.0.0-1ubuntu8.5                             amd64        Virtualization daemon RBD storage driver
ii  libvirt-daemon-system                                       4.0.0-1ubuntu8.5                             amd64        Libvirt daemon configuration files
ii  libvirt-glib-1.0-0:amd64                                    1.0.0-1                                      amd64        libvirt GLib and GObject mapping library
ii  libvirt0:amd64                                              4.0.0-1ubuntu8.5                             amd64        library for interfacing with different virtualization systems
ii  ovmf                                                        0~20180205.c0d9813c-2                        all          UEFI firmware for 64-bit x86 virtual machines
ii  python-libvirt                                              4.0.0-1                                      amd64        libvirt Python bindings
ii  qemu-kvm                                                    1:2.11+dfsg-1ubuntu7.8                       amd64        QEMU Full virtualization on x86 hardware
ii  virt-viewer                                                 6.0-2                                        amd64        Displaying the graphical console of a virtual machine
ii  virtinst                                                    1:1.5.1-0ubuntu1.1                           all          Programs to create and clone virtual machines

Guest OS: Ubuntu 18.04.1 LTS amd64

Guest OS: Debian 9.6 amd64

If I install one of the linux guests with a desktop environment using the command:

virt-install --virt-type=kvm \
--name ubuntu1804 --ram 4096 --vcpus 4 \
--os-variant=ubuntu16.04 --hvm \
--cdrom /tmp/ubuntu-18.04.1-desktop-amd64.iso \
--network bridge=br0,model=virtio \
--graphics vnc \
--disk path=/tmp/ubuntu1804.qcow2,size=32

The install will succeed but on the first reboot after installation the guest will just hang during bootup.

If the graphics is changed to spice, the guest OS boots with no problem.

virt-install --virt-type=kvm \
--name ubuntu1804 --ram 4096 --vcpus 4 \
--os-variant=ubuntu16.04 --hvm \
--cdrom /tmp/ubuntu-18.04.1-desktop-amd64.iso \
--network bridge=br0,model=virtio \
--graphics spice \
--disk path=/tmp/ubuntu1804.qcow2,size=32

This was also tested with a Debian 9.6 guest. If I install the OS with --graphics vnc, and choose to install a 'Desktop Environment', the first reboot after install will hang at "Booting from Hard Disk". If I choose not to install a 'Desktop Environment' the reboot after installation successfully boots up. If I add add --graphics spice then the guest OS will boot correctly after installation with the 'Desktop Environment' (instead of --graphics vnc which will cause it to hang)

I assume this is not expected behavior but I am unable to figure out why the choice of graphics display configuration affects the ability of the guest to boot.

womble
  • 96,255
  • 29
  • 175
  • 230
  • vnc xml file: https://pastebin.com/zH2NhPvK spice xml file: https://pastebin.com/MzsWCT8i – Brenden E. Dec 29 '18 at 06:32
  • You're supposed to be using spice, not vnc. – Michael Hampton Dec 29 '18 at 19:18
  • I know using spice is better but is vnc explicitly not supported for linux guests w/ a GUI? I am able to install Windows based guests with graphics as vnc without issue. – Brenden E. Dec 29 '18 at 19:22
  • Well you really shouldn't use vnc at all for any current OS full stop. Pretty much all of them have proper SPICE drivers. It's even backward compatible for ancient OSes and the obscure current OSes that do not. AFAIK there's no reason to ever use graphics vnc. – Michael Hampton Dec 29 '18 at 19:24
  • Thank you, I will use spice from now on. However it would be nice if the failure mode for using vnc would be more obvious. I am still not sure why it hangs during the boot after installation with the message "Booting from Hard Disk" (for a Debian guest) or a garbled purple screen with an Ubuntu guest. I tried searching but it doesn't seem like other people have run into this issue, would be nice to see if others run into it as well. – Brenden E. Dec 29 '18 at 19:35
  • I've tried to repro, using a Debian 9.6 amd64 host with all the same versions of libvirt, kvm as you list. Ubuntu 18.04 installs and boots fine, VNC connects and provides a GUI. XML looks identical *except* for the machine type, which I see as `pc-i440fx-2.8` whereas your VNC XML says `pc-i440fx-bionic`. I assume you pulled that XML off the Ubuntu 18.04 host. – womble Dec 30 '18 at 02:56
  • Thanks for trying to repro it, if you don't mind could you also try a debian guest inside of your Debian host? Yes, the XML was from the Ubuntu 18.04 host. I was playing around with grub by enabling the bootmenu and was able to boot into the ubuntu 18.04 guest successfully by first going into recovery mode and then resuming normal boot from there. If i try booting normally I encounter this: (https://imgur.com/a/i05XRvJ) I'm not sure what this means but I can try to debug some more. – Brenden E. Dec 30 '18 at 05:52
  • I piecewise merged the xml generated from the working `--graphics spice` config into the broken config generated from `--graphics vnc`. The difference is the choice of video. The broken one uses `cirrus` and the working one uses `qxl`. Apparently cirrus should no longer be used for modern guests (https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/) Perhaps virt-install should not default to cirrus especially when it knows the `--os-variant` – Brenden E. Dec 31 '18 at 02:32

0 Answers0