Home > Storage > PowerStore > Virtualization and Cloud > Dell PowerStore and SUSE Rancher > Prepare a virtual machine template
For Rancher to automate the provisioning of Kubernetes nodes on vSphere, create a virtual machine template with a compatible Linux operating system for use during the provisioning process. For operating systems supported by RKE2, see the requirements on RKE2 Installation Requirements.
Start with creating a new virtual machine in vSphere. Install a RKE2 compatible Linux operating system that is supported by Rancher and the Kubernetes distribution.
Also include the requirements outlined in the previous section on RKE2 requirements.
Enable the specified repositories for additional software and receive future updates.
SUSEConnect -d -p sle-module-basesystem/15.4/x86_64
SUSEConnect -d -p sle-module-containers/15.4/x86_64
SUSEConnect -d -p sle-module-development-tools/15.4/x86_64
SUSEConnect -p sle-module-server-applications/15.4/x86_64
SUSEConnect -p sle-module-public-cloud/15.4/x86_64
zypper updates
Ensure that the cloud-init package is installed on the operating system and that both cloud-init and cloud-final services are activated. These crucial services allow Rancher and vSphere to customize the virtual machine during the provisioning process.
zypper install cloud-init
systemctl enable cloud-init
systemctl enable cloud-final
Before converting the virtual machine to a template, perform system clean up, including:
rm -rf /var/lib/wicked/*
echo /dev/null > /etc/machine-id
hostnamectl set-hostname localhost
cloud-init clean
When the server starts up, the DUID and machine-id identifiers are automatically regenerated with new values.
Rancher recommends specific operating system software packages, but these may vary depending on the Linux distribution you are using. Consult the documentation for your specific operating system to identify the appropriate packages.
For detailed information about preparing a virtual machine template for Rancher, see the official documentation at Linux virtual machine template preparation.