I have a Windows host that runs guest Ubuntu VM via vmplayer. That virtual machine will be cloned, distributed among several people (running Windows hosts) and used for conducting a programming workshop. I am trying - and so far failing - to setup networking to satisfy the following requirements:
- The guest has to have access to the internet
- All the clones should have the same hostname (let's say Workshop to be concrete)
- The host system must be able to access its respective guest via that name (e.g. ping Workshop would ping the guest that is running on that host and not any other clone)
What I've tried so far:
- "Installed" a NAT network adapter for the guest
Tried to connect the guest via DHCP, in /etc/network/interfaces:
auto eth0 iface eth0 inet dhcp hostname Workshop
That works as far as connecting to the internet is concerned. However, I am unable to connect to the guest from the host at all. (E.g. ping Workshop does not work; if I use the address returned by ifconfig it does not work either from the host).
I then tried assigning a static address to the guest:
auto eth0 iface eth0 inet static address 220.127.116.11 netmask 255.255.0.0 gateway 18.104.22.168
(22.214.171.124 is the address assigned statically to the host by VMWare Network VMNet8 Adapter - that's the NAT adapter above). Now, I can ping 126.96.36.199 and telnet to it from the host. I can also ping and telnet from the guest to 188.8.131.52 (the host), but that's about it - there is no connection to the wider network. (I also can't access the guest via its hostname, but that's not crucial here since if push comes to shove I can use its address directly - as long as it is the same for everybody - and not the name).
Now, I think I can use the bridged network connection option with DHCP and that will give me what I need in case of one VM (I did not try it in this case, but I remember doing it previously). However, in case of several VM's with the same hostname and their hosts connected to the same network that will be problematic, won't it?
Your solutions and other advice will be much appreciated.