Skip to content

Latest commit

 

History

History
90 lines (87 loc) · 4.13 KB

windows-machineset-vsphere.adoc

File metadata and controls

90 lines (87 loc) · 4.13 KB

Sample YAML for a Windows MachineSet object on vSphere

This sample YAML defines a Windows MachineSet object running on VMware vSphere that the Windows Machine Config Operator (WMCO) can react upon.

apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
  labels:
    machine.openshift.io/cluster-api-cluster: <infrastructure_id> (1)
  name: <windows_machine_set_name> (2)
  namespace: openshift-machine-api
spec:
  replicas: 1
  selector:
    matchLabels:
      machine.openshift.io/cluster-api-cluster: <infrastructure_id> (1)
      machine.openshift.io/cluster-api-machineset: <windows_machine_set_name> (2)
  template:
    metadata:
      labels:
        machine.openshift.io/cluster-api-cluster: <infrastructure_id> (1)
        machine.openshift.io/cluster-api-machine-role: worker
        machine.openshift.io/cluster-api-machine-type: worker
        machine.openshift.io/cluster-api-machineset: <windows_machine_set_name> (2)
        machine.openshift.io/os-id: Windows (3)
    spec:
      metadata:
        labels:
          node-role.kubernetes.io/worker: "" (4)
      providerSpec:
        value:
          apiVersion: machine.openshift.io/v1beta1
          credentialsSecret:
            name: vsphere-cloud-credentials
          diskGiB: 128 (5)
          kind: VSphereMachineProviderSpec
          memoryMiB: 16384
          network:
            devices:
            - networkName: "<vm_network_name>" (6)
          numCPUs: 4
          numCoresPerSocket: 1
          snapshot: ""
          template: <windows_vm_template_name> (7)
          userDataSecret:
            name: windows-user-data (8)
          workspace:
             datacenter: <vcenter_data_center_name> (9)
             datastore: <vcenter_datastore_name> (10)
             folder: <vcenter_vm_folder_path> (11)
             resourcePool: <vsphere_resource_pool> (12)
             server: <vcenter_server_ip> (13)
  1. Specify the infrastructure ID that is based on the cluster ID that you set when you provisioned the cluster. You can obtain the infrastructure ID by running the following command:

    $ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster
  2. Specify the Windows compute machine set name. The compute machine set name cannot be more than 9 characters long, due to the way machine names are generated in vSphere.

  3. Configure the compute machine set as a Windows machine.

  4. Configure the Windows node as a compute machine.

  5. Specify the size of the vSphere Virtual Machine Disk (VMDK).

    Note

    This parameter does not set the size of the Windows partition. You can resize the Windows partition by using the unattend.xml file or by creating the vSphere Windows virtual machine (VM) golden image with the required disk size.

  6. Specify the vSphere VM network to deploy the compute machine set to. This VM network must be where other Linux compute machines reside in the cluster.

  7. Specify the full path of the Windows vSphere VM template to use, such as golden-images/windows-server-template. The name must be unique.

    Important

    Do not specify the original VM template. The VM template must remain off and must be cloned for new Windows machines. Starting the VM template configures the VM template as a VM on the platform, which prevents it from being used as a template that compute machine sets can apply configurations to.

  8. The windows-user-data is created by the WMCO when the first Windows machine is configured. After that, the windows-user-data is available for all subsequent compute machine sets to consume.

  9. Specify the vCenter data center to deploy the compute machine set on.

  10. Specify the vCenter datastore to deploy the compute machine set on.

  11. Specify the path to the vSphere VM folder in vCenter, such as /dc1/vm/user-inst-5ddjd.

  12. Optional: Specify the vSphere resource pool for your Windows VMs.

  13. Specify the vCenter server IP or fully qualified domain name.