[Pkg-libvirt-maintainers] Bug#910857: VM configurated with spice not starting at boot

Vincent Danjean vdanjean.ml at free.fr
Thu May 9 12:37:54 BST 2019


  Hi,

  I also have this problem. With machines configured with spice,
I can find in the log (/var/log/libvirt/qemu/<vm>.log at boot time:

[...]
char device redirected to /dev/pts/9 (label charserial0)
((null):6261): Spice-Warning **: reds.c:2489:reds_init_socket: getaddrinfo(127.0.0.1,5900): Address family for hostname not supported
2019-05-08T13:15:34.165013Z qemu-system-x86_64: failed to initialize spice server
2019-05-08 13:15:34.288+0000: shutting down, reason=failed
[the whole log is at the end of this message]

  I've no problem with VMs not using spice but all of VMs with spice
fail to start at boot time. If I start them after (generally with
virt-manager but sometimes with virsh), it works perfectly.
  It is a long outstanding bug. I tried to track it down when
systemd was not there yet, so I was able to start the services
one by one. It occurred that the problem disappeared if VMs was
started *after* the network.

  I think this is linked to the fact that the code is using
getaddrinfo with AI_ADDRCONFIG. See
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1492621
and https://bugzilla.redhat.com/show_bug.cgi?id=721350
for more info.

  In my case, I cannot just start the network before the VMs
as one of my VMs is my dhcp server... So I remove spice from
the config of VMs that must start early.
  However, I think there is a problem to mandate that a
not-localhost address exists on the system to allow one
to start a VM. Using VNC instead of Spice does not lead
to the same problem. And, if it is absolutely required,
the error message could be more informative at least...

  Regards,
    Vincent


2019-05-08 13:15:33.956+0000: starting up libvirt version: 5.0.0, package: 2 (Guido Günther <agx at sigxcpu.org> Sun, 07 Apr 2019 12:36:21 +0200), qemu version: 2.8.1(Debian 1:2.8+dfsg-6+deb9u5),
 kernel: 4.19.0-0.bpo.4-amd64, hostname: aya.danjean.fr
LC_ALL=C \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
QEMU_AUDIO_DRV=spice \
/usr/bin/kvm \
-name guest=alastor,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-21-alastor/master-key.aes \
-machine pc-q35-2.8,accel=kvm,usb=off,vmport=off,dump-guest-core=off \
-cpu SandyBridge-IBRS \
-drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on \
-drive file=/var/lib/libvirt/qemu/nvram/alastor_VARS.fd,if=pflash,format=raw,unit=1 \
-m 4096 \
-realtime mlock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 67098e3e-3351-4d4d-8434-15811c3ca035 \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-21-alastor/monitor.sock,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-hpet \
-no-shutdown \
-global ICH9-LPC.disable_s3=1 \
-global ICH9-LPC.disable_s4=1 \
-boot strict=on \
-device ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
-device i82801b11-bridge,id=pci.2,bus=pcie.0,addr=0x1e \
-device pci-bridge,chassis_nr=3,id=pci.3,bus=pci.2,addr=0x0 \
-device ioh3420,port=0x11,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x1 \
-device ioh3420,port=0x12,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x2 \
-device ioh3420,port=0x13,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x3 \
-device ioh3420,port=0x14,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x4 \
-device ioh3420,port=0x15,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x5 \
-device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 \
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d \
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 \
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2 \
-device virtio-scsi-pci,id=scsi0,bus=pci.5,addr=0x0 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.4,addr=0x0 \
-drive file=/dev/aya+raid1/kvm-alastor-root,format=raw,if=none,id=drive-scsi0-0-0-1,cache=none,aio=native \
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi0-0-0-1,id=scsi0-0-0-1,bootindex=1,write-cache=on \
-drive file=/dev/aya+raid1/kvm-alastor-disk2,format=raw,if=none,id=drive-scsi0-0-0-2,cache=none,aio=native \
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=2,drive=drive-scsi0-0-0-2,id=scsi0-0-0-2,bootindex=2,write-cache=on \
-drive if=none,id=drive-sata0-0-0,media=cdrom,readonly=on \
-device ide-cd,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0 \
-netdev tap,fd=39,id=hostnet0,vhost=on,vhostfd=41 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:77:0a:00,bus=pci.1,addr=0x0 \
-netdev tap,fd=42,id=hostnet1,vhost=on,vhostfd=43 \
-device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:77:0a:01,bus=pci.7,addr=0x0 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0 \
-chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-21-alastor/org.qemu.guest_agent.0,server,nowait \
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \
-chardev spicevmc,id=charchannel1,name=vdagent \
-device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 \
-device usb-tablet,id=input0,bus=usb.0,port=1 \
-spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on \
-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 \
-device intel-hda,id=sound0,bus=pci.3,addr=0x1 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
-device i6300esb,id=watchdog0,bus=pci.3,addr=0x2 \
-watchdog-action reset \
-chardev spicevmc,id=charredir0,name=usbredir \
-device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 \
-chardev spicevmc,id=charredir1,name=usbredir \
-device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 \
-device virtio-balloon-pci,id=balloon0,bus=pci.6,addr=0x0 \
-msg timestamp=on
char device redirected to /dev/pts/9 (label charserial0)
((null):6261): Spice-Warning **: reds.c:2489:reds_init_socket: getaddrinfo(127.0.0.1,5900): Address family for hostname not supported
2019-05-08T13:15:34.165013Z qemu-system-x86_64: failed to initialize spice server
2019-05-08 13:15:34.288+0000: shutting down, reason=failed



-- 
Vincent Danjean       GPG key ID 0xD17897FA         vdanjean at debian.org
GPG key fingerprint: 621E 3509 654D D77C 43F5  CA4A F6AE F2AF D178 97FA
Unofficial pkgs: http://moais.imag.fr/membres/vincent.danjean/deb.html
APT repo:  deb http://people.debian.org/~vdanjean/debian unstable main



More information about the Pkg-libvirt-maintainers mailing list