Skip to content

vcsim custom 'state' definition #1185

Closed

Description

@jakerobinson

I'd like to define a custom state of a simulator instance (e.g. datacenters, networks, VMs, hosts) so that I don't have to remove the defaults and add my own at runtime. This would allow me to mimic what I have in my physical lab or even in production, and test different scenarios very quickly.

Activity

  1. dougm commented on Jul 20, 2018

    @dougm
    Member

    vcsim -dc 0 and your inventory is empty

    Or vcsim -vm 0 if you want everything except VMs. Similar for the other types.
    The flags are hooked up to the Model fields, we could have an option to specify in a file instead of the switches:

    // Datacenter specifies the number of Datacenter entities to create
    Datacenter int
    // Portgroup specifies the number of DistributedVirtualPortgroup entities to create per Datacenter
    Portgroup int
    // Host specifies the number of standalone HostSystems entities to create per Datacenter
    Host int `json:",omitempty"`
    // Cluster specifies the number of ClusterComputeResource entities to create per Datacenter
    Cluster int
    // ClusterHost specifies the number of HostSystems entities to create within a Cluster
    ClusterHost int `json:",omitempty"`
    // Pool specifies the number of ResourcePool entities to create per Cluster
    Pool int
    // Datastore specifies the number of Datastore entities to create
    // Each Datastore will have temporary local file storage and will be mounted
    // on every HostSystem created by the ModelConfig
    Datastore int
    // Machine specifies the number of VirtualMachine entities to create per ResourcePool
    Machine int
    // Folder specifies the number of Datacenter to place within a Folder.
    // This includes a folder for the Datacenter itself and its host, vm, network and datastore folders.
    // All resources for the Datacenter are placed within these folders, rather than the top-level folders.
    Folder int
    // App specifies the number of VirtualApp to create per Cluster
    App int
    // Pod specifies the number of StoragePod to create per Cluster
    Pod int

  2. dougm commented on Jul 20, 2018

    @dougm
    Member

    The related flags:

    % vcsim -h
    Usage of vcsim:
      -app int
            Number of virtual apps per compute resource
      -cluster int
            Number of clusters (default 1)
      -dc int
            Number of datacenters (default 1)
      -ds int
            Number of local datastores (default 1)
      -folder int
            Number of folders
      -host int
            Number of hosts per cluster (default 3)
      -pg int
            Number of port groups (default 1)
      -pod int
            Number of storage pods per datacenter
      -pool int
            Number of resource pools per compute resource
      -standalone-host int
            Number of standalone hosts (default 1)
      -vm int
            Number of virtual machines per resource pool (default 2)
    
  3. dougm commented on Oct 18, 2018

    @dougm
    Member

    @jakerobinson do the flags above provide what you need?

  4. github-actions commented on May 26, 2021

    @github-actions
    Contributor

    This issue is stale because it has been open for 90 days with no
    activity. It will automatically close after 30 more days of
    inactivity. Mark as fresh by adding the comment /remove-lifecycle stale.

  5. github-actions commented on Mar 17, 2025

    @github-actions
    Contributor

    I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

    If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

  6. locked as resolved and limited conversation to collaborators on Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions