I'm running a number of virtual machines on a Ubuntu 12.04 host. For various reasons all these VMs need fixed IP addresses. The laptop in question is used for demonstrations -- and this is where the problems arise...
Depending on the circumstances I will either use WiFi or a mobile tether to get an internet connection, which in both cases leads to the laptop being assigned an address via DHCP. Frequently this dynamic address is on a different subnet to the one used by the fixed ones (192.168.0/20). This makes the static addresses unreachable from the host OS.
After some thought, it seems the most elegant solution is to create a separate LAN on the host (for the subnet used by the VMs) and then bridge it to whatever subnet is assigned to the host.
Bear in mind the VM's only need to communicate with each other and the host. They do not need access beyond that.
Questions:
- is this the best approach?
- if, it is how could I go about implementing it?
Many thanks.