When the --vncport option is used, virt-install exits with the libvirt error: libvir: Xen Daemon error : POST operation failed: (xend.err 'Error creating domain: int argument required') and accompanying backtrace: Failed to create domain vm1 Traceback (most recent call last): File "/usr/sbin/virt-install", line 406, in ? main() File "/usr/sbin/virt-install", line 370, in main dom = guest.start_install(conscb) File "/usr/lib/python2.4/site-packages/virtinst/XenGuest.py", line 355, in start_install self.domain = self.conn.createLinux(cxml, 0) File "/usr/lib/python2.4/site-packages/libvirt.py", line 249, in createLinux if ret is None:raise libvirtError('virDomainCreateLinux() failed') libvirt.libvirtError: virDomainCreateLinux() failed The same libvirt error is seen if an xml file having the port attribute of the graphics tag set to a value greater than 5900 is used with virsh, for e.g: <graphics type='vnc' port='5940'/> # virsh create vm1.xml libvir: Xen Daemon error : POST operation failed: (xend.err 'Error creating domain: int argument required') Failed to create domain vm1 error: Failed to create domain from vm1.xml Using a port value of <=5900 seems to pick a new port each time (adds one to the last used port). Version-Release number of selected component (if applicable): xen-3.0.3-8.el5 libvirt-0.1.8-1.el5 python-virtinst-0.96.0-2.el5 How reproducible: 100% Steps to Reproduce: 1. Specify --vncport=<value > 5900> on virt-install command line, or create an xml domain description including a port attribute > 5900. 2. Attempt to create the comain with virt-install or virsh Actual results: libvirt error or automatically assigned port Expected results: Domain is created with the chosen VNC port.
Created attachment 142006 [details] example xml domain description
Created attachment 142007 [details] SEXPR generated from vm1.xml
I'm not sure if this is a problem in libvirt or xend. The SEXPR that is generated looks OK, although I'm unsure if "port" should map to vncdisplay or vnclisten on the xend side?
Ok, it should map to "vncdisplay" - vnclisten controls the address it binds to (obviously :). This does seem like a problem in xend now. Passing vnclisten=<addr> on the "xm create" command line honours that option, but no matter what I provide for vncdisplay the default port is used, although no errors are generated.
This is a bug in our XenD code. There is a trivial patch we can apply to fix it.
Created attachment 154821 [details] Fix port number cast
*** This bug has been marked as a duplicate of 211208 ***