Thursday, April 16, 2009

Using VMware Player to Connect to an ESXi Guest

Did you know that you can connect the VMware Player client to a guest running on VMware ESX/ESXi?

This is handy, especially for Windows guests where you don't want to enable RDP or some other remote desktop service (VNC).

The guest will automatically start if it isn't already running. A drawback (or benefit depending on how you look at it), via VMware Player you don't have the ability to edit hardware configuration or manage snapshots. You'll still need to use the VIC for that.

I was running a Windows guest (via VMware Player) on my Fedora 10 desktop to have access to MS Office, support for corporate Windows only apps, and most importantly access to the Virtual Infrastructure Client. Even with a fairly speedy dual core workstation, the Windows guest consistently bogged down the workstation. So, I decided, why not run this thing on the server and let it handle the load?

I used VMware Converter (free) to convert the VMware Player guest to a Virtual Infrastructure guest and sent it to the datastore on the ESXi server. I didn't realize that VMware Converter could transfer the converted guest on the fly to the ESXi server without purchasing extra licenses, well, it can and does.

Once the guest completed conversion and transfer to the ESXi server, i created a desktop launcher for VMware Player to launch the guest directly. The command line is as follows:

/usr/bin/vmplayer -h 10.1.1.2 -u "flakrat" "[datastore1] winxp01/winxp01.vmx"

Unfortunately, I don't see any method of adding VI guests to the list of "Recent Virtual Machines" in VMware Player client. Thus the custom desktop launcher.

7 comments:

Piotr said...
This comment has been removed by the author.
Andy said...

Interesting. I tried this. I have VMWare Player 4 running in a Win 7 VM on VSphere 5. If I try this from my Win 7 laptop, it works perfectly. If I give exactly the same command inside the VM, I get an access denied error, and no password prompt. If I then add -p "password" to the command line - it works! Very odd.

Anonymous said...

I tried to connect with VMplayer4 to a VM in ESXi5 and get
Invalid datastore format ' [datastore1]'

Anonymous said...

I too was getting the Invalid datastore format error on ESXi 4.1. The datastore names are case sensitive. After I changed the datastore name to the proper case, I was able to connect.

Todaydownload.com said...

Resources like the one you mentioned here will be very useful to me ! I will post a
link to this page on my blog. I am sure my visitors will find that very useful
VMware Player

Anonymous said...

VMWare Workstation player 12 for Windows no longer supports the -h option parameter.
I have not been able to find a way to get vmplayer.exe to connect to an ESXi host.

I have to revert back to vmplayer 6.0.7 to connect to an ESXi guest VM.
Vsphere will be my fallback.

Anonymous said...

For VMWare Player 12 you can still connect to ESXi guests but some of the command line parameters have changed (`vmplayer --help` shows the valid parameters): -h is now -H, -u is now -U, -p is now -P.

With these changes I can connect to ESXi 5.5 guests just fine from Linux.