Page 1 of 1

v2.10 upgrade from v1.4.6 caused port forwarding to stop

Posted: 18. Dec 2008, 18:00
by chumpster
I've been happily running v1.4.6 for several months. So much better than VMware that I dumped! I was excited to try the upgrade to v2.1.0

The install went smooth as an upgrade on my XP Pro host. Everything seemed to work fine. The Linux & Windows guests can get out to the Internet etc. as before.

However, port forwarding from the host to the guest seems to have stopped working. This is important for me to test IE against server programs on the guest. I tried erasing the old settings and re doing them.

I've checked for case sensitivity in the commands etc. Re-read the manual Googled for help, but to no avail. Maybe I'm on the bleeding edge and getting cut!

Can anyone help please?

Here's the output of VboxManage getextradata and the guest is called CentOS5DesktopVDI

C:\Program Files\Sun\xVM VirtualBox>VboxManage getextradata CentOS5DesktopVDI enumerate
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

Key: GUI/SaveMountedAtRuntime, Value: yes
Key: GUI/LastCloseAction, Value: save
Key: GUI/LastWindowPostion, Value: 4,30,720,442
Key: GUI/Fullscreen, Value: off
Key: GUI/Seamless, Value: off
Key: GUI/AutoresizeGuest, Value: on
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/localhost8080/HostPort, Value: 8080
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/localhost8080/GuestPort, Value: 8080
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/localhost8080/Protocol, Value: TCP
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/centos5ssh/Protocol, Value: TCP
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/centos5ssh/GuestPort, Value: 22
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/centos5ssh/HostPort, Value: 2222

Posted: 18. Dec 2008, 21:12
by Hachiman
Thank you for report,
I'll try reproduce problem you've mentioned and get back to you.

Posted: 18. Dec 2008, 21:12
by frank
What does it mean 'it stopped working'? Can't you start the VM anymore or does the guest just not respond to ports you forwarded? It would be nice to have a look at your VBox.log file but for this I would prefer you would open a bug report and attach the file there instead of posting the file here.

Posted: 18. Dec 2008, 21:51
by chumpster
To clarify what I mean by it stopped working, is that the guest no longer responds on the ports that are forwarded to it. I've tried this with Windows and Linux guests and verified that the guest's app. does respond locally, within the guest, on the assigned port.

So in summary, port forwarding worked before, but after the upgrade it doesn't.

thanks

PS. I'll see if I can dig out some log files later

Posted: 19. Dec 2008, 00:34
by vbuser456
Just to add a seconding, I am experiencing this exact same problem too. Windows XP host, Ubuntu 8.1 guest, forwarding port 80 on the host to port 80 on the guest running Apache 2.

Everything worked perfectly running on the latest VB 2.0.x (2.0.6 I think?), but after upgrading to 2.1 none of the port forwarding works. Everything else seems fine; guests boot fine, and have outward connectivity through the host using NAT. However, the previous port forwarding on port 80 doesn't work anymore. I tried removing the lines from the virtual machine .xml file manually and re-adding them using VBoxManage, but no difference.

Code: Select all

C:\Program Files\Sun\xVM VirtualBox>VBoxManage.exe getextradata "Ubuntu" enumerate
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

Key: GUI/SaveMountedAtRuntime, Value: yes
Key: GUI/LastCloseAction, Value: powerOff
Key: GUI/LastWindowPostion, Value: 61,44,800,643
Key: GUI/Fullscreen, Value: off
Key: GUI/Seamless, Value: off
Key: GUI/AutoresizeGuest, Value: on
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/Protocol, Value: TCP
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/GuestPort, Value: 80
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/HostPort, Value: 80

C:\Program Files\Sun\xVM VirtualBox>
I've tried this on two independent computers running VirtualBox, and both have exhibited the same symptoms: XP host, Ubuntu guest, forwarding port 80 host to port 80 guest, works on 2.0.x but not on 2.1 following an upgrade.

Also, I've done a netstat -a, and the ports are definitely down as being "listening", but the virtual machine doesn't seem to act on them. Telneting to port 80 on the host doesn't connect and times out.

I can't see anything meaningful in the logs and they are a bit big to post verbatim, but if you can direct me to a specific area or keyword I'll try and fish something out.

Pete

Posted: 19. Dec 2008, 02:02
by sir.whistler
I have the same problem. Port 8180 TCP on WinXP SP2 to Ubuntu 8.1 Port 8180. I have checked with firestarter, there are no packets reaching the guest system at all.

