ports/167891: emulators/virtualbox-ose: bus error with more than one headless VM

Gary Palmer gpalmer at FreeBSD.org
Mon May 14 19:50:02 UTC 2012

>Number:         167891
>Category:       ports
>Synopsis:       emulators/virtualbox-ose: bus error with more than one headless VM
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 14 19:50:01 UTC 2012
>Originator:     Gary Palmer
>Release:        9.0-RELEASE
FreeBSD xxx 9.0-RELEASE FreeBSD 9.0-RELEASE #5: Tue May  1 00:40:42 BST 2012     root at xxx:/usr/obj/usr/src/sys/MICRO  amd64
If the default VNC port is already used when you start a second VM with VBoxHeadless -n -m <port number> then when you connect with a VNC client the VBoxHeadless bus errors.  There was a warning about the IPv6 port already being in use.  Patching virualbox to set the TCP port number for IPv4 and IPv6 appears to have resolved the issue
have something listening on TCP 5900 on IPv6
start a VM via VBoxHeadless -n -m 5901
connect vncviewer to port 5901
see attached patch

libvncserver has an autoprobe mode which should detect the first free VNC server port.  it may be worth turning that feature on if -m isn't specified.

Patch attached with submission follows:

--- src/VBox/Frontends/VBoxHeadless/FramebufferVNC.cpp.orig	2012-05-12 19:50:26.807639833 +0100
+++ src/VBox/Frontends/VBoxHeadless/FramebufferVNC.cpp	2012-05-12 19:50:38.568636058 +0100
@@ -89,7 +89,10 @@
     vncServer = rfbGetScreen(0, NULL, mWidth, mHeight, 8, 3, 1);
     vncServer->screenData = (void*)this;
     if (mVncPort)
+    {
         vncServer->port = mVncPort;
+        vncServer->ipv6port = mVncPort;
+    }
     char *pszDesktopName;
     rc = RTStrAPrintf(&pszDesktopName, "%s - VirtualBox", pszName);
     if (rc >= 0)


More information about the freebsd-ports-bugs mailing list