VirtualBox

Ticket #5910 (closed defect: duplicate)

Opened 4 years ago

Last modified 4 years ago

3.1.2 nat settings not respected

Reported by: jon1 Owned by:
Priority: major Component: other
Version: VirtualBox 3.1.2 Keywords: nat
Cc: Guest type: other
Host type: other

Description

I have been using Virtualbox 3.0.x with custom nat settings for some time and it worked fine. Today the wrong address was supplied to my VM so I upgraded to 3.1.2 and the problem persists.

I am using this command to give my VM a 192.168.90.x address: $ VBoxManage modifyvm "xp-dev" --natnet1 "192.168.90/8"

The VM is windows xp and is set to use NAT as its network device. After running this command I can see in Machines/xp-dev/xp-dev.xml the following

<Network>
        <Adapter slot="0" enabled="true" MACAddress="080027462802" cable="true" speed="0" type="Am79C973">
          <NAT network="192.168.90/8"/>
        </Adapter>

Then I start up my virtual machine (either using the GUI or VBoxSDL -startvm) and the vm comes up with a 10.0.2.15 address. I then shutdown the machine and check xp-dev.xml again and find that the network modification is gone:

 <Network>
        <Adapter slot="0" enabled="true" MACAddress="080027462802" cable="true" speed="0" type="Am79C973">
          <NAT/>
        </Adapter>

I have some older VBox.log files that show DHCP working as intended:

00:00:03.010 [/Devices/pcnet/0/LUN#0/Config/] (level 5)
00:00:03.010   BootFile   <string>  = "xp-dev.pxe" (cb=11)
00:00:03.010   Network    <string>  = "192.168.90/8" (cb=13)
00:00:03.010   TFTPPrefix <string>  = "/home/jon/.VirtualBox/TFTP" (cb=27)
...
00:00:25.770 NAT: DHCP offered IP address 192.168.90.15

but in the latest VBox.log I see this instead

00:00:01.653 [/Devices/pcnet/0/LUN#0/Config/] (level 5)
00:00:01.653   BootFile   <string>  = "xp-dev.pxe" (cb=11)
00:00:01.653   TFTPPrefix <string>  = "/home/jon/.VirtualBox/TFTP" (cb=27)
...
00:00:24.159 NAT: DHCP offered IP address 10.0.2.15

Attached are the two logs, VBox.log.3 has the 192.168 in it, VBox.log has the normal DHCP stuff.

The question is, what changed? A few days ago I was running this VM (xp-dev) and something crazy happened so I had to kill -9 virtualbox. I am pretty sure I used my VM at least once since then with no problems but this issue did not occur before that situation.

Attachments

VBox.log.3 Download (54.3 KB) - added by jon1 4 years ago.
correct nat settings
VBox.log Download (53.7 KB) - added by jon1 4 years ago.
bad networking

Change History

Changed 4 years ago by jon1

correct nat settings

Changed 4 years ago by jon1

bad networking

comment:1 follow-up: ↓ 2 Changed 4 years ago by jon1

Note that in the second case where I got a 10.0.2.15 address I did have this in my xp-dev.xml file

<Network>
        <Adapter slot="0" enabled="true" MACAddress="080027462802" cable="true" speed="0" type="Am79C973">
          <NAT network="192.168.90/8"/>
        </Adapter>

But it seems that virtualbox ignored it.

comment:2 in reply to: ↑ 1 ; follow-up: ↓ 3 Changed 4 years ago by Hachiman

thanks for reporting.

comment:3 in reply to: ↑ 2 Changed 4 years ago by Hachiman

Replying to Hachiman:

thanks for reporting.

Could you please try  VBoxSVC? Please change VBoxSVC in your installation and repeat described steps.

comment:4 Changed 4 years ago by jon1

I haven't played with VBoxSVC before so I may have done something wrong but the short story is your new executable did not fix things, it made things worse.

I downloaded VBoxSVC.5910 and put it in /usr/lib/virtualbox, making a backup of the older VBoxSVC. I ran the modify-vm command and got this error

$ VBoxManage modifyvm "xp-dev" --natnet1 "192.168.90/8"
VirtualBox Command Line Management Interface Version 3.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

ERROR: failed to create the VirtualBox object!
ERROR: code NS_BASE_STREAM_WOULD_BLOCK (0x80470007) - Stream operation would block (extended info not available)
Most likely, the VirtualBox COM server is not running or failed to start.

I copied the old VBoxSVC back to /usr/lib/virtualbox and ran the modify-vm command so that it would work. I then copied the VBoxSVC.5910 to /usr/lib/virtualbox so that I could run VBoxSDL with it. VBoxSDL just hung after starting up. I ctrl-c'd VBoxSDL and saw this:

$ ps ax | grep VBoxSVC
32592 ?        Sl     0:00 /usr/lib/virtualbox/VBoxSVC --pipe 8 --auto-shutdown

The VBoxSVC process never went away, I had to kill it. A few times I saw this output with your newer VBoxSVC:

$ VBoxSDL -startvm "xp-dev"
Sun VirtualBox SDL GUI version 3.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

VBoxSVC: error: 0 bytes read from child process

And then it would just sit there.

comment:5 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #6176 and will be fixed in VBox 3.1.6.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use