Here is a request for a feature I have not yet seen in any virtualization application — used Parallels Desktop 2, VMware Fusion 1.1 and another product I can't speak of yet — that I'd love to have.  It'd make things so much easier for me...  So here is an open request just in case one of the developers of free alternatives (e.g. VirtualBox) reads it and decides to get ahead of the competence by implementing it.

Before explaining my feature request, let's consider you have a server on your network on which you run multiple virtual machines (VMs) for whatever purpose. These machines are exported to the network using bridged networking so that other computers in the network can access them transparently as if they were physical computers. To make this setup trivial, you have a DHCP server on your network that hands out static IP addresses to these virtual servers, and you also have a DNS server that maps these addresses to static names. This way, users on your network can access the virtual machines by simply spelling out their host names.

Now let's move to the laptop world where you are connected to different networks all the time (e.g. at home or at work) or no network at all. Here I will assume that you will want to access the VMs exclusively from your laptop. In this case, you should not use bridged networking because you'd be exporting all your virtual machines to the possibly untrusted network. And you cannot rely on the external DHCP nor DNS servers to deal with static IP addresses nor host names for you because in many situations you have no control over them.

Your best bet is to use shared networking to configure your VMs (or host-only networking if they needn't access the outside world).  But if you do so, your VMs will get random IP addresses because you have no control over the DHCP sever bundled into the virtualization application. And as a result of this, you cannot assign host names to them. As a workaround, you can manually configure each operating system running on a VM to have a static IP (bypassing DHCP), then add an entry in the host's /etc/hosts file to assign a host name to the guest OS and at last add an entry in the guest's /etc/hosts file to assign a host name to the host OS. Which is painful.

In my idea world, the virtualization applications could have the ability to fine-tune the bundled DHCP server to hand out specific addresses to the virtual machines (VMs) and a way to specify DNS host names for them, all from the configuration interface and without having to touch any configuration file in the host system (nor guest, for that matter). E.g. add a little configuration box for the IP address and host name of the guest OS alongside the box that already exists to configure the MAC address. Then have the bundled DHCP server hand out the appropriate entries to the guests, add an entry to the host's /etc/hosts and provide a virtual DNS server to the guests so that they can resolve each other's names.

An use case for this? I have two VMs that I carry around in my MacBook Pro that I use very frequently and that I do not want to expose to the outside network at all. One is a Fedora 8 installation and the other a NetBSD one. I start them up from the graphical interface and then access them through SSH exclusively. But in order to reliably use SSH, I need to do the above manual steps to set up a host name for them, or otherwise using SSH is a pain.

I am also trying to set up an automatic build farm for ATF (composed probably of 10-15 VMs) and the need to set all these details manually is extremely boring.

Go to posts index

Comments from the original Blogger-hosted post: