WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

VMware nested easter egg

09.18.2013 by William Lam // 10 Comments

It is only fitting that if a VMware Engineer adds a hidden easter egg, that it would of course contain another nested easter egg! For those of you who are not familiar with the vPong easter egg, Raphael Schitz wrote an article about a year ago regarding this little nugget which is when I first learned about this as well.

The easter egg allows you to play a game of old school pong using either VMware Fusion, Workstation, Player and it even works on vSphere. To enable this easter egg, you just need to mount a 0 byte floppy image located on your desktop (not a datastore) to a virtual machine and power it up.

Here is a screenshot of mounting a dummy floppy image which I created using the "touch" command on my Mac OS X system and connecting it to a Fusion VM:

Once you power on the VM, you should now see a game of vPong in the VM console which you can then play against the computer using your mouse.

One would think the easter egg stops there, but nope, there is actually more. If you click into the VM console and type the word "pride" (all lower case), you will see that the black/white vPong game will now change to color! To disable the color, you just need to type the word "pride" again and it will go back to black/white.

I thought this was actually pretty cool and thanks to Regis Duchesne for sharing this tidbit! So the next time you are bored, you can always kill some time with the classic black/white pong or go for the more colorful version 🙂

Categories // Uncategorized Tags // easter egg, ESXi, fusion, nested, pong, vpong, vSphere, workstation

Flexible OVF deployments using Deployment Options (e.g. small, medium, large)

08.19.2013 by William Lam // 28 Comments

It is pretty common these days to see a vendor distribute their applications as a virtual appliance which pre-bundles both an operating system and their application instead of a stand alone installer and provides that as an OVF/OVA download. This makes it extremely easy for customers to deploy a vendors application with very minimal effort.

One potential challenge with providing a virtual appliance is that the virtual hardware configuration such as CPU and Memory is pre-configured during deployment and usually optimized for the lowest common denominator such as a small environment or even home lab for that matter. Of course, it is trivial to increase these resources after deployment but would it not be nice if the vendor could provide a "sizing recommendation" option during the deployment of their virtual appliance?

It turns out the OVF format actually supports such a functionality called Deployment Options and this is probably something that is not very well known. I personally have only seen this feature get used in one of VMware's virtual appliances which is vCenter Operations. When going through the deployment wizard of vCenter Operations appliance, you will notice one of the steps is to select your deployment configuration which in this case is based on the number of virtual machines you have in your vCenter Server environment.

The deployment option in this example translates to the number of vCPU and vMemory that the virtual appliances will be deployed with. Of course this information can also be used within the guestOS as part of the initial boot to configure the application based on the resources allocated to the virtual appliance. If you are interested in learning more about Deployment Options and its capabilities, you can find more details on the DMFT website for the OVF standards document starting on page 35.

I recently became interested in this as there was an internal thread asking how to leverage this feature and I initially thought this would be a capability provided by VMware Studio which is a product that helps you build virtual appliances. After deploying VMware Studio, I was unable to find a way to enable this feature as part of the build. Currently it looks like you would need to manually edit the OVF file which is XML based (not ideal) to add in this extra capability. You can also take an existing virtual machine and export using the vSphere Web/C# Client to an OVF/OVA and then add in the Deployment Option as a quick and dirty way of leveraging this feature within your organization.

I took a look at vCenter Operations OVA file to see how Deployment Options work and it actually looks pretty straight forward and requires the following three sections:

  1. Deployment Option Definitions
  2. Virtual Hardware Configurations
  3. Deployment Option Text

I have also provided a sample OVF called MyApp.ovf that you can download to see how these options work.

Deployment Option Definitions

The first section describes your Deployment Options, in the example below we use the words small, medium and large. You can change this text to be anything such as bronze, silver and gold. The only thing to note is the id and msgid which will need to be maped to section #2 and #3

<DeploymentOptionSection>   
 <Info>The list of deployment options</Info>   
  <Configuration ovf:id="small">     
      <Label ovf:msgid="config.small.label"/>     
      <Description ovf:msgid="config.small.description"/>   
  </Configuration>   
  <Configuration ovf:id="medium">     
      <Label ovf:msgid="config.medium.label"/>     
      <Description ovf:msgid="config.medium.description"/>   
  </Configuration>   
  <Configuration ovf:id="large">     
      <Label ovf:msgid="config.large.label"/>     
      <Description ovf:msgid="config.large.description"/>   
  </Configuration>  
</DeploymentOptionSection>

Virtual Hardware Configurations

The second section describes the virtual hardware configuration and uses a configuration parameter id that maps back to the original definition. In the example here, we are looking at the number of vCPU's the virtual appliance can be assigned with. For the initial default, you do not need to specify an entry, but for the others you will need to. Here I have a definition for medium and large and their respective vCPU configuration.

