Setting Static IP of NAT network interface in VirtualBox

As stated in the VirtualBox user manual, section 9.10.1 Configuring the address of a NAT network interface

In NAT mode, the guest network interface is assigned to the IPv4 range 10.0.x.0/24 by default where x corresponds to the instance of the NAT interface +2. So x is 2 when there is only one NAT instance active. In that case the guest is assigned to the address, the gateway is set to and the name server can be found at

This means that for Ubuntu, the /etc/network/interfaces entry for the network card settings are something as below:

iface <interface> inet static
    address <static IP> (e.g.

Also, add the following nameserver entry to /etc/resolv.conf


VirtualBox Ubuntu Guest Boots Up with “SMBus base address uninitialized” error

Error message on boot
piix4_smbus 0000:00:07.0: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr

Error is caused by Ubuntu trying to load the smbus module which doesn’t exists in VirtualBox guest. It doesn’t seem to affect the function of the guest machine, but it’s kind of disconcerting having that error every time the machine starts up.

See if the i2c_piix4 module is indeed loaded with the command
lsmod | grep i2c_piix4

Blacklist the loading of the i2c_piix4 module by adding it in
sudo nano /etc/modprobe.d/blacklist.conf
and add

blacklist i2c_piix4

at the end of the file.

Update the initramfs with the command
update-initramfs -u -k all

The prompt will return something like
update-initramfs: Generating /boot/initrd.img-2.6.35-22-server

Ubuntu Static IP

Edit /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

Comment out the “iface eth0 inet dhcp” line, and add

iface eth0 inet static
  address <desired static IP address>
  netmask <mask (e.g.>
  network <network (e.g.>
  broadcast <network broadcast address (e.g.>
  gateway <network (e.g.>

Save the file and restart networking
sudo /etc/init.d/networking restart