One of the benifits of virtualization is using VM templates to create quick and fast multiple VMs from single template.
VMware provides you easy option to convert any VM to template and deploy VMs from the templates, Hyper-V provides with SCVMM.
But Nutanix AHV its easier with integrated Image management if you know how to.. so…
- Create a VM in AHV
- Install Nutanix VirtIO
- Customize the OS or configure.
- Shutdown the VM
To add the VM disk image to Image service, login to any of CVMs and use any below methods,
acli image.create TEMPLATE_Name clone_from_vmdisk=vm:MASTER_VM_NAME:ide.1
TEMPLATE_Name is as it should be displayed in AHV Image Configuration,
MASTER_VM_NAME is name of VM, template to be created from, followed by disk type and disk id e.g. ide.1 or scsi.0
Now you can create VM and use clone from AHV Image configuration.
Use below commands to get VM disk UUID
acli vm.get MASTER_VM_NAME
and look for UUID in the output as below for appropriate disk and disk type.
To create image use below command:
image.create TEMPLATE_Name clone_from_vmdisk=fae801fc-d24d-4909-9b32-be844ddc4b74 image_type=kDiskImage
TEMPLATE_Name is as it should be displayed in AHV Image Configuration, and UUID from above commands.
Use Clone from Image Service when you create VMs using disk which are added to Image Configuration.
If the cluster is registered to Prism Central the Image Service is read only mode on Prism Element (on CVMs), in that case use the Prism Central Web Console to create image to Image Configuration from file with speficing file path as below
The path acromyns are self-explainatory
NOTE : In order to avoid issue with time reverting to UTC timezone after VM power cycle use below settings.
For Windows Operating Systems
Configure the “RealTimeIsUniversal” registry key in the Windows guest OS (this should be the preferred method):
a. Open regedit
b. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
c. Create a new 32-bit DWORD. You can right-click white area and select New –> DWORD (32-bit Value)
d. Give the key the name RealTimeIsUniversal
e. Double-click on it and set the value to 1
Or in the command prompt with administrative right and run the following command:
reg add “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation” /v RealTimeIsUniversal /d 1 /t REG_DWORD /f
For Linux Operating Systems
If the UTC line in /etc/adjtime reads LOCAL, the hwclock command and the date command will display a difference in time. The timezone is reflected correctly, but since the /etc/adjtime file has been set to LOCAL, it is padding the local time as if the timezone was still set to UTC.
- Use the cat command to check the /etc/adjtime file and verify that it says UTC instead of LOCAL. If it does not, use an editor of your choice and edit the file to read UTC.
- Shutdown the VM and boot it back up.
- Issue the command hwclock
- Issue the command date
- Confirm the values align.
Please do comment if any changes to this post are required are for further suggestions.