Create CentOS Linux template in Virtual Machines Manager

Generally speaking, process of making Linux VM template is quite the same like making Windows VM template, but you have to install VMM agent.

  1. Deploy original Linux VM as it described in this article – Install CentOS Linux on Hyper-V Virtual Machine
  2. Prepare VM to become it as template – install VMM agent on it. You can find VMM agents in the folder of VMM installation: “c:\Program Files\Microsoft System Center 2012 R2\Agents”.
  3. If you know how to use CIFS protocol and access Windows share from Linux, use this way to download agent. I’ve used the tool to create ISO with VMM agent binary.
  4. Attach VMM agent ISO to VM and mount it on the server : “mount /dev/cdrom /media”
  5. Most probably you will failed, because you have Linux Integration services installed with his own IDE driver. You have to load Linux IDE driver manually by run this command: “insmod /lib/modules/$(uname -r)/kernel/drivers/ata/ata_piix.ko” (for more details have a look this KB https://support.microsoft.com/en-us/kb/2600152). Try again previous step.
  6. Switch to “/media” folder by typing “cd /media“.
  7. Run installation “./install (latest VMM agent + your OS platform)
  8. Shutdown VM (shutdown -h now)
  9. Copy VHDX file to VMM library server. Refresh VMM library console.
  10. Select VHDX file, right-click, select “create VM template”
  11. Configure desired hardware configuration
  12. Under “Guest OS Profile” select “Create new Linux operating system customization settings”. Set your OS.
  13. In Identity information put: name,  domain name
  14. Root credentials: specify the password of the root account
  15. Click Create.
  16. Linux VM template is ready!

You may also like