Bug 217074 - specifying vnc port does not work
specifying vnc port does not work
Status: CLOSED DUPLICATE of bug 211208
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Xen Maintainance List
Depends On:
  Show dependency treegraph
Reported: 2006-11-23 14:13 EST by Bryn M. Reeves
Modified: 2008-01-28 10:39 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-06-12 10:55:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
example xml domain description (923 bytes, text/plain)
2006-11-23 14:15 EST, Bryn M. Reeves
no flags Details
SEXPR generated from vm1.xml (890 bytes, text/plain)
2006-11-23 14:16 EST, Bryn M. Reeves
no flags Details
Fix port number cast (1.29 KB, patch)
2007-05-16 09:58 EDT, Daniel Berrange
no flags Details | Diff

  None (edit)
Description Bryn M. Reeves 2006-11-23 14:13:37 EST
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 ?
    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
      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):

How reproducible:

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.
Comment 1 Bryn M. Reeves 2006-11-23 14:15:17 EST
Created attachment 142006 [details]
example xml domain description
Comment 2 Bryn M. Reeves 2006-11-23 14:16:36 EST
Created attachment 142007 [details]
SEXPR generated from vm1.xml
Comment 3 Bryn M. Reeves 2006-11-23 14:24:11 EST
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?
Comment 4 Bryn M. Reeves 2006-11-23 14:31:41 EST
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.
Comment 7 Daniel Berrange 2007-05-16 09:56:59 EDT
This is a bug in our XenD code. There is a trivial patch we can apply to fix it.
Comment 8 Daniel Berrange 2007-05-16 09:58:58 EDT
Created attachment 154821 [details]
Fix port number cast
Comment 9 Markus Armbruster 2007-06-12 10:55:33 EDT

*** This bug has been marked as a duplicate of 211208 ***

Note You need to log in before you can comment on or make changes to this bug.