2

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.

1
  • 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. Commented Jun 25, 2011 at 17:30

2 Answers 2

3

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.

2

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

2
  • Can I restrict the VM IP in the hypervisor?
    – flypen
    Commented Jun 27, 2011 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.
    Commented Jun 27, 2011 at 18:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .