I just discovered this neat little feature of VCSIM (vCenter Server Simulator) which allows you to append a global string prefix to all vSphere objects in your inventory. I am not sure if this capability has always been there but definitely can be useful if you plan on running multiple VCSIM environments, this can be an easy way to uniquely identify a particular configuration.

Screen Shot 2014-03-16 at 10.46.56 AM
To add the custom prefix, you will need to add the <prefix></prefix> tags to your VCSIM inventory configuration file. You can take a look at the default template /etc/vmware-vpx/vcsim/model/initInventory.cfg to get an idea of the available configurations.

Here is a the sample VCSIM configuration file for the inventory in the screenshot above:


3 thoughts on “Quick Tip - Adding a custom prefix to your VCSIM environment

  1. Hello William,

    Is it possible to also configure what it names things? In my env I would like to name a Datacenter 12345 which for me is a customer number, then name HostSystems like 11111-hyp1.home.lab 11112-hyp2.home.lab then name my VirtualMachines like 11113-web1.mycustomer.com etc.. Those numbers for me would represent a device number. I dont mind having to provide a fully laid out xml file that describes exactly what I want to name each thing that is created if it is possible. Right now I am looking at having to make a script that will go rename everything after the fact, so if there is a way to make it happen when its being configured initially that would be more ideal.


    • This level of customization is currently not possible. You would need to create a script to either rename OR start with an empty inventory and build up using a script

Thanks for the comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.