For many organizations, virtualization is a hot technology to deliver applications and desktops to users. After years of using virtualization, such as Xen/KVM and VMware, you may have a grip on your virtualization needs. However, being successful with virtualization isn’t enough. Your virtual environment needs to be managed appropriately to deliver a consistent user experience. This blog article will introduce you to the Red Hat virtualization platform. We’ll start with an overview of the platform and then dive into specific resources you can use to manage your virtual machines.

There are plenty of options out there for easily creating and deploying virtual machines using templates. This is great, especially for beginners who want to get their feet wet with virtualization before getting into the more complicated things like scripting or automating. However, it’s pretty easy to run into some trouble, especially if you try to do something that’s not supported.

Rapid deployment withmodels

A template is a copy of a pre-configured virtual machine that is used to facilitate the subsequent and repeatable creation of similar virtual machines. The templates capture the installed software, software configuration, and hardware configuration of the original virtual machine. If administrators need to deploy multiple (nearly) identical machines, it may make sense to use templates instead of multiple installations.

The template can be seen as a bit-for-bit copy of the original hard disk image and is very similar to creating a machine image with tools like Clonezilla or Ghost. As with an automatic installation like Kickstart, consistency is maintained across all machines, making management and troubleshooting easier.

If you are working with virtual machines, creating template-based machines can also help reduce memory usage. Since machines with the same model will be very similar, Kernel Same-page Merging (KSM) is more likely to find duplicate memory pages on these machines that can be merged into physical memory.

NOTESOne of the problems with using templates is ensuring that no identifying information such as user names is used. for example. references to MAC addresses or SSL certificates. as this can cause problems when deploying multiple machines from a single template. This process is called image sealing.


The following describes the steps required to create a template from an existing virtual machine:

1. Install a new virtual machine as the basis for the template.

2. Seal the image. This means that all information specific to the original virtual machine must be removed. This includes, for example, hardware information specific to the original virtual machine. B. MAC addresses, unique system configurations such as hostname and static IP addresses, and possibly logs and other data.

3. Stop the sealed virtual machine.

4. Create a template for a virtual machine through the administration portal.

5. Test the template by creating another virtual machine based on the new template.

NOTE: For Linux virtual machines, Red Hat Virtualisation can use virt-sysprep to compress the image while creating the template. Virtual machines running other operating systems must be sealed before the template is created.

To create a template, administrators must select the Virtual Machines tab, right-click on the virtual machine they want to use for the template, and then select Create Template from the menu. A dialog box as shown below will appear.

The following list describes the settings in the New Template window:

  • Name – The name of the model. It is listed on the Templates tab of the Administration Portal. It must be a unique name with any combination of upper and lower case letters, numbers, hyphens or underscores.
  • Description – Limited description of the model. This field is recommended but not required.
  • Comments – a field for adding textual, human readable comments to the model. For example, you can use it to explain the purpose or even the use of the model.
  • Cluster – The cluster to which the model is associated. By default, this is the same cluster as the original virtual machine. However, each cluster in the data center can be selected.
  • The CPU profile is an advanced feature that limits the CPU power a virtual machine can use on a host. There are no limitations in the default setting. Use the CPU profile to determine the maximum computing power that a virtual machine can access on its host. It is expressed as a percentage of the total computing power available on the host. For more information, see the Administration Guide.
  • Plate distribution –
    • Alias : The alias for the disk of the virtual machine used by the template. By default, the alias is set to the same value as the original virtual machine.
    • Virtual size : The current actual size of the virtual hard disk used by the model. This value cannot be changed and is given as an indication only.
    • Format: The size of the disks that the model should use. The QCOW2 format always implies that the disk has a thin destination. RAW in file-based storage implies thin provisioning, while RAW in block-based storage implies pre-allocation of virtual disks.
    • Objective: The storage domain where the virtual hard disk used by the model is stored. By default, the storage domain is set to the same value as the source virtual machine. Each storage domain in the cluster can be selected.
  • Allow all users access to this template – Specifies whether the template is public or private. The public template is accessible to all users, while the private template is only accessible to users with the TemplateAdmin or SuperUser role.
  • Copy virtual machine permissions – copies the permissions set on the source virtual machine to the template.
  • Seal template – seals the template with virt-sysprep. If you cannot use this option, you must manually seal the virtual machine’s image before using this window to create the template.

This procedure describes the steps required to create a sealed template from an existing Linux virtual machine:

  1. Select the appropriate virtual machine from the list of available virtual machines.
  2. Make sure the power to the virtual machine is turned off.
  3. With the virtual machine selected, press the Create Template button.
  4. Enter a name, description and comment for the template.
  5. Select the appropriate cluster for the model.
  6. If desired, select a CPU profile for the model, if available.
  7. Select the disk format, storage domain and disk profile. By default, they are identical to the original virtual machine.
  8. To make this template publicly available, check the Allow all users access to this template box.
  9. Select the Print template check box to automatically execute the print jobs for a Linux template.
  10. Press the OK button to create a template.

While creating a template, the status of the virtual machine is displayed as Image Locked. Creating a template can be time consuming, depending on the size and number of virtual hard drives and the underlying storage hardware. Once the template is complete, it is added to the Templates tab.

NOTE: Virtual machines not running Linux must be manually sealed and shut down before being used to create a template. The procedure depends on the operating system. For example, Microsoft Windows systems typically use Sysprep to print images for use in templates. Red Hat Virtualisation provides several files to help you with this process.

Using a template to create a new virtual machine

Once a virtual machine template is created, administrators can create new virtual machines using that template.

To create a new virtual machine based on an existing template

  1. Log into the administration portal and click on the Virtual Machines tab. Click the New VM button to open the New Virtual Machine window.
  2. Enter a name and description for the new virtual machine in this window. Select the appropriate template for the virtual machine from the Template drop-down menu.
  3. If the New Virtual Machine window is still open, check to see if you can see the advanced settings. Click Show additional settings if they are not displayed. Click on the Resource Allocation tab. In this tab, select the method for providing virtual hard disks for the new server. When provisioning is set to Thin, an overlay is used on the original model. If provisioning is set to Clone, the original template is cloned and the Format option becomes available to select (per disk) a Raw or QCOW2 image.
  4. Press OK to create a virtual machine. Wait until the status changes from Image Locked to Down before continuing.
  5. Start the new virtual machine by right-clicking on the Virtual Machines tab and selecting Start from the context menu.
  6. Open the console of the new virtual machine by right-clicking on it and selecting Console from the context menu.

red hat virtualization create templatevmware linux template best practicesred hat templateovirt templaterhv create templatesysprep rhel 7,People also search for,Privacy settings,How Search works,See more,red hat virtualization create template,vmware linux template best practices,ovirt template,rhv create template,sysprep rhel 7,create centos 7 template vmware,virt-sysprep

You May Also Like

How To Connect AirPods To Windows 10 PC

The wireless earbuds Apple announced at WWDC 2017 have been met with…

How To Fix Error 0x80240034 [Windows Updates Error] In Windows 10

Error 0240034 may occur when updating Windows 10 or viewing the update…

🥇 Login to Facebook Live  Step by Step Guide ▷ 2021

Live streaming has become a popular way to connect with viewers and…

An elegant manager to easily deal with UIPickerView

The UIPickerView is a very simple UIView that presents a list of…