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

# Create a VCH on the target system

`POST /target/{target}/datacenter/{datacenter}/vch`

A `POST` request on `/vch` under a datacenter will create a VCH in that datacenter. Information about the VCH will be provided in the body of the request. A portion of the request, including validation, will occur synchronously, with any errors being returned using an appropriate response code and status. The rest of the operation will proceed asynchronously. If present, the returned task can be used to track the progress and status of that asynchronous work.

## Path parameters

- `target` string, required
- `datacenter` 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
    - `affinity` object
      - `use_vm_group` boolean
  - `network` object
    - `bridge` object
      - `ip_range` string — A range of IP addresses in CIDR notation (like 192.0.2.0/24).
      - `network_width` integer
      - `port_group` ManagedObject
        - `id` string
        - `name` string
    - `client` Network
      - `port_group` ManagedObject
        - `id` string
        - `name` string
      - `gateway` Gateway
        - `routing_destinations` CIDR[]
        - `address` string, ipv4 — TODO: see if this can just be a string with a format that captures IPv4 and IPv6?
      - `nameservers` IPAddress[]
      - `static` string — A range of IP addresses in CIDR notation (like 192.0.2.0/24).
    - `management` Network
      - `port_group` ManagedObject
        - `id` string
        - `name` string
      - `gateway` Gateway
        - `routing_destinations` CIDR[]
        - `address` string, ipv4 — TODO: see if this can just be a string with a format that captures IPv4 and IPv6?
      - `nameservers` IPAddress[]
      - `static` string — A range of IP addresses in CIDR notation (like 192.0.2.0/24).
    - `public` Network
      - `port_group` ManagedObject
        - `id` string
        - `name` string
      - `gateway` Gateway
        - `routing_destinations` CIDR[]
        - `address` string, ipv4 — TODO: see if this can just be a string with a format that captures IPv4 and IPv6?
      - `nameservers` IPAddress[]
      - `static` string — A range of IP addresses in CIDR notation (like 192.0.2.0/24).
    - `container` ContainerNetwork[]
      - `alias` string
      - `firewall` 'closed' | 'outbound' | 'peers' | 'published' | 'open'
      - `nameservers` IPAddress[]
      - `port_group` ManagedObject
        - `id` string
        - `name` string
      - `gateway` Gateway
        - `routing_destinations` CIDR[]
        - `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` ValueBytesMetric
      - `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
      - `grant_permissions` boolean
  - `registry` object
    - `insecure` string[]
    - `whitelist` string[]
    - `certificate_authorities` X509Data[]
      - `pem` string
    - `image_fetch_proxy` object
      - `http` string, uri
      - `https` string, uri
      - `no_proxy` string[]
  - `runtime` object
    - `power_state` string
    - `upgrade_status` string
    - `admin_portal` string
    - `docker_host` string
  - `syslog_addr` string, uri
  - `container` object
    - `name_convention` string

## Response `201`

A vSphere task for work that is occurring asynchronously, or null if the operation is complete.

- object
  - `task` string, uri

## Other responses

- `default` — An error occurred

---

[API](https://skmtc.net/vmware/apis/vic-machine-api.md) · [All operations](https://skmtc.net/vmware/apis/vic-machine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vmware/vic-machine-api/versions/022f4170e516/schema)
