Opened 15 years ago
Closed 15 years ago
#5910 closed defect (duplicate)
3.1.2 nat settings not respected
Reported by: | jon1 | Owned by: | |
---|---|---|---|
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 (2)
Change History (7)
by , 15 years ago
Attachment: | VBox.log.3 added |
---|
follow-up: 2 comment:1 by , 15 years ago
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:3 by , 15 years ago
comment:4 by , 15 years ago
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 by , 15 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #6176 and will be fixed in VBox 3.1.6.
correct nat settings