VMware vSphere Node Template Configuration
Account Access
Parameter | Required | Description |
---|---|---|
Cloud Credentials | * | Your vSphere account access information, stored in a cloud credential. |
Your cloud credential has these fields:
Credential Field | Description |
---|---|
vCenter or ESXi Server | Enter the vCenter or ESXi hostname/IP. ESXi is the virtualization platform where you create and run virtual machines and virtual appliances. vCenter Server is the service through which you manage multiple hosts connected in a network and pool host resources. |
Port | Optional: configure configure the port of the vCenter or ESXi server. |
Username and password | Enter your vSphere login username and password. |
Scheduling
Choose what hypervisor the virtual machine will be scheduled to.
The fields in the Scheduling section should auto-populate with the data center and other scheduling options that are available to you in vSphere.
Field | Required | Explanation |
---|---|---|
Data Center | * | Choose the name/path of the data center where the VM will be scheduled. |
Resource Pool | Name of the resource pool to schedule the VMs in. Resource pools can be used to partition available CPU and memory resources of a standalone host or cluster, and they can also be nested. Leave blank for standalone ESXi. If not specified, the default resource pool is used. | |
Data Store | * | If you have a data store cluster, you can toggle the Data Store field. This lets you select a data store cluster where your VM will be scheduled to. If the field is not toggled, you can select an individual disk. |
Folder | Name of a folder in the datacenter to create the VMs in. Must already exist. The VM folders in this dropdown menu directly correspond to your VM folders in vSphere. The folder name should be prefaced with vm/ in your vSphere config file. | |
Host | The IP of the host system to schedule VMs in. Leave this field blank for a standalone ESXi or for a cluster with DRS (Distributed Resource Scheduler). If specified, the host system's pool will be used and the Resource Pool parameter will be ignored. | |
Graceful Shutdown Timeout | The amount of time, in seconds, that Rancher waits before deleting virtual machines on a cluster. If set to 0 , graceful shutdown is disabled. Only accepts integer values. |
Instance Options
In the Instance Options section, configure the number of vCPUs, memory, and disk size for the VMs created by this template.
Parameter | Required | Description |
---|---|---|
CPUs | * | Number of vCPUS to assign to VMs. |
Memory | * | Amount of memory to assign to VMs. |
Disk | * | Size of the disk (in MB) to attach to the VMs. |
Creation method | * | The method for setting up an operating system on the node. The operating system can be installed from an ISO or from a VM template. Depending on the creation method, you will also have to specify a VM template, content library, existing VM, or ISO. For more information on creation methods, refer to About VM Creation Methods. |
Cloud Init | URL of a cloud-config.yml file or URL to provision VMs with. This file allows further customization of the operating system, such as network configuration, DNS servers, or system daemons. The operating system must support cloud-init . | |
Networks | Name(s) of the network to attach the VM to. | |
Configuration Parameters used for guestinfo | Additional configuration parameters for the VMs. These correspond to the Advanced Settings in the vSphere console. Example use cases include providing RancherOS guestinfo parameters or enabling disk UUIDs for the VMs (disk.EnableUUID=TRUE ). |
About VM Creation Methods
In the Creation method field, configure the method used to provision VMs in vSphere. Available options include creating VMs that boot from a RancherOS ISO or creating VMs by cloning from an existing virtual machine or VM template.
The existing VM or template may use any modern Linux operating system that is configured with support for cloud-init using the NoCloud datasource.
Choose the way that the VM will be created:
- Deploy from template: Data Center: Choose a VM template that exists in the data center that you selected.
- Deploy from template: Content Library: First, select the Content Library that contains your template, then select the template from the populated list Library templates.
- Clone an existing virtual machine: In the Virtual machine field, choose an existing VM that the new VM will be cloned from.
- Install from boot2docker ISO: Ensure that the OS ISO URL field contains the URL of a VMware ISO release for RancherOS (
rancheros-vmware.iso
). Note that this URL must be accessible from the nodes running your Rancher server installation.
Networks
The node template now allows a VM to be provisioned with multiple networks. In the Networks field, you can now click Add Network to add any networks available to you in vSphere.
Node Tags and Custom Attributes
Tags allow you to attach metadata to objects in the vSphere inventory to make it easier to sort and search for these objects.
For tags, all your vSphere tags will show up as options to select from in your node template.
In the custom attributes, Rancher will let you select all the custom attributes you have already set up in vSphere. The custom attributes are keys and you can enter values for each one.
Custom attributes are a legacy feature that will eventually be removed from vSphere.
cloud-init
Cloud-init allows you to initialize your nodes by applying configuration on the first boot. This may involve things such as creating users, authorizing SSH keys or setting up the network.
To make use of cloud-init initialization, create a cloud config file using valid YAML syntax and paste the file content in the the Cloud Init field. Refer to the cloud-init documentation. for a commented set of examples of supported cloud config directives.
Note that cloud-init is not supported when using the ISO creation method.
Engine Options
In the Engine Options section of the node template, you can configure the container daemon. You may want to specify the container version or a container image registry mirror.
If you're provisioning Red Hat Enterprise Linux (RHEL) or CentOS nodes, leave the Docker Install URL field as the default value, or select none. This will bypass a check for Docker installation, as Docker is already installed on these node types.
If you set Docker Install URL to a value other than the default or none, you might see an error message such as the following: Error creating machine: RHEL ssh command error: command: sudo -E yum install -y curl err: exit status 1 output: Updating Subscription Management repositories.