Vminit is a component that runs configuration tasks, such as performing network configurations, setting hostnames, and executing custom scripts, to initialize the configurations of a Windows Elastic Compute Service (ECS) instance. If Vminit is not installed on a custom image that you created, install Vminit on the image to ensure that the configurations of ECS instances that use the image can be initialized. This topic describes how to install Vminit on a Windows virtual machine based on which you want to create an image.
For more information about Vminit, see Windows instance (Vminit).
Limits
The operations that are described in this topic are suitable for the following Windows operating system versions: Windows 7 and later 32-bit, Windows 7 and later 64-bit, Windows Server 2008 R2 and later 32-bit, and Windows Server 2008 R2 and later 64-bit.
Procedure
Vminit versions may change. In the following example, Vminit version 2.0.1.2 whose installation program is named AliyunVminit_2.0.1.2_x86_64.exe is downloaded and installed. For information about Vminit versions, see Windows instance (Vminit).
Download the Vminit installation package to the virtual machine based on which you want to create an image and decompress the installation package.
Click AliyunVminit.zip to download the Vminit installation package.
Install Vminit.
Install Vminit by using the GUI-based installation program
Find and double-click
AliyunVminit_2.0.1.2_x86_64.exe
in the directory to which you downloaded the Vminit installation package.Install Vminit as prompted.
Click Finish on the page shown in the following figure to complete the Vminit installation.
Install Vminit by using CLI
Run the following command in Windows PowerShell to switch to the directory to which you downloaded the Vminit installation package. Example directory:
C:\test
.cd C:\test
Run the following command to install Vminit:
.\AliyunVminit_2.0.1.2_x86_64.exe /SILENT /FORCE
Note/SILENT
: installs Vminit in silent mode./FORCE
: installs Vminit in force mode and force-overwrites existing Vminit settings.
Check whether Vminit is installed.
Run the following command in Windows PowerShell to query the Vminit version number:
(Get-Item C:\ProgramData\aliyun\vminit\vminit.exe).VersionInfo.ProductVersion
The following command output is returned, which includes a Vminit version number and indicates that Vminit is installed.
Run the following command to obtain the registry configurations of Vminit:
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\vminit"
The following command output indicates that Vminit is installed.
After you perform the preceding operations and verify that Vminit is installed, you can import the images that are created based on the virtual machine to Alibaba Cloud.
References
When Vminit is installed, all Vminit plug-ins are automatically enabled. If you want to create an ECS instance from an imported custom image and prevent Vminit from performing specific operations during instance boot, you can disable specific plug-ins when you create the image. For more information, see the Customize the initialization capabilities of Vminit section of the "Vminit component" topic.
After you install Vminit on a Windows virtual machine based on which you want to create an image, you may need to install the virtio driver on the virtual machine. This way, you can ensure that after an image is created based on the virtual machine, imported to Alibaba Cloud, and used to create ECS instances, the instances can properly recognize virtio virtualization devices and start as expected.
Linux ECS instances use cloud-init to initialize configurations. For more information, see Install cloud-init.