Rick van den Bosch - Blog

... on .NET, software architecture, software development and whatnot

Getting the computername of the host of a VMware image

Because of a new way of working here at the customer I'm located at, two virtual machines will be deployed to each developer's machine. These VM's will be run using VMware player. The thing is, the VM's should be able to access the network and all the 'normal' resources. Because of this, all the VM's should have unique (computer)names. But they have to be traceable to the host machine.

The wish the customer has at this point is to give the VM's a computername based on the name of the machine the VM will be run on. Unfortunately, this doesn't seem to be supported in VMware, other than using sysprep and asking the user to enter the host's computername. At this point the 'asking the user' option is being used, but we're trying to find a way to get host's name from within a VM without any user interaction. Nice challenge... ;)

The VM's are working like a charm. Dragging and dropping files between host and VM, supergood performance (of course, with a 2.16 GHz Core Duo 2Gb internal memory laptop....!) and seamless resizing of the entire VM desktop. My first impression tells me VMware player works smoother than Microsoft Virtual PC, but the comparison is uneven because of the state of the art hardware I'm running VMware on right now... If I have any more info, I'll keep you posted.

By the way, if you have any ideas about getting the host's name, drop me a line.

Comments

John Troyer said:

Always good to check the VMTN Forums. A search there http://www.vmware.com/community/search.jspa?objID=f19&q=host+name yields that the best way is probably a script on the host that changes the .vmx file before the VM is started, perhaps as part of the install.
# September 15, 2006 12:23 PM

Paul said:

Did you get a solution on this? I am just researching the same topic. thanks
# November 15, 2006 4:13 AM

Rick van den Bosch said:

Hi Paul,

unfortunately, we didn't. Our current solution is to ask the user to enter the name of the host machine and use this to generate the name for the vm. At this point it doesn't seem possible to get the name of the host...

Kind regards,

Rick

# November 16, 2006 8:09 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)