Ticket #5910 (closed defect: duplicate)
3.1.2 nat settings not respected
|Reported by:||jon1||Owned by:|
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.