Linux guest cloning - clones cannot get internet access
Linux guest cloning - clones cannot get internet access
I'm running Ubuntu 8.10 (64-bit), and have a 32-bit Ubuntu Server guest (have been using it for a while, it's running Ubuntu 8.04) using hardware virtualisation.
Now I'd like to run multiple instances of this guest on the same pc. I used 'VBoxManage clonevdi' to create new HD images, and the new guest VM's boot fine. However, they don't get any internet access!
I've tried using different virtual interfaces, but it didn't work. I noticed the internal network interface changed to eth1 of 2 (changing on reboot) instead of eth0 like the original guest. So I tried to change '/etc/network/interfaces', followed by 'sudo /etc/init.d/networking restart', but without any luck.
Sadly, I don't know what to do
Now I'd like to run multiple instances of this guest on the same pc. I used 'VBoxManage clonevdi' to create new HD images, and the new guest VM's boot fine. However, they don't get any internet access!
I've tried using different virtual interfaces, but it didn't work. I noticed the internal network interface changed to eth1 of 2 (changing on reboot) instead of eth0 like the original guest. So I tried to change '/etc/network/interfaces', followed by 'sudo /etc/init.d/networking restart', but without any luck.
Sadly, I don't know what to do
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
What did you change in /etc/network/interfaces? What if you let it be how it was, remove everything that mentions an interface from /etc/udev/rules.d/70-persistent-net.rules and reboot? Your interfaces file should only have 4 lines of configuration, two for the loopback and two for the actual interface. Should look like this:
Code: Select all
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Did you change the udev rules file like I told you? It will look something like this:
And you need to make it like this:
Now there are no interfaces defined here. Reboot the Guest so udev will create a new one.
Code: Select all
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# PCI device 0x11ab:0x4362 (sky2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="MAC", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x10de:0x0057 (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="MAC", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
Code: Select all
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Does the Guest have the IP of 10.0.2.15, as it should with NAT? Does your primary DNS server work on the Host? See the VirtualBox FAQ for some help getting your internet working.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
It does not have a 10.0.2.15 IP, even though I've set the Virtualbox configuration to NAT.Sasquatch wrote:Does the Guest have the IP of 10.0.2.15, as it should with NAT? Does your primary DNS server work on the Host? See the VirtualBox FAQ for some help getting your internet working.
The primary DNS server works on the host, and on other guests.
The Virtualbox FAQ seems to talk about not being able to access the internet from guests in general. However, I can access the internet fine from the original virtual machine, just not from the clone.
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
What IP do you get in the Guest? Is there a configuration somewhere that tells the OS to use a different IP (like a static one)?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
That's really strange. Run sudo dhclient eth0 from a terminal. What do you get for output? The interface is attached to NAT? Exact same settings as with the original VM?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
- Posts: 9
- Joined: 11. Sep 2008, 09:46
- Location: Israel
Silly question?
I have a silly question (because you didn't specify):
Are you running multiple clones at the same time?
If so, did you go into the Network settings (in the VB GUI) and generate a new MAC address? Using the same MAC for two VMs won't work.
Are you running multiple clones at the same time?
If so, did you go into the Network settings (in the VB GUI) and generate a new MAC address? Using the same MAC for two VMs won't work.
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: Silly question?
As you can see from the responses, a new interface was created, and that only happens when a new MAC is detected. A new MAC address is automatically generated when you create a VM. Cloning a VM is a bit more work than just cloning the VDI .shmuelakam wrote:I have a silly question (because you didn't specify):
Are you running multiple clones at the same time?
If so, did you go into the Network settings (in the VB GUI) and generate a new MAC address? Using the same MAC for two VMs won't work.
Bit silly question, but still a possible cause, were it not that was already covered.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
- Posts: 9
- Joined: 11. Sep 2008, 09:46
- Location: Israel
Re: Silly question?
Well yes, but until a True Clone Feature comes along, I have been known to clone VMs "wholesale", VDI, settings and all. If you were running two VMs with the same MAC, both guest OS would still create a new interface, right? But the host would most likely be FOOBAR with regard to [at least] one of them.Sasquatch wrote:As you can see from the responses, a new interface was created, and that only happens when a new MAC is detected. A new MAC address is automatically generated when you create a VM.
Not quite as silly a question now, is it?
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: Silly question?
As I said before, the Guest assigned a new interface name. That only happens when the MAC is changed. And the TS didn't mention that.shmuelakam wrote:Well yes, but until a True Clone Feature comes along, I have been known to clone VMs "wholesale", VDI, settings and all. If you were running two VMs with the same MAC, both guest OS would still create a new interface, right? But the host would most likely be FOOBAR with regard to [at least] one of them.Sasquatch wrote:As you can see from the responses, a new interface was created, and that only happens when a new MAC is detected. A new MAC address is automatically generated when you create a VM.
Not quite as silly a question now, is it?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
Yes, exactly the same settings. I can't give you the output, because I deleted the clone and decided to go with from-scratch VM's instead.Sasquatch wrote:That's really strange. Run sudo dhclient eth0 from a terminal. What do you get for output? The interface is attached to NAT? Exact same settings as with the original VM?
However, I'll create another clone, repeat my steps and then run that command to see the output. Might take me some time though.
Yes, I did.shmuelakam wrote:I have a silly question (because you didn't specify):
Are you running multiple clones at the same time?
If so, did you go into the Network settings (in the VB GUI) and generate a new MAC address? Using the same MAC for two VMs won't work.