Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section provides information that will assist you in creating CentOS 7 Templates with cPanel. 

...

Creating a CentOS 7 Template using a VHD stored in the Library


  1. Log in to SCVMM server and open the SCVMM console.  Next, click on Library tab.

    Image Modified

     

  2. Click on Create VM Template.

    Image Modified


  3. In the "Select Source" tab of the wizard, select "Use an existing VM template or a virtual hard disk stored in the library" and click on Browse.

    Image Modified 

     

  4. Browse for the VHD of the CentOS 7 template you have previously created, using the How to Create Guest OS (Linux) Templates in Hyper-V guide. Select the VHD and click on OK. Click on Next.

    Image Modified

     

  5. In the Identity tab, specify a name for the template and click on Next.

     

     

  6. In the Configure Hardware tab, in Cloud Capability Profile section, check Hyper-V




  7. Set Virtual Machine's Memory to at least 1024 MB and click on Next.




  8. In the Configure Operating System tab, select "Create new Linux operating system customization settings" from the Guest OS profile drop-down list.




  9. In the Operating System drop-down list, select "CentOS Linux 7 (64bit)" and click on Next.




  10. In the Application Configuration tab and in the SQL Server Configuration tab click on Next.

       


  11. In the Summary tab, click on Create.




  12. Right click on the template you've just created and click on Properties.




  13. Go to the Hardware Configuration tab, click on the Hard Disk and copy the file location address of this VHD.




  14. In the VMM main page click on VMs and Services.




  15.  Right click on a Hyper-V Host and click on Connect via RDP.




  16. Once you connect to Hyper-V Host, open Windows Explorer, paste the VHD address to the address bar and press Enter. Copy the VHD file and paste it in a file location on the Hyper-V Host.

     


  17. On the Hyper-V Host, open Hyper-V Manager. Right click on the Hyper-V Host you pasted the VHD file, click on New and then click on Virtual Machine.




  18. In the Before You Begin tab of the New Virtual Machine Wizard, click on Next.




  19. In the Specify Name and Location tab, specify the Virtual Machine's name and click on Next.




  20. In the Specify Generation tab, choose Generation 1 and click on Next.




  21. In the Assign Memory tab, assign at least 1024 MB of Startup memory and click on Next.




  22. In the Configure Networking tab, select Virtual Internet from the drop-down list and click on Next.




  23. In the Connect Virtual Hard Disk tab, choose "Use an existing virtual hard disk" and click on Browse.




  24. Browse for the file location specified in step 16, select the VHD file you have previously pasted in that location and click on Open. Click on Next.

      


  25. In the Summary tab, click on Finish.




  26. Once the Virtual Machine is created, go to Hyper-V Manager, right click on the Virtual Machine you have just created and click on Connect.

     

     

  27. Click on Start button to power-on the Virtual Machine.




  28. Login to the Virtual Machine, using the root account.




  29. Type rm -rf /var/log/wtmp and press Enter in order to remove the /var/log/wtmp file.




  30. Type mc and press Enter to open Midnight Commander.

      


  31. Type cd /etc/selinux and press Enter.

      


  32. Use the arrows to go to the config file and press F4 in order to edit the file.

      


  33. Set SELINUX from "enforcing" to "disabled" and press F2 to save the config file.

      


  34. Type cd /root and press Enter. Delete any /root/installation/lock files.

      


  35. Type ifconfig and note down the IP address of the Virtual Machine.

    Image Added


  36. Download the installation scripts below.

    Ui button
    colorgreen
    sizesmall
    titleDOWNLOAD .bashrc
    urlhttp://jira.interworkscloud.net/secure/attachment/10471/.bashrc


    Ui button
    colorgreen
    sizesmall
    titleDOWNLOAD install_cpanel.sh
    urlhttp://jira.interworkscloud.net/secure/attachment/10470/install_cpanel.sh


     

  37. Open WinSCP (or any other file transfer software) in your PC and connect to the Virtual Machine using the IP address you have previously noted.