Internet connection fails in Ubuntu on VirtualBox when virtual machine is created from "Import appliance"

2

2

I have installed Ubuntu Server 9.10 in a virtual machine in VirtualBox, then I made a cope/clone and exported it with "Export appliance" so I can create many cloned virtual machines.

But when I try to import an appliance, everthing seams to be fine with the Ubuntu except that it can't connect to Internet and doesn't get an IP-address. The machine is used in Bridged mode. And it doesn't help to change to NAT-mode either.

The machine that I cloned seams to work fine, and get an IP address.

How to fix this? Where am I doing wrong?

Jonas

Posted 2010-03-19T15:24:17.200

Reputation: 21 007

Answers

3

Problem solved on ServerFault: https://serverfault.com/questions/30889/virtualbox-cloned-ubuntu-server-network-error/30893#30893

rm /etc/udev/rules.d/70-persistent-net.rules and then reboot.

Jonas

Posted 2010-03-19T15:24:17.200

Reputation: 21 007

I would not blindly delete this file, instead remove the offending lines in it. – hurikhan77 – 2010-03-19T22:08:05.953

1

hmm. i'd look at lshw and check if the name of the network device has changed, and edit /etc/network/interfaces to match if it has. then ifup - no need for a reboot

Journeyman Geek

Posted 2010-03-19T15:24:17.200

Reputation: 119 122

i think the point is that the cloning has given the machine a separate MAC address, so udev's given the NIC a new device name since the MAC didn't match. removing the 70-persistent-net.rules removes the old MAC; it's recreated on restart with the new MAC. if you don't remove the file, tho, the old MAC never gets removed. – quack quixote – 2010-03-19T21:23:07.170