Page tree
Skip to end of metadata
Go to start of metadata

Use the following instructions to create Virtual Machine Templates that you can use for Guest Customization of Virtual Machines on the System Center Virtual Machine Manager (SCVMM) for Microsoft Hyper-V.

Note

BMC Server Automation version 8.6 supports only Generation 1 Hyper-V templates from Microsoft.
BMC Server Automation version 8.7
supports both Generation 1 and Generation 2 hyper-V templates.

The exact instructions depend on the operating system; instructions are provided for templates for Windows 2003, Windows 2008 and Windows 2012, and Red Hat Enterprise Linux.

Creating templates on SCVMM for Windows 2003 (x86 and x64)

  1. On the SCVMM Admin Console, create a new Virtual Machine and install Windows 2003 on it.
  2. Set the Guest OS of the VM to Windows 2003.
    Depending upon your installation, select 32-bit or 64-bit.
  3. Install Virtual Guest Services (Microsoft Tools) on the VM, after ensuring that your Windows 2003 is patched with at least SP2.
  4. From the OS Installation disk, extract the files in Support/Tools/Deploy.cab, and copy the extracted files to the newly created VM to the following folder: C:\winsysprep
  5. Within the VM, open a command prompt and browse to the C:\winsysprep directory.
  6. Run the following command: sysprep.exe /reseal /quiet /shutdown

    Note

    Ensure that you run the Sysprep Shutdown command with the shutdown keyword and not the reboot keyword. Once the VM shuts down automatically, do not start it up. Convert it directly to a Template.

    The VM reboots and undergoes sysprep and will ultimately shut down.

  7. Right click on the VM and select Properties. Ensure that there are no floppy disks or DVDs connected to VM.
  8. Right click the VM and select New Template.
    During the process, do not make any hardware changes to the VM.
  9. During the Template creation process, a panel for Guest Customization appears.
    From the drop down menu, select the Customization not requiredoption.

    Note

    Choosing any option other than Customization not Required during template creation will result in failures.

After the job has finished running, the template is ready for use.

Note

For Windows 2003 x64 — Windows 2003 x64 does not support the Emulated NIC OOB. While creating the VM, please ensure that you select the Synthetic NIC for this VM.

Creating templates on SCVMM for Windows 2008 or Windows 2012 (x86, x64, and R2)

  1. On the SCVMM Admin Console, create a new VM and install Windows 2008 or Windows 2012 on it.
  2. Set the Guest OS of the VM to Windows 2008 or Windows 2012, as applicable.
    Depending on your installation, select 32-bit or 64-bit or R2.
  3. Install Virtual Guest Services (Microsoft Tools) on the VM.
  4. Within the VM, open a command prompt and browse to the C:\Windows\system32\sysprep directory.
  5. Run the following command: sysprep.exe /oobe /generalize /quiet /shutdown

    Note

    Sysprep Shutdown — Ensure that you have run the command with the shutdown keyword and not the reboot keyword. Once the VM shuts down automatically, do not start it up. Convert it directly to a Template.

    The VM reboots and undergoes sysprep and will ultimately shut down.

  6. Right click on the VM and select Properties. Ensure that there are no floppy disks or DVDs connected to VM.
  7. Right click the VM and select New Template.
    During the process, do not make any hardware changes to the VM.
  8. During the Template creation process, a panel for Guest Customization appears.
    From the drop down menu, select the Customization not requiredoption.

    Note

    Choosing any option other than Customization not Required during template creation will result in failures.

After the job has finished running, the template is ready for use.

Creating templates on SCVMM for Red Hat Enterprise Linux

  1. Ensure that you have added the Linux OS ISOs to the Library Server.
  2. On the SCVMM Admin Console, create a virtual machine on a Linux Guest OS.
  3. Install the Linux Integration Services on the virtual machine.
  4. Turn off the virtual machine.
  5. Right click the VM and select New Template.
    During the process, do not make any hardware changes to the VM.
  6. During the Template creation process, a panel for Guest Customization appears.
    From the drop down menu, select the Customization not requiredoption.

    Note

    Choosing any option other than Customization not Required during template creation will result in failures.

  7. Select the Library Server where you want to store this template and step through all other wizard steps.
    The virtual machine is converted to a template. After the job has finished running, the template is ready for use.

    Note

    In the SCVMM 2008 R2, after creating the Linux template, ensure that the proper OS is selected under the Template properties. For example, RedHat Enterprise Linux 5 instead of the Other Linux.

Creating Linux templates on SCVMM 2012

This section describes how to create a Linux template for Hyper-V SCVMM 2012.

Configuring a VHD

Configuring a VHD for use in a Linux VM template involves the following steps:

  1. Create a virtual machine (or use an existing one) and install your Linux operating system. For more information, see Creating a VM Template.

    Note

    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. 

  2. Install or update the latest Hyper-V Linux Integration Services. For more information, see Installing the Hyper-V Linux Integration Services.
  3. 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.
  4. 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:

  1. In the Library pane of the VMM console, launch Create VM Template
  2. Select Use an existing VM template or virtual hard disk stored in the library, click Browse, and select your template VHD. 

  3. Provide a name for the VM template and click Next.  

  4. 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

  5. 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:

  1. Open Hyper-V Manager: Click Start, point to Administrative Tools, and then click Hyper-V Manager.
  2. Create a new virtual machine where you will install Linux: In the Actions menu, click New, and then click Virtual Machine.
  3. 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
  4. Turn on the virtual machine: Right-click the virtual machine that you created, and then click Connect.
  5. Begin installing Linux.
  6. When prompted, restart the virtual machine and complete any first-boot configuration tasks.

    Note

    Unless a legacy network adapter was added during the virtual machine's initial configuration, the virtual machine will not have any network support.

  7. Log on to the virtual machine.
  8. 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
  9. As the root user, change to the directory relevant to your distribution: and run the command:
    /install-rhel57.sh

Installing the VMM Agent for Linux

  1. On the VMM management server, open a command prompt session, with administrative rights.
  2. Go to the C:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\agents\Linux folder.
  3. 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.
  4. Run the following command: 
    chmod +x install
  5. Run either of the following commands, as appropriate: 
    ./install scvmmguestagent.1.0.0.544.x64.tar
    ./install scvmmguestagent.1.0.0.544.x86.tar

    Note

    This is the only process with which templates can be created. Currently the following two options are not allowed.

    1. Template creation via Virtual Machine for Redhat
    2. Template creation using VHD,
      If we select the option of "do not customize" the OS type for VM will be seen as Others.