Deploy Linux with SCVMM

Deploy Linux with SCVMM

Q: How do I deploy Linux virtual machines using System Center Virtual Machine Manager 2012 SP1?

A: Service Pack 1 for System Center 2012 adds support for Linux deployment using templates via Virtual Machine Manager. Here's how to get this working.

  1. Create a new virtual machine (VM) and install a SCVMM-supported Linux distribution into it (at time of writing, this includes Red Hat Enterprise Linux--RHEL, CentOS, Ubuntu, and SUSE, with others coming in the future).
  2. Install the latest Hyper-V integration services if needed (the Linux kernel 3.4 includes the Windows 2012 Hyper-V integration services).
  3. Next, install the SCVMM 2012 SP1 Linux agent. This is found in the C:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\agents\Linux folder on the SCVMM server. How you get the content of the folder to the Linux distribution will vary. One option, if the Linux distribution supports SMB, is to just connect to the C$ share on the SCVMM server. Or you could create an NFS share for Linux to connect to, although I found it easier to just create an ISO with the Linux agent in it, then map the ISO to the Linux VM which will be available as the local CD. I found the easiest way to create the ISO is a software package such as MagicISO. Once the files are available, you must install the Linux agent by running the install script and pick the 32-bit or 64-bit version. To run the install script, you first need to set the install script to be executable:

    chmod +x install

    Then execute (I had to sudo as I'm not logged on as administrator; see output below):

    sudo ./install scvmmguestagent.1.0.0.544.x64.tar



    The agent is needed, as it performs the customization of the Linux environment when a template is deployed. Once the Linux template is deployed, the SCVMM agent is automatically removed.
  4. Shut down the Linux VM, and then save its VHDX file to the SCVMM library.
  5. Now create a Linux template, and make sure you set the correct Operating System, which will allow you to configure automatic naming (* is a complete random name while ### specifies an automatically incrementing number for the hostnames along with password for the root account, time zone and any scripts you want to run. Save the Template.

  6. You can now create new Linux VMs from the template. You will notice when you deploy a Linux VM from the template, at one point an ISO is connected the VM temporarily. This carries a customization file that contains the personalization data in linuxosconfiguration.xml file in addition to the latest version of the SCVMM Linux agent (in case it's been updated). You can see an example of this content below.
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish