1 . Create a new VM and install an SCVMM-supported Linux distribution into it.At the
time of this writing, this includes Red Hat Enterprise Linux (RHEL), CentOS,
Ubuntu, and SUSE, with others coming in the future.
2 . Install the latest version of Hyper-V Integration Services if needed (the Linux
kernel 3.4 includes the Windows 2012 version of Hyper-V Integration Services).
3 . Install the SCVMM Linux agent. This is found in the C:\Program Files\ Microsoft
System Center 2016\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 connect to the C$ share
on the SCVMM server. Or you could create an NFS share to which Linux can
connect, although I found it easier just to create an ISO with the Linux agent in it
and 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 to use 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 use sudo because I’m not logged on as administrator): sudo ./
install scvmmguestagent.1.0.2.1075.x64.tar.
The agent is needed because 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 that 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 a password for the root account, the 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 that when
you deploy a Linux VM from the template, at one point an ISO is connected to the
VM temporarily. This carries a customization file that contains the personalization
data in the linuxosconfiguration.xml file in addition to the latest version of the
SCVMM Linux agent (in case it’s been updated).
Templates are visible through the Library workspace and shown in the Templates ➣
VM Templates area. Figure 5.27 shows the main configuration areas for a template.
Notice that all of the virtual hardware can be changed in addition to adding new
hardware to the template hardware profile. If you will be creating many types of
templates rather than configuring the same hardware or operating system
configurations each time, a good option is to navigate to Profiles within the Libraries