Generate Virtual Machine Shortcut for ESXi 4

There are many couple of things I liked in VMware Server 2, one of them being the ability to create desktop shortcuts to a VM. Simple things like this are just taken for granted, until I tried the new hypervisor ESXi 4. Time to hit the search engine! (I refuse to call Google a friend, the cheesy part being least of my concern)

Someone apparently had the same problem (The internet is a great counselor; it provides relief to grief by telling you that someone out there shares the same fate as you) and gave a solution. For this we need VMware Remote Console from either Workstation or Server; I only attempted this with Server though.

  1. Create a shortcut to vmware-vmrc.exe either by selecting “Generate Virtual Machine Shortcut” in Server’s web UI or creating it manually.
  2. Get the path to the vmx file. In vSphere Client it’s Inventory > Virtual Machine > Edit Settings… > Options under Virtual Machine Configuration File.
  3. Append arguments to the shortcut in this format:
    <path to vmware-vmrc.exe> -h esxihost -u username -p password -m <path to vmx>

Of course we can leave out the -u and -p options for interactive authentication. For the record, mine look like this:

C:\Users\root\AppData\Roaming\Mozilla\Firefox\Profiles\646a7374.default\extensions\\plugins\vmware-vmrc.exe -h -m "[datastore] Ubuntu/Ubuntu.vmx"

Edit: There is a vmware-vmrc.exe, e.x.p build-158248, included with VMware vSphere Client (C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\4.0) but I could not get it to work using the arguments given above. If anyone managed to do it (without VMware vSphere Client running) do drop a message.


Update iPhone firmware on Ubuntu with VMware

Apple recently released iPhone OS 3.0.1 to fix a vulnerability in its SMS service that can lead to remote code execution. Ouch. So much for its “I’m Apple, therefore I’m secure” marketing efforts. Ouch. So I need to update. Again.

My setup:

Ubuntu 9.04, VMware Server 2, Windows XP VM with iTunes (did anyone think I can leave this bloat-ware out?)

Run the XP VM first. What happens is that when the iPhone is connected via USB cable, Ubuntu detects it as a camera. We need to close the pop-up and connect the iPhone under VMware. The VM should be able to see the iPhone and start iTunes; remember to backup the phone, then get it to start the update process. You should see some progress bars running in iTunes during the update.

Now things get a little interesting…

Look at the iPhone and wait for a little progress bar to appear. When it does, unload the usbhid module:

rmmod usbhid snd_usb_audio snd_usb_lib

Depending on your system some modules listed may be in use by other modules. Unload them as well. Do note that removing usbhid will disable USB keyboards and mice, so it will be more convenient to use the good old PS/2 input devices just for now. With usbhid module unloaded, connect the iPhone under VMware again. For me, I chose Devices > Apple iPhone > Connect under the remote console using a dusty PS/2 keyboard (my USB mouse took a break with the unloaded usbhid).

Based on experience, the time window to unload usbhid and connect iPhone is roughly 1 minute from the time the little progress bar appears on iPhone, if the phone is not connected the update on iTunes will timeout with error 1611.

If this happen, reload the usbhid module:

modprobe usbhid

and update/restore in iTunes to start over.

Otherwise, cross your fingers and wait for the little progress bar to start progressing. From here onwards, the update is straight-forward: wait until it’s done. Thanks to those guys who contributed over at VMware forums 🙂

VMware Communities: Workstation 6 + Linux + iPhone