Creating Linux Templates for SCVMM 2012 SP1 (GA)
Configuring a VHD
Configuring a VHD for use in a Linux VM template involves the following steps:
Create a virtual machine (or use an existing one) and install your Linux operating system. For more information, see Creating a VM Template.
You cannot create a template directly from the Virtual machine. You have to store the template in the library and then use the VHDX to create a linux template. This process is different from creating templates for Windows OS.
- Install or update the latest Hyper-V Linux Integration Services. For more information, see Installing the Hyper-V Linux Integration Services.
- Install the VMM Agent for Linux - the VMM Agent for Linux is a small agent that receives incoming configuration from VMM and applies the OS configuration. Following a successful VM deployment, the agent removes itself. For more information, see Installing the VMM Agent for Linux.
- To make this prepared VHD available for templates, shut down the VM, and copy the VM to a VMM Library share and refresh the VMM Library.
Creating a VM Template
The steps to create a VM Template are:
- In the Library pane of the VMM console, launch Create VM Template
- Select Use an existing VM template or virtual hard disk stored in the library, click Browse, and select your template VHD.
- Provide a name for the VM template and click Next.
- Select an existing hardware profile, or configure a new one. The Hardware Profile configuration is common to both Windows and Linux Virtual Machines. Click Next.
- On the Configure Operation System page, select Create new Linux operating system customization settings. Alternatively, you can create a Linux OS Profile before launching the VM template wizard and select it here.
Installing the Hyper-V Linux Integration Services
Please download the installer from: http://www.microsoft.com/en-us/download/details.aspx?id=34603
To install Linux Integration Services Version 3.4:
- Open Hyper-V Manager: Click Start, point to Administrative Tools, and then click Hyper-V Manager.
- Create a new virtual machine where you will install Linux: In the Actions menu, click New, and then click Virtual Machine.
- Specify the Linux installation media: Right-click the virtual machine that you created, and then click Settings. In IDE Controller, specify one of the following:
- An image file in ISO format that contains the files required for installation
- A physical CD/DVD drive that contains the installation media
- Turn on the virtual machine: Right-click the virtual machine that you created, and then click Connect.
- Begin installing Linux.
When prompted, restart the virtual machine and complete any first-boot configuration tasks.
Unless a legacy network adapter was added during the virtual machine's initial configuration, the virtual machine will not have any network support.
- Log on to the virtual machine.
- In Hyper-V Manager, configure LinuxICv34.ISO (located in the directory where you extracted the downloaded files) as a virtual CD/DVD drive on the virtualmachine.
Once configured, the LinuxICv34.ISO should appear mounted under /media/CDROM if automount is enabled.
If automount is not enabled, use the following command to mount the ISO file:
# mount /dev/cdrom/media
- As the root user, change to the directory relevant to your distribution: and run the command:
Installing the VMM Agent for Linux
- On the VMM management server, open a command prompt session, with administrative rights.
- Go to the C:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\agents\Linux folder.
- Copy all the agent installation files from that folder to a new folder on the virtual machine, and then, on the virtual machine on which Linux is running as a guest operating system, open the new folder.
- Run the following command:
chmod +x install
Run either of the following commands, as appropriate:
This is the only process with which templates can be created. Currently the following two options are not allowed.
- Template creation via Virtual Machine for Redhat
- Template creation using VHD,
If we select the option of "do not customize" the OS type for VM will be seen as Others.