Can't get new IP after cloning & moving VM to another machin

Discussions related to using VirtualBox on Windows hosts.
Post Reply
doub1ejack
Posts: 2
Joined: 5. Jun 2013, 23:40

Can't get new IP after cloning & moving VM to another machin

Post by doub1ejack »

Very simply, I'm loving the way Virtualbox works as a localhost web development environment and I want to get all my interns using it too. We tried to get one machine up and running today and everything went smoothly until we found that we cannot release the IP address. The clone is holding on to the ip address of my virtual machine and we can't seem to get it to renew...

This problem has been posted & partially digested on stackoverflow; please refer to the entire question there (stackoverflow --dot-- com /questions/16948147/cant-change-ip-address-using-debian-distribution). All machines running the same software in the same room on the same network. This seems like it should be really simple..

Virtualbox: v4.2.6
Running: Debian 2.6.32
Running on: Windows 7
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't get new IP after cloning & moving VM to another ma

Post by Perryg »

I don't do off site. If you want help here ask the questions and supply the necessary information.

One thing to make sure of is the MAC address. Did you regenerate during clone?
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Can't get new IP after cloning & moving VM to another ma

Post by BillG »

I agree. The only way two machines can have the same IP is if they have the same MAC address. The networking software thinks they are the same machine.
Bill
doub1ejack
Posts: 2
Joined: 5. Jun 2013, 23:40

Re: Can't get new IP after cloning & moving VM to another ma

Post by doub1ejack »

Ah, that makes sense. No I did not do anything to change the Mac addr on the virtual machine. Is there a walkthrough somewhere for how to do that? And is it possible to do that with the clone I made?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't get new IP after cloning & moving VM to another ma

Post by Perryg »

Cloning from the VirtualBox main manager will ask if you want to regenerate the MAC address.
If you use the CLI see VBoxManage section 8.9 VBoxManage clonevm of your VirtualBox users manual, there you will see the syntax and switches.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Can't get new IP after cloning & moving VM to another ma

Post by mpack »

You can also change the MAC address after the fact in the GUI. See VM settings | Network and open the Advanced tab for the adapter.
jtbrenna
Posts: 1
Joined: 10. Jun 2013, 18:29

Re: Can't get new IP after cloning & moving VM to another ma

Post by jtbrenna »

I was having a similar problem but I ran into a new roadblock. I was able to change the MAC address while the machine was powered off but once it was restarted I received this error "eth0:error fetching interface information: device not found". I went ahead and updated the eth0 rule in the XX-persistent-net.rules file to the new MAC address but am still having no luck. Are there any other configuration files that I need to change?

Thanks for the help.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't get new IP after cloning & moving VM to another ma

Post 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
devin12211
Posts: 1
Joined: 7. Dec 2021, 18:34

Re: Can't get new IP after cloning & moving VM to another machin

Post by devin12211 »

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
What about linux8? CentOS 8 and RHEL 8
They do not have udev /etc/udev/rules.d/70-persistent-net.rules file

How do we change/delete the MAC address ?
Last edited by mpack on 8. Dec 2021, 12:57, edited 1 time in total.
Reason: Use proper phpBB quoting mechanism.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Can't get new IP after cloning & moving VM to another machin

Post by scottgus1 »

devin12211 wrote:How do we change/delete the MAC address ?
First, have you changed the Virtualbox MAC address for the VM, per the above posts? See the VM's network settings, the card's tab, open Advanced, MAC Address refresh swirly at the end of the address textbox.

If you have done so, then once Virtualbox reports a new MAC address, you'll need to web-research your chosen OS for how to reset the network settings inside the VM's OS. Unless a Linux guru comes along, you may wait a while, and the Linux OS's help forums may help you get a quicker response.
Post Reply