VMware Workstation 9 and later appear to have a robust implementation of UEFI firmware including a full implementation of the UEFI v2.30 Shell. In this post I will show you how to set up a VMware Workstation virtual machine (VM) which allows you to experiment with the UEFI Shell and the various UEFI command line tools. I assume you are familiar with VMware Workstation and the UEFI Shell. In this post I am using VMware Workstation 9.
The first step is to create a new typical 64-bit Windows 7 VM using the “I will install the operating system later” option. Note, do not install any operating system. I called my particular VM “uefi” but you can call it anything you like. I also specified that the VM had two host only network interfaces.
Then edit the new VM’s configuration file (uefi.vmx) and add the configuration option firmware = “efi”.
If you boot the new VM, you see see the following for about 30 seconds:
Eventually the virtualized EFI firmware will default to the UEFI shell because it was unable to find any bootable executable either via PXE or in \EFI\BOOT\.
By default you will have an empty filesystem under fs0:.
Mine is populated with a FAT32 driver, Python and a number of utilities. I loaded them into the default UEFI filesystem (which is just a FAT32 filesystem) via a USB stick. This post does not go into any detail on how to find, prepare or transfer drivers and utilities to the UEFI VM filesystem. It is assumed that if you are reading this post, you have some familiarity with UEFI.
Note that before you can successfully invoke the Python shell, you need to load a FAT drive (load \efi\drivers\fat.efi, followed by reconnect -r).
The following screenshot shows how to configure static IPv4 addresses on the two network interfaces eth0 and eth1:
and the next two screenshots show the output of ifconfig -l -b:
A -b option can be added to all UEFI shell commands to page the command output.
There does not appear to be any support for IPv6.
You can use the ping command to ping from either network interface to the other network interface or to the host computer virtual network interface (VMnetX) which in, this case, is 192.168.100.1.
As you can see from the output of dmpstore, five default BOOTXXXX variables are defined in the VMware implementation of the UEFI firmware, with the UEFI Shell being the last, i.e. BOOT0004:
It is also stated to be an unsupported option.
The standard UEFI 2.30 ASCII or Unicode visual editor is provided:
As shown in the four following screenshots, the UEFI reference implementation of a boot manager is provided:
Well, this should be sufficient information to enable you to access the UEFI shell using VMware Workstation. You can download an OVA (uefi.ova) containing all the UEFI utilities mentioning in this post and more at here.