Bug 217074 - specifying vnc port does not work
Summary: specifying vnc port does not work
Status: CLOSED DUPLICATE of bug 211208
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Xen Maintainance List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-23 19:13 UTC by Bryn M. Reeves
Modified: 2008-01-28 15:39 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2007-06-12 14:55:33 UTC


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

Description Bryn M. Reeves 2006-11-23 19:13:37 UTC
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.

Comment 1 Bryn M. Reeves 2006-11-23 19:15:17 UTC
Created attachment 142006 [details]
example xml domain description

Comment 2 Bryn M. Reeves 2006-11-23 19:16:36 UTC
Created attachment 142007 [details]
SEXPR generated from vm1.xml

Comment 3 Bryn M. Reeves 2006-11-23 19:24:11 UTC
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 19:31:41 UTC
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 13:56:59 UTC
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 13:58:58 UTC
Created attachment 154821 [details]
Fix port number cast

Comment 9 Markus Armbruster 2007-06-12 14:55:33 UTC

*** 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.