Did you already opened the bug report? Let me know if you need any more data from me!

Here are some of my logs: Klick

Is it possible to downgrade?

Posted: 19. Dec 2008, 10:48
by vbuser456
Forgot to mention, I have the Windows firewall completely disabled at the moment, so it's not that.

I've downgraded from 2.1 to 2.0.6, and port forwarding immediately works again, so it's definitely something about 2.1.

Pete

Posted: 19. Dec 2008, 10:51
by vbuser456
sir.whistler wrote:Is it possible to downgrade?
Yes, but I had backed up my .xml virtual machine files beforehand so I was able to restore them. If you just downgrade it seems that previous versions don't support the upgraded .xml files.

That said, the .xml files are just hardware settings, and the .vdi disk images appear to work fine on either 2.0.6 and 2.1, so I don't think there would be too much headache just deleting the .xml files and recreating them as new virtual machines attaching an existing disk image. End result should boot as per usual, and it would only be a 5 minute job to recreate each machine.

Posted: 19. Dec 2008, 14:54
by Hachiman
Thank you, folks, for input. The problem is fixed. So you can use port forwarding again in the next release. Sorry for inconvenience.

Posted: 19. Dec 2008, 16:20
by buddyl
Is there any reason why the setup for port forwarding still is only available via the command line tool VBoxManage?

Adding this to the GUI should be fairly simple, no?

Posted: 19. Dec 2008, 16:21
by sir.whistler
Thank you, sounds really good. Just for me to know if I need to downgrade in the meantime: When to expect the next release?

@vbuser456: Thanks for your answer!

Implement port forwarding in GUI sounds like a nice idea. Not that I need it but it would save me some time.

TOM

Posted: 19. Dec 2008, 16:39
by chumpster
I have a quick question about downgrading. Can I go from 2.1 to 2.0.6 without having to do anything special. I see someone mentioned .xml files. Is there a difference in a 'relatively' minor change like this. I understand there was a change from 1.4.6 to 2.1.0?

Also, I second the question, is there any word when the next release is due?

Thanks to everyone who shared their experience here.

Posted: 19. Dec 2008, 17:51
by vbuser456
chumpster wrote:I have a quick question about downgrading. Can I go from 2.1 to 2.0.6 without having to do anything special. I see someone mentioned .xml files. Is there a difference in a 'relatively' minor change like this. I understand there was a change from 1.4.6 to 2.1.0?
From what I can tell, the change from the 2.0.x base to 2.1 is sufficiently major that the files are not backwards compatible. When I upgraded to 2.1, it prompted me that the files were going to be upgraded and I backed them up at that point; unless you explicitly backed the older versions up, then they'll have just been replaced with the newer upgraded version. That means you can't go backwards "without having to do anything special".

However, the process to recreate the files should be relatively painless like I said. The virtual machine files seem to just be straight XML files (i.e. a load of textual settings stored as XML) rather than anything particularly proprietary to the virtual machine itself: it's the VDI disk image files that hold the actual meat of the machine.

So before you can downgrade, you'll need to clear out all your virtual machines, and also the VirtualBox configuration xml file as well. I found most of them residing in the C:\Documents and Settings\<user>\.VirtualBox folder. Uninstall VirtualBox 2.1 completely, then reinstall 2.0.6 and get it so that it starts with no errors (just starts the program, not starts a virtual machine). Then manually recreate your virtual machines as if you were making whole new machines from scratch, trying to maintain as identical settings as possible to what they were before. If you move the XML files rather than delete them, you can open them up in a text editor (WordPad worked fine for me) and consult them for the various settings. When it asks you for the disk image, opt to use an existing one and point it to the existing VDI file.

Pete

Posted: 19. Dec 2008, 18:14
by UnixMonky
I used vbuser's method to go back to 2.0.6. I had backed up the xml files, so it was easy to revert them to the old versions, and everything started without problems.

Posted: 21. Dec 2008, 12:37
by sir.whistler
I just downgraded successfully. I didnt have Backups.

1. Uninstalled 2.1 completely (just kept the settings and machines in C:\Docum...Settings\.Virt..)
2. Cleaned my registry
3. Installed 2.0.6
4. Replaced the VirtuaBox.xml in the .VirtualBox folder with the backup made automatically when upgraded to 2.6
5. Deleted the machines xml files
6. Created new machines and tied the old vdi images to them...

thats it works perfect (portforward too) thanks for all you iinput that made my downgrade possible ;)

TOM