WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / vSphere 5.5 / 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
  • Record and Replay vSphere Inventory using govc and vcsim 

Categories // vSphere 5.5 Tags // vcsim, vSphere 5.5

Comments

  1. Michael 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. percyreateguipicon 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

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • vSphere with Tanzu using Intel Arc GPU 01/26/2023
  • Quick Tip - Automating allowed and not allowed Datastores for use with vSphere Cluster Services (vCLS) 01/25/2023
  • ESXi with Intel Arc 750 / 770 GPU 01/24/2023
  • How to bootstrap vSAN Express Storage Architecture (ESA) on unsupported hardware? 01/19/2023
  • Automating Virtual Machine screenshots in vSphere 01/18/2023

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 © 2023

 

Loading Comments...