In this blog, we showing you Creating Windows Template CloudStack for windows 2012, 2012R2 & Windows 2016.
Creating Windows Template for CloudStack (Step by Step instructions)
Prerequisites for Creating Windows Template CloudStack
- Install a new VM (any version of windows) in cloud stack.
- Install all the recommended updates through windows updates snap-in.
- Then download Cloud Instance Manager from the below URL and install with default settings
This tool generates the administrator password automatically for cloud stack VM’s.
GENERATING UNATTEND FILE USING WINDOWS SYSTEM IMAGE MANAGER
- To create an unattended answer file, download and install the windows assessment and deployment Kit (WDK) from Microsoft site to your local PC
- Make sure you have selected the below list of components during installation.
UPLOADING WINDOWS IMAGE IN ADK
- Under Windows Image section, right click and select windows image.
- Locate the install.wim file in the \sources directory of the install media. Click Open. Another way is to extract the install.wim file from the windows image or install media to your local drive.
- Select the appropriate windows version from the pop-up screen and click OK.
- It will generate the catalog file using install.wim and it will take few minutes to complete.
- Windows components will display once the image mounted in WSIM.
ANSWER FILE CREATION
- Click on File and select new answer file.
- Once you add all the components in the answer file, it will look like below.
- Now save the answer file as unattend.xml using file menu.
GENERALIZE THE OS
- Now copy the XML file to the corresponding server to convert as a template.
- Go to C:\Windows\System32\Sysprep folder and copy the unattend.xml into that folder.
- Go to command prompt and change the directory path to c:\windows\system32\sysprep and execute the below command.
Sysprep /oobe /generalize /unattend:unattend.xml /shutdown
- Once you execute the command, sysprep will generalize the OS based on the answer file.
- After the completion, the server will be shutdown automatically.
CREATING WINDOWS TEMPLATE FROM CLOUDSTACK
- Now login into cloud stack and click on the server instances.
- Click on View Volumes.
- Now click on Quick view and select create template option.
- From the pop-up screen, provide the Template Name, Description, OS type, with public, password enabled and featured option enabled. Then click OK.
- You can see the template creation process in the cloud stack notification area.
- Once it’s complete the template is ready for the VM deployment.