---
title: "Create a VCH on the target system"
method: POST
path: "/target/{target}/vch"
---

# Create a VCH on the target system

`POST /target/{target}/vch`

Making a `POST` request on `/vch` under a target will create a VCH on that target. Information about the VCH will be provided in the body of the request. Note that validation of the request will occur synchronously, with any errors being returned using an appropriate response code and status. The rest of creation will proceed asynchronously, with errors being reported via a vSphere task that is returned once the synchronous validation is complete.

## Path parameters

- `target` string, required

## Query parameters

- `thumbprint` string

## Request body

- VCH
  - `version` string
  - `name` string
  - `debug` integer
  - `compute` object
    - `cpu` object
      - `limit` ValueHertz
        - `units` string
        - `value` integer
      - `reservation` ValueHertz
        - `units` string
        - `value` integer
      - `shares` Shares
        - `number` integer
        - `level` 'high' | 'normal' | 'low'
    - `memory` object
      - `limit` ValueBytes
        - `units` string
        - `value` integer
      - `reservation` ValueBytes
        - `units` string
        - `value` integer
      - `shares` Shares
        - `number` integer
        - `level` 'high' | 'normal' | 'low'
    - `resource` ManagedObject
      - `id` string
      - `name` string
  - `network` object
    - `bridge` object
      - `ip_range` string
      - `port_group` ManagedObject
        - `id` string
        - `name` string
    - `client` Network
      - `port_group` ManagedObject
        - `id` string
        - `name` string
      - `gateway` Gateway
        - `routing_destinations` IPRange[]
        - `address` string, ipv4 — TODO: see if this can just be a string with a format that captures IPv4 and IPv6?
      - `nameservers` IPAddress[]
      - `static` NetworkAddress — TODO: see if this can just be a string with a format that captures IPv4, IPv6, and FQDNs?
        - `ip` string, ipv4 — TODO: see if this can just be a string with a format that captures IPv4 and IPv6?
        - `hostname` string, hostname
    - `management` Network
      - `port_group` ManagedObject
        - `id` string
        - `name` string
      - `gateway` Gateway
        - `routing_destinations` IPRange[]
        - `address` string, ipv4 — TODO: see if this can just be a string with a format that captures IPv4 and IPv6?
      - `nameservers` IPAddress[]
      - `static` NetworkAddress — TODO: see if this can just be a string with a format that captures IPv4, IPv6, and FQDNs?
        - `ip` string, ipv4 — TODO: see if this can just be a string with a format that captures IPv4 and IPv6?
        - `hostname` string, hostname
    - `public` Network
      - `port_group` ManagedObject
        - `id` string
        - `name` string
      - `gateway` Gateway
        - `routing_destinations` IPRange[]
        - `address` string, ipv4 — TODO: see if this can just be a string with a format that captures IPv4 and IPv6?
      - `nameservers` IPAddress[]
      - `static` NetworkAddress — TODO: see if this can just be a string with a format that captures IPv4, IPv6, and FQDNs?
        - `ip` string, ipv4 — TODO: see if this can just be a string with a format that captures IPv4 and IPv6?
        - `hostname` string, hostname
    - `container` ContainerNetwork[]
      - `alias` string
      - `nameservers` IPAddress[]
      - `port_group` ManagedObject
        - `id` string
        - `name` string
      - `gateway` Gateway
        - `routing_destinations` IPRange[]
        - `address` string, ipv4 — TODO: see if this can just be a string with a format that captures IPv4 and IPv6?
      - `ip_ranges` IPRange[]
  - `storage` object
    - `image_stores` string[]
    - `volume_stores` object[]
      - `datastore` string
      - `label` string
    - `base_image_size` ValueBytes
      - `units` string
      - `value` integer
  - `auth` object — Either `no_tls` or both `client` and `server` must be present.
    - `no_tls` boolean
    - `client` object
      - `no_tls_verify` boolean
      - `certificate_authorities` X509Data[]
        - `pem` string
    - `server` object — Either `generate` or both `certificate` and `private_key` must be provided when creating a VCH. Only `certificate` will be present when retrieving a VCH.
      - `certificate` X509Data
        - `pem` string
      - `private_key` X509Data
        - `pem` string
      - `generate` object
        - `size` ValueBits
          - `units` string
          - `value` integer
        - `organization` string[]
        - `cname` string
  - `endpoint` object
    - `memory` ValueBytes
      - `units` string
      - `value` integer
    - `cpu` object
      - `sockets` integer
    - `operations_credentials` object
      - `password` string, password
      - `user` string
  - `registry` object
    - `insecure` string[]
    - `whitelist` string[]
    - `blacklist` string[]
    - `certificate_authorities` X509Data[]
      - `pem` string
    - `image_fetch_proxy` object
      - `http` string, uri
      - `https` string, uri
  - `runtime` object
    - `power_state` string
    - `upgrade_status` string
    - `admin_portal` string
    - `docker_host` string

## Response `201`

A vSphere task

- object
  - `task` string, uri

## Other responses

- `default` — An error occurred

---

[API](https://skmtc.dev/vmware/apis/vic-machine-api.md) · [All operations](https://skmtc.dev/vmware/apis/vic-machine-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vmware/vic-machine-api/revisions/7feec05f8a24/schema)
