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 
Share this...
  • Twitter
  • Facebook
  • Linkedin
  • Reddit
  • Pinterest

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

Leave a Reply to percyreateguipicon 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)

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

Connect

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

Support

Recent

  • A first look at the new vSphere+ & vSAN+ Cloud Service 07/01/2022
  • Quick Tip - Prepare VMware Photon OS for use with vSphere Guest OS Customization and cloud-init 06/29/2022
  • Using the new vSphere Guest OS Customization with cloud-init in vSphere 7.0 Update 3 06/27/2022
  • How to forcefully disconnect a vSphere VM Console session? 06/24/2022
  • Quick Tip - Using ESXi Scripted Installation (kickstart) to configure IPv6 networking 06/21/2022

Advertisment

Copyright WilliamLam.com © 2022

 

Loading Comments...