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.

I want to use some virtual machine manager (hypervisor) to some guest operating systems. I know we usually set IP of VMs in the VM desktop or telnet/ssh console. But is there a way to set the IP address of the VM in the hypervisor?

For example, I install VMware Workstation or VMware Player in Windows XP, and install Windows 7 in VMware. I want to set up the IP of Windows 7 in Windows XP, not inside Windows 7.

share|improve this question
    
What are you actually trying to accomplish? As one poster answered, restricting the IP address range is one way to do it (which you can do if you control your DHCP server or with VMware workstation [or player if you get the Network Editor up and running]). Depending on your goals, you might be able to use the built in NAT functionality in VMware. If you are willing to do some pre-configuration, you can also use VMware Tools installed in the guest to then control the IP from the outside. Xen paravirtual VMs also have the ability to set the IP from the hypervisor. –  Jed Daniels Jun 25 '11 at 17:30

2 Answers 2

As far as I am aware, this will not be possible.

Any virtualisation solution simply controls the hardware. You are able to do a variety of tasks at a hardware level such as changing the MAC address, however, the actual IP is configured at a software level.

What you can and should do is to look at unattended setups for Windows using something such as the Microsoft Deployment Toolkit, you can then set the IPs to static during setup. This is what large hosts that deploy servers do.

Alternatively, you can reserve the MAC address of the virtual network adapter at your DHCP server, so that when a machine attempts to get it's IP, it will get the one you set.

However, if you are thinking about this from a security perspective, this can all be broken/changed by the user. Take a look/think about doing something at the switch/network level.

share|improve this answer

I'd suggest using DHCP and restricting the IP address range to a single IP.

share|improve this answer
    
Can I restrict the VM IP in the hypervisor? –  flypen Jun 27 '11 at 9:53
    
Yes. I believe so. I remember seeing options to configure the DHCP server in Virtual Box as well as in VMWare (the version that were out in 2007-2008). –  Lord Loh. Jun 27 '11 at 18:08

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.