<Item>
  <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
  <rasd:Description>Number of Virtual CPUs</rasd:Description>
  <rasd:ElementName>1 virtual CPU(s)</rasd:ElementName>
  <rasd:InstanceID>1</rasd:InstanceID>
  <rasd:ResourceType>3</rasd:ResourceType>
  <rasd:VirtualQuantity>1</rasd:VirtualQuantity>
</Item>
<Item ovf:configuration="medium">
  <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
  <rasd:Description>Number of Virtual CPUs</rasd:Description>
  <rasd:ElementName>2 virtual CPU(s)</rasd:ElementName>
  <rasd:InstanceID>1</rasd:InstanceID>
  <rasd:ResourceType>3</rasd:ResourceType>
  <rasd:VirtualQuantity>2</rasd:VirtualQuantity>
</Item>
<Item ovf:configuration="large">
  <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
  <rasd:Description>Number of Virtual CPUs</rasd:Description>
  <rasd:ElementName>4 virtual CPU(s)</rasd:ElementName>
  <rasd:InstanceID>1</rasd:InstanceID>
  <rasd:ResourceType>3</rasd:ResourceType>
  <rasd:VirtualQuantity>4</rasd:VirtualQuantity>
</Item>

Deployment Option Text

The final section contains the actual text you wish to display for each of your Deployment Configurations. You will see the msgid maps back to your definitions, so if you choose to change the wording, make sure these match up.

<Strings>
 <Msg ovf:msgid="config.small.label">Small</Msg>  
 <Msg ovf:msgid="config.small.description">Use this configuration for small deployments. This deployment will need 1 vCPUs and 1024 Memory for the vApp.</Msg>  
 <Msg ovf:msgid="config.medium.label">Medium</Msg>  
 <Msg ovf:msgid="config.medium.description">Use this configuration for small deployments. This deployment will need 2 vCPUs and 2048 Memory for the vApp.</Msg>  
 <Msg ovf:msgid="config.large.label">Large</Msg>
 <Msg ovf:msgid="config.large.description">Use this configuration for small deployments. This deployment will need 4 vCPUs and 4096 Memory for the vApp.</Msg>
</Strings>

Though I have experienced Deployment Options while deploying vCenter Operations in the past, thinking about it more now, it is definitely something that can be useful for folks building virtual appliances. The really nice thing about this feature is it works when deploying to both a vCenter Server as well as a standalone ESXi host.  Hopefully we will see more virtual appliances leveraging this neat feature of the OVF standard.

Categories // Uncategorized Tags // deployment options, DeploymentOptionSection, ESXi, ovf, vSphere

Quick Tip - Marking an HDD as SSD or SSD as HDD in ESXi

08.15.2013 by William Lam // 9 Comments

This was a neat little trick that I picked up in one of our internal storage email distribution groups which I thought was quite interesting. Some of you may recall an article I wrote a few years back on how to trick ESXi 5 in seeing an SSD device which relied on adding an SATP rule for a particular storage device. The actual use case for this feature was that not all real SSD devices would automatically be detected by ESXi and this allowed a user to manually mark it as an SSD.

The other "non-official" use case for this feature allows a user to basically "simulate" an SSD by marking a regular HDD as an SSD and I this actually helped me test the new Host Cache (Swap-to-SSD) feature which was part of the vSphere 5 release. Recently there was a customer inquiry asking for the complete reverse, in which you could mark an SSD as an HDD. I am not sure what the use case was behind this request but I did learn it was actually possible using a similar method of adding a SATP rule to a device.

Note: If you are running Nested ESXi, a much simpler solution for simulating an SSD is to use the following trick noted here.

Before you begin, you will need to identify the storage device in which you wish to mark as an SSD or HDD. Use the following ESXCLI command to do so:

esxcli storage core device list

In the screenshot above, we can see for our device mpx.vmhba1.C0:T2:L0 shows "Is SSD" parameter as false. After running two commands below, we should then see that property change to true.

Marking HDD as SSD:

esxcli storage nmp satp rule add -s VMW_SATP_LOCAL -d mpx.vmhba1:C0:T2:L0 -o enable_ssd
esxcli storage core claiming reclaim -d mpx.vmhba1:C0:T2:L0

 

Marking SSD as HDD:

esxcli storage nmp satp rule add -s VMW_SATP_LOCAL -d mpx.vmhba1:C0:T1:L0 -o disable_ssd
esxcli storage core claiming reclaim -d mpx.vmhba1:C0:T1:L0

To perform the opposite, you simply just need to add the disable_ssd option. If you receive an error regarding a duplicate rule, you will need to first remove the SATP rule and then re-create with the appropriate option.

Another useful tidbit is that if you are running Nested Virtualization and the virtual disk of that VM is stored on an actual SSD, that virtual disk will automatically show up within the guestOS as an SSD so no additional changes are required.

Categories // Automation, ESXi, VSAN Tags // enable_ssd disable_ssd, esxcli, ESXi, hdd, ssd

  • « Previous Page
  • 1
  • …
  • 50
  • 51
  • 52
  • 53
  • 54
  • …
  • 61
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025