Skip to content

vSphere OVF Template Batch Deployment in Practice: From Content Library to Production Virtual Machines ​

vSphere OVF Template Batch Deployment in Practice: Diagram from Content Library to Production Virtual Machines

Based on the uploaded Ubuntu 22.04 OVF template, rapidly deploy K8s nodes in batches; only the IP needs to be modified before they are ready for use.

In the previous article, we explained in detail how to clone a virtual machine into an OVF template and upload it to R2 object storage. Today, we will Hands-on demonstration of how to deploy a virtual machine from the content library, implement Deliver a fully configured Ubuntu server in 6-12 minutes.

This article will Import OVF into Content Library→Deploy virtual machine→Modify IP address→Verify SSH login Full-process demonstration, ultimately in kubernetes Successfully created in the resource pool k8s-infra-221 Node.

1. Import the OVF template into the content library ​

First, import the downloaded OVF template file into the vSphere content library for subsequent batch deployment.

1. Enter the content library import interface. ​

In the vSphere Client, go to the content library template, click Operation→Import Project:

Figure 1: Content Library Import Project Entry

2. Select a local OVF file ​

In the pop-up "Import Library Project" window:

Select source: Click Local file → Upload fileFigure 2 Import Library Project - Select Local File

Select local .ovf,.vmdk and .nvram File Figure 2 Import Library Project - Select Local File

3. Confirm import file list ​

After the upload is complete, the system will display the 3 files to be imported:

filenameDescription
ubuntu22.04-server-basic-template.ovfVM hardware configuration profile
ubuntu22.04-server-basic-template-1.vmdkVirtual disk file (2.36 GB)
ubuntu22.04-server-basic-template-2.nvramUEFI Firmware Settings

The project name is automatically identified as ubuntu22.04-server-basic-template, the target database is template:

Figure 3 Import Library Project - File List Confirmation

4. Monitor Import Tasks ​

After clicking “Import”, vCenter will perform file upload and project creation tasks in the background. In Task Console can be seen in:

Task NameStatusDescription
Upload the file to the library projectCompletedUpload OVF file to content library storage
Create library projectCompletedCreate a template project in the content library

The entire import process takes about 2-3 minutes(Depending on network bandwidth):

Figure 4 Import task execution status

5. Verify the import result ​

After the import is complete, go to the content library.template of OVF and OVA templates Tab, you can see the newly imported template:

  • Name:ubuntu22.04-server-basic-template

  • Type: OVF template

  • Size: 5.53 GB (thin provisioning format)

  • guest operating system: Ubuntu Linux (64-bit)

Figure 5 Template details after import

II. Create a Virtual Machine from a Content Library ​

After the template is imported successfully, you can deploy virtual machines from the content library. This demonstration will kubernetes Create in resource pool k8s-infra-221.

1. Enter the deployment entry point ​

at Hosts and clusters In the view, right-click the target resource pool (here is kubernetes), select Deploy OVF Template:

Figure 6 Resource Pool right-click menu - Deploy OVF Template

2. Select the creation type ​

Select Deploy from template, then click “Next Page”:

Figure 7 Select creation type

3. Select Template ​

In the template list, select the one we just imported ubuntu22.04-server-basic-template(located in the library template Middle):

Figure 8 Select OVF Template

4. Set name and location ​

Specify the virtual machine name and folder location:

  • Virtual machine name:k8s-infra-221(according to the cluster naming convention)

  • Location: Select Datacenter Root directory

Figure 9 Set the virtual machine name and folder

5. Choose computing resources ​

Select the target resource pool or host. This selection kubernetes Resource pool, compatibility check passed:

Figure 10 Select compute resources

6. View detailed information ​

This step displays the advanced configuration information of the OVF package:

Configuration itemvalue
PublisherCertificate does not exist (internal template, no signature)
DescriptionInstallation is based on the Ubuntu Server method.
Disk size60.0 GB (Thick Provision Lazy Zeroed)

Click "Next" to accept the advanced configuration options:

Figure 11 View OVF details

Attention If the prompt “Publisher certificate does not exist” appears, simply ignore it because this is an internally built template.

7. Key configuration: disk.EnableUUID = TRUE ​

In the OVF deployment wizard's View details In the steps, there is one that is easily overlooked but Extremely important advanced parameters of —disk.EnableUUID = TRUE.

What is this parameter for? ​

dimensionDescription
effectEnable the operating system in the virtual machine to Directly access the UUID of the physical disk, rather than the virtual identifier generated by the virtualization layer
default valueFALSE(vSphere is not enabled by default)
Scope of impactDisk identification, persistent storage, cluster failover

Why must it be set to TRUE? ​

在以下场景中,must Enable disk.EnableUUID = TRUE, otherwise it will cause serious problems:

SceneConsequences of not enabling it
K8s cluster + vSphere CSIPersistentVolume (PV) cannot be mounted correctly, and the Pod cannot use the vSphere storage class.
Physical to virtual (P2V) migrationThe migrated system may fail to correctly recognize the disk, causing boot failure.
Cross-host vMotionInconsistent disk identifiers may cause abnormal data access.
Applications that depend on disk UUIDsFor example, Oracle ASM and some database clusters will report errors due to UUID changes.

Configuration of this template ​

In this deployment,disk.EnableUUID = TRUE It has been included in the OVF template as an advanced configuration option and will be automatically applied during deployment:

disk.EnableUUID = TRUE

You can in the OVF deployment wizard's View details On the page, scroll through the advanced configuration list to confirm that this parameter is included:

Figure 11.5 View OVF advanced configuration - disk.EnableUUID

Verification method: After the virtual machine deployment is complete, log in to the system via SSH and execute ls -l /dev/disk/by-id/, if you can see something similar scsi-36000c29... disk identifier, it indicates that the UUID feature is in effect.

Best practice recommendations ​

SuggestionDescription
Preconfigured during template creationBefore creating an OVF template, add in the "Advanced Parameters" of the source virtual machine disk.EnableUUID = TRUE, all VMs subsequently deployed based on this template will automatically inherit
Manually add deployed VMEdit Virtual Machine Settings → Virtual Machine Options → Advanced → Configuration Parameters → Add Parameter disk.EnableUUID = TRUE, requires restarting the VM to take effect

8. Select Storage ​

Select the storage location and format of the virtual disk:

configuration itemThis selection
Data storageNVMe_2TB_Storage(High-performance storage)
Virtual disk formatThick Provision Lazy Zeroed(Recommended for production environments)

Figure 12 Select storage

About disk format selection:

  • Thick Provision Lazy Zeroed: Preallocate all space, best performance, suitable for production environments

  • Thin provisioning: On-demand allocation, saves storage space, suitable for Homelab

9. Select Network ​

Configure network mapping, source network VM Network Map to the target network VM Network:

  • IP allocation: Static - Manual (configure later inside the VM)

  • IP protocol: IPv4

Figure 13 Select Network

10. Confirm configuration and complete ​

Last step: check all configuration items, and after confirming everything is correct, click Complete:

Configuration itemvalue
Namek8s-infra-221
templateubuntu22.04-server-basic-template
computing resourceskubernetes
storageNVMe_2TB_Storage(Thick Provision Lazy Zeroed)
networkVM Network

Figure 14 Confirm configuration

11. Monitoring deployment task ​

After clicking "Finish", vCenter will run the deployment task in the background. In Mission Console can be seen in:

Task NameStatusDescription
Deploy an OVF software package from a content library to a resource poolCompletedMain deployment task
Deploy OVF templateCompletedOVF instantiation
Transfer filesCompletedTransfer disk files to the target storage

The entire deployment process takes approximately 2-3 minutes:

Figure 15 Deployment Task Console

III. Verify deployment results ​

After deployment is complete, you can see the newly created virtual machine in the resource pool.k8s-infra-221, status is Power has been turned off:

Figure 16 Turn on the power

1. Start the virtual machine ​

Right-click k8s-infra-221 You are an expert technical translator. Translate the following text into en. IMPORTANT: Translate ALL Chinese characters to English. If the text contains Chinese, you MUST translate it. If the text is already in en, output it EXACTLY as it is. Output ONLY the translated text, no quotes, no explanations.Power supply→Turn on the power or click Turn on the power button. After startup, the status changes to Power has been turned on:

Figure 16 Turn on the power

2. Log in to the console to confirm ​

On the virtual machine details page, click Start WEB Console

Figure 17 Start WEB Console

Use default credentials root/fishfinal Log in to the system

Figure 18 VM Console Login

After logging in, you can see:

  • System version: Ubuntu 22.04.5 LTS

  • Kernel version: 5.15.0-187-generic

  • IPv4 address: 192.168.0.220 (template default IP)

3. Verify preconfiguration ​

Execute ifconfig Confirm network configuration:

Figure 19 Verify network configuration

IV. Modify the Static IP Address ​

The default IP of the template is 192.168.0.220, If multiple virtual machines are to be deployed on the same network, the IP must be changed to avoid conflicts.

1. Edit the netplan configuration file ​

bash
vim /etc/netplan/00-installer-config.yaml

will addresses the IP in from 192.168.0.220/24 Change to 192.168.0.221/24:

Figure 20 Modify the netplan configuration file

2. Apply network configuration ​

bash
netplan apply

Figure 21 Application Network Configuration

3. Verify the new IP ​

Execute ifconfig Confirm that the IP has been changed to 192.168.0.221:

Figure 22 Verify new IP

5. Verify SSH remote login ​

SSH from the local machine to the new virtual machine to verify that remote access is working:

Enter password fishfinal Successfully logged in:

Figure 23 SSH remote login authentication

At this point,The complete process for batch deploying Ubuntu 22.04 virtual machines from an OVF template has been fully verified and passed.!🎉

VI. Summary of the Advantages of Batch Deployment ​

Comparison dimensionsClean installOVF template deployment
Time-consuming50-70 minutes6-12 minutes
Manual interventionA large amount of manual configurationOnly need to modify IP
ConsistencyEasily leads to environmental differences100% consistent
Batch capabilityInstall one by oneParallel batch deployment
PreconfigurationNoneroot/SSH/software packages/aliases all pre-installed

VII. Recommendations for Next Steps ​

Serial numberSuggested actionsDescription
1Change the default passwordpasswd root Change the default password
2Create a regular userFor production environments, it is recommended to use a non-root user for operations.
3Configure SSH keyDisable password login and switch to key authentication to improve security.
4Create snapshotCreate a snapshot after deployment is complete as the new baseline.
5Join the K8s clusterExecute according to cluster requirements kubeadm join

Conclusion ​

Through the practical demonstration in this article, you have mastered Quickly deploy virtual machines from content library OVF templates The complete process of:

  • ✅ Import OVF template into content library

  • ✅ Deploy a virtual machine from the content library

  • ✅ Start and verify preconfiguration

  • ✅ Modify static IP address

  • ✅ SSH Remote Login Verification

This process allows Bulk deploying Ubuntu 22.04 nodes has become as easy as copy and paste., whether it’s K8s cluster scaling, development environment setup, or rapid Homelab rebuild, all can be done in Complete delivery within 10 minutes..

Related Reading Recommendations:

最后更新2026/11/07 14:16
如果你觉得这篇文章有帮助,或者想聊聊技术、工作,欢迎通过下面方式联系我:
contact fishfinal