bug with vnc port/display#

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think I see a bug in libvirt. Here is step-by-step instructions how to reproduce:

1. Create domain from XML (note vnc port):

<domain type="xen">
<name>lvnc</name>
<os>
  <type>linux</type>
  <kernel>/boot/vmlinuz-2.6.15-1.43_FC5guest</kernel>
  <initrd>/boot/initrd-2.6.15-1.43_FC5guest.img</initrd>
  <root>/dev/sda1</root>
  <cmdline> ro selinux=0 3</cmdline>
</os>
<memory>10</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
  <graphics type="vnc" port="5905"/>
</devices>
</domain>

2. Examine s-expr definition:

sudo /usr/sbin/xm list -l lvnc
(domain
  (on_crash restart)
  (uuid 5c56456a-1f19-d996-35e3-f5e514b79601)
  (bootloader_args )
  (vcpus 1)
  (name lvnc)
  (on_poweroff destroy)
  (on_reboot restart)
  (bootloader )
  (maxmem 128)
  (memory 128)
  (shadow_memory 0)
  (features )
  (on_xend_start ignore)
  (on_xend_stop ignore)
  (image
      (linux
          (kernel /boot/vmlinuz-2.6.15-1.43_FC5guest)
          (ramdisk /boot/initrd-2.6.15-1.43_FC5guest.img)
          (args 'root=/dev/sda1  ro selinux=0 3')
          (device_model /usr/lib/xen/bin/qemu-dm)
      )
  )
  (status 0)
  (device (vkbd (uuid c1ea89ea-903c-ba5b-603d-7b5c7bc25654)))
  (device
      (vfb
          (type vnc)
          (vncdisplay 5)
          (uuid bc92b909-8ca3-eece-8ef5-7551eaccda6e)
      )
  )
)

So far, so good: vncdisplay 5

3. dumpxml lvnc
<domain type='xen' id='-1'>
<name>lvnc</name>
<uuid>5c56456a-1f19-d996-35e3-f5e514b79601</uuid>
<bootloader/>
<os>
  <type>linux</type>
  <kernel>/boot/vmlinuz-2.6.15-1.43_FC5guest</kernel>
  <initrd>/boot/initrd-2.6.15-1.43_FC5guest.img</initrd>
  <cmdline>root=/dev/sda1  ro selinux=0 3</cmdline>
</os>
<memory>131072</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
  <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
  <input type='mouse' bus='xen'/>
  <graphics type='vnc' port='-1'/>
</devices>
</domain>

As you can see, port is now -1 instead of expected 5905.

Looks like the problem around 'vncunused' variable handling in xml_internal.c. (I think it should be assigned 0 not 1 by default and if 'vncunused' config keyword
is not found.  I tried to fix it myself, but without much luck so far.

By the way, what would be a good way to do logging in libvirt code?

Sincerely,
Vadim

--
"La perfection est atteinte non quand il ne reste rien a ajouter, mais
quand il ne reste rien a enlever."  (Antoine de Saint-Exupery)


Attachment: smime.p7s
Description: S/MIME cryptographic signature

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]