Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Debian Linux, how can I get a new IP assignment on boot up? I'm working with VMs and I am required that every machine gets a new unique IP after booting up.

share|improve this question
1  
Do you have a DHCP server on the same network subnet as the VMs? –  shufler Jul 9 '12 at 14:49
    
You should tag and rephrase the question to make it clear that you're on a VM –  PPC Aug 1 '12 at 21:02

1 Answer 1

up vote 1 down vote accepted

It probably depends on your VM configuration, which in turn depends on the VM engine you are using. There are several ways to connect a VM to your network:

  • the NAT, which is probably the default behavior, will explicitly use the same IP address as the VM host
  • Host-only private network will not let you communicate with the external world, which is not very useful
  • Bridge can do the trick but may be complex to configure
  • Your best bet is probably "internal" network (VirtualBox terminology), which will look like another interface and can get a DHCP lease easily.

have a look at VirtualBox' documentation at http://www.virtualbox.org/manual/ch06.html

Also be sure that all your VM guests have different MAC addresses, or else you will go into big trouble. Especially true if you create your VMs by copying (VirtualBox has a very visible option when duplicating VMs).

share|improve this answer
    
Yes! You are very right in that it depends on the VM engine. Apparently the VM itself does get the new IP address. It's just the engine that does not update correctly. –  drum Jul 9 '12 at 15:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.