WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Hardware Options
    • Hardware Reviews
    • Lab Deployment Scripts
    • Nested Virtualization
    • Homelab Podcasts
  • VMware Nostalgia
  • Apple
You are here: Home / Uncategorized / Quick Tip - Adding a custom prefix to your VCSIM environment

Quick Tip - Adding a custom prefix to your VCSIM environment

03.16.2014 by William Lam // 3 Comments

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:

<config>
  <inventory>
    <dc>1</dc>
    <host-per-dc>0</host-per-dc>
    <vm-per-host>0</vm-per-host>
    <poweron-vm-per-host>0</poweron-vm-per-host>
    <cluster-per-dc>1</cluster-per-dc>
    <host-per-cluster>2</host-per-cluster>
    <rp-per-cluster>1</rp-per-cluster>
    <vm-per-rp>3</vm-per-rp>
    <poweron-vm-per-rp>3</poweron-vm-per-rp>
    <dv-portgroups>0</dv-portgroups>
  </inventory>
  <prefix>vGhetto-</prefix>
  <worker-threads>1</worker-threads>
  <synchronous>true</synchronous>
</config>

 

More from my site

  • New vCenter Server Simulator 2.0 enhancements in VCSA 5.5
  • vCenter Server Simulator
  • vCloud Director Simulator
  • New vCenter Server Simulator 2.0 enhancements in VCSA 5.5
  • Is the vCenter Server Unique ID still important today?

Categories // Uncategorized Tags // vcsim, vSphere 5.5

Comments

  1. *protectedMichael Rice says

    08/18/2014 at 1:39 am

    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.

    Thanks!

    Reply
    • William Lam says

      08/18/2014 at 2:37 pm

      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

      Reply
  2. *protectedpercyreateguipicon says

    03/19/2016 at 11:23 am

    qué interesante!!!

    Reply

Thanks for the comment!Cancel reply

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

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

  • Automating the vSAN Data Migration Pre-check using vSAN API 06/04/2025
  • VCF 9.0 Hardware Considerations 05/30/2025
  • VMware Flings is now available in Free Downloads of Broadcom Support Portal (BSP) 05/19/2025
  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/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

 

Loading Comments...