Page 1 of 1

Moving a VirtualBox .vdi Linux machine to a new host compute

Posted: 12. Nov 2012, 00:21
by triprev
I've been happily using an Ubuntu 12.04 VM as a webserver with a static IP running on VirtualBox on my Windows 7 machine for a few months (working on it from the host computer, bridged network connection, accessing via SSH from host and sharing folders through windows).

In /etc/network/interfaces, I've got:

address 192.168.1.112
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 194.168.4.100 194.168.8.100

I tried creating a new VM with it on my Win7 laptop by copying across the .vdi and creating a new VirtualBox machine with it, then changing the static IP to 192.168.1.116, but I'm not getting any network... I can't ping it or log in with SSH, and it doesn't show up anywhere in my windows network.

Can anyone shed any light? Thanks in advance.

Re: Moving a VirtualBox .vdi Linux machine to a new host com

Posted: 12. Nov 2012, 00:27
by Perryg
Run ifconfig -a from a guest terminal and post the results.

Re: Moving a VirtualBox .vdi Linux machine to a new host com

Posted: 12. Nov 2012, 00:47
by triprev
Perryg wrote:Run ifconfig -a from a guest terminal and post the results.
Thanks for looking. ifconfig:

eth1 Link encap:Ethernet HWaddr 08:00:27:83:c3:81
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 overruns:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 overruns:0
collisions:0 txqueuelen:0
RX bytes:240 (240.0 B) TX bytes:240 (240.0 B)

Re: Moving a VirtualBox .vdi Linux machine to a new host com

Posted: 12. Nov 2012, 00:50
by Perryg
edit the /etc/udev/rules.d/70-persistent-net.rules or you can delete the rules and Linux will configure it on the next boot

Re: Moving a VirtualBox .vdi Linux machine to a new host com

Posted: 12. Nov 2012, 00:58
by triprev
Perryg wrote:edit the /etc/udev/rules.d/70-persistent-net.rules or you can delete the rules and Linux will configure it on the next boot
Deleted the file, rebooted and now the net connection is fine - I can SSH + it's shares are showing up in Windows host.

HUGE thanks!