Cloud OSS - Hyper-V Service Manager
Cloud OSS - Hyper-V Service Manager | How to Create Guest OS (Linux) Templates in Hyper-V |
---|
...
37) Choose your preferred Language and Keyboard layout. Once you choose, click on Next.
Fig 43. Preferred language Fig 44. Preferred keyboard layout
38) In the Type of Devices page, select "Basic Storage Devices" and click on Next. In the pop-up window, click on "Yes, discard any data".
...
40) Click on the "Configure Network" button and edit the "System eth0" network interface. Configure the IPv4 settings so that you can access the template later on.
Note | ||
---|---|---|
| ||
Configure the IPv4 settings of your choice in the highlighted fields, as shown in the example below. |
Fig 48. Network configuration Fig 49. System etho network settings
41) Select the appropriate time zone and click on "Next". In the following screen set a "Root" password.
Fig 50. Time settings Fig 51. Setting root password
42) In the following screen select "Use All Space" and click on "Next". In the pop-up window, click on "Write changes to disk".
Fig 52. Partitioning Fig 53. Write changes to disk
43) Choose installation type (Since this is going to be a server template, we choose the "Basic Server" option). The installation process will begin once we click on "Next".
...
44) When the installation process is over, click on "Reboot".
Fig 56. Rebooting upon successful installation
4. Preparing the Virtual Machine for Template
...
46) While the Virtual Machine is turned off, go to VMM console, right click on the VM and click on Properties.
Fig 58. Setting VM's Properties
47) Go to Hardware Configuration, click on the "Legacy Network Adapter" and then click on Remove in order to remove it. In the pop-up window click on Yes.
...
49) Turn the Virtual Machine on and login as root. By default CentOS and Oracle Linux do not enable the network adapter on startup. If you run the command "ifconfig" you will only find the loopback adapter listed.
Fig 62. Running ifconfig
50) Also, by default the first adapter will be eth0. However, if we attempt to enable it by using the "ifconfig eth0 up" command we will receive a "no such device" error message as shown in the figure below:
Fig 63. Attempting to bring etho interface up
Note | ||
---|---|---|
| ||
This is because eth0 is assigned to the legacy adapter we just removed. In order to fix this we need to clear the existing adapter rules, and update the configuration file for eth0. |
...
67) In the Identity tab, Specify machine name for this VM clone and click on "Next".
Fig 81. Specifying clone machine name
68) In the Configure Hardware tab click on Availability below Advanced and check the "Make this Virtual Machine High Available" option. Click on Next
...
Fig 85c. Adding Properties Fig 85d. Creating VM clone
Fig 85e. Cloning process
...
Fig 85e. Cloning process
After the cloning process is completed you will have a clone of the Base VM you have configured. You will use this for creating the VM Template. The original VM (i.e. the VM clone) is destroyed after a VM Template is created.
Later on, you might need to modify your VM template. In that case you will use the base VM available that has thankfully remained intact.
...
71) Once the VM clone is created, right-click on it and click on Properties.
Fig 86. VM Clone Properties
72) Go to the Hardware Configuration tab, click on the Hard Disk and copy the file location address of this VHD.
Fig 87. Copy VHD location
73) Open File explorer and paste the Iocation of the VHD file of the Virtual Machine. Copy the VHD file.
Fig 88. Copy VHD file
74) Go to VMM, click on Library, then right-click on the Library main folder and click on Explore.
Fig 89. Explore VMM Library
75) Select a Library location and paste the VHD file you copied in step 73.
Fig 90. Paste VHD file
76) Select Library in SCVMM console on the bottom left. On the upper left of the SCVMM console, right click on Templates and choose "Create VM Template".
Fig 8691. Creating a VM Template
7277) In the Select Source tab, select choose "From Use an existing virtual machine that is deployed on a hostVM template or a virtual hard disk stored in the library" and click on Browse to locate the clone you've created in step 70. Once you select the clone VM, click on Next. In the appearing window, click on Yes.
...
Fig 92. Selecting source for the new VM Template Fig 88. Approving that the original VM will be destroyed
78)Select the VHD file you pasted in step 75. Click on OK and then click on Next.
...
73
Fig 93. Selecting VHD file from the Library
79) In the Identity tab, specify VM Template name and click on Next. In the Configure Hardware tab, template's name, choose Generation 1 from the drop-down list and click on Next.
Fig
...
94. Specifying VM Template name and Generation
80) In the Configure Hardware tab, in Cloud Capability Profile section, check Hyper-V.
Fig 95. Fig 90. Template hardware configuration
...
Select Cloud Capability Profile
81) Set Memory to at least 1024 MB and click on Next.
Fig 96. Specify VM Template Memory
82) In the Configure Operating System Settings tab, select "linux os profile" for "Guest OS profile" and select "CentOS Linux 6 (64 bit)" for "Operating system", in the dropdown menus menu (for Oracle Linux select "Oracle Linux 6 (64 bit)"). Click on Next.
Fig
...
97. Specify Operating system
7583) In the Select Library Server tab, select the appropriate library server and click on Next. In the Select Path tab, click on Browse to select the path on the Library Server to save the template and click on Next.
Fig 9298. Selecting a library to place the VM template Fig 9399. Selecting the path to place the VM template
7684) View your "Summary" configuration settings and click on "Create".
Fig 94100. Finalizing Creating a VM Template wizard
7785) Congratulations! Your Guest OS (Linux) template has been created. You may proceed with creating the Windows Guest OS Templates in Hyper-V for your Cloud Servers.
...