Versions Compared

Key

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

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

In order to follow these instructions successfully, you will need administrative access to SCVMM Server (via SCVMM Console) and permissions to the Library Objects/Share Folders.

 

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

     

  2. Click on Create VM Template.
    Image Removed
    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 Removed 
     Browse for the VHD of the on Templates. Right-click on a 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 Removed
     In the Identity tab, specify a name for the template and click on Next.
    Image Removed 
     In the Configure Hardware tab, in Cloud Capability Profile section, check Hyper-V
    Image Removed
    Set Virtual Machine's Memory to at least 1024 MB and click on Next.
    Image Removed
    In the Configure Operating System tab, select "Create new Linux operating system customization settings" from the Guest OS profile drop-down list.
    Image Removed
    In the Operating System drop-down list, select "CentOS Linux 7 (64bit)" and click on Next.
    Image Removed
    In the Application Configuration tab and in the SQL Server Configuration tab click on Next.
    Image Removed   Image Removed
    In the Summary tab, click on Create.
    Image Removed
    Right click on the template you've just created and click on Properties.
    Image Removed guide, and click on Properties.

    Image Added


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


  4. In the VMM main page click on VMs and Services.
    Image Removed
    Image Added


  5.  Right click on a Hyper-V Host and click on Connect via RDP.
    Image Removed
    Image Added


  6. 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.
    Image Removed
    Image Added Image RemovedImage Added


  7. 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.
    Image Removed
    Image Added


  8. In the Before You Begin tab of the New Virtual Machine Wizard, click on Next.
    Image Removed
    Image Added


  9. In the Specify Name and Location tab, specify the Virtual Machine's name and click on Next.
    Image Removed
    Image Added


  10. In the Specify Generation tab, choose Generation 1 and click on Next.
    Image Removed
    Image Added


  11. In the Assign Memory tab, assign at least 1024 MB of Startup memory and click on Next.
    Image Removed
    Image Added


  12. In the Configure Networking tab, select Virtual Internet from the drop-down list and click on Next.
    Image Removed
    Image Added


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


  14. 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.
    Image Removed
    Image Added  Image RemovedImage Added


  15. In the Summary tab, click on Finish.
    Image Removed
    Image Added


  16. 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.
    Image Removed
    Image Added 

     

  17. Click on Start button to power-on the Virtual Machine.
    Image Removed
    Image Added


  18. Login to the Virtual Machine, using the root account.
    Image Removed
    Image Added


  19. Type rm -rf /var/log/wtmp and press Enter in order to remove the /var/log/wtmp file.
    Image Removed
    Image Added


  20. Type mc and press Enter to open Midnight Commander.
    Image Removed
    Image Added  Image RemovedImage Added


  21. Type cd /etc/selinux and press Enter.
    Image Removed
    Image Added  Image RemovedImage Added


  22. Use the arrows to go to the config file and press F4 in order to edit the file.
    Image Removed
    Image Added  Image RemovedImage Added


  23. Set SELINUX from "enforcing" to "disabled" and press F2 to save the config file.
    Image Removed
    Image Added  Image RemovedImage Added


  24. Type cd /root and press Enter. Delete any /root/installation/lock files.
    Image Removed
    Image Added  Image RemovedImage Added


  25. Type ifconfig and note down the IP address of the Virtual Machine.
    Image Removed
    Image Added


  26. 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


     

  27. Open WinSCP (or any other file transfer software) in your PC. Connect to the Virtual Machine using the IP address you have previously noted and root account credentials. Click on Login.
    Image Removed
    Image Added


  28. On your PC, browse for the location you saved the installation scripts, open bashrc and copy the content of the file.
    Image Removed
    Image Added


  29. On the Virtual Machine, browse for the root directory, open .bashrc file and paste the content of the bashrc file in the end of the /root/.bashrc file.
    Image Removed
    Image Added


  30. Right-click on install-cpanel.sh and click on Upload. In the pop-up window, click on OK.
    Image Removed
    Image Added 

     
  31. You will notice that install_cpanel has been uploaded to the root directory of the Virtual Machine.
    Image Removed
    Image Added 

     
  32. Go to the Virtual Machine, type cd /root and press Enter to go to the root directory.
    Image Removed
    Image Added 

     
  33. Type ls -l and press Enter, in order to list the files of the root directory. Notice that install_cpanel is not executable.
    Image Removed
    Image Added 

     
  34. Type chmod +x install_cpanel.sh and press Enter in order to make install_cpanel.sh executable. Type again ls -l and press Enter. You will notice that the install_cpanel.sh is now executable.
    Image Removed
    Image Added  Image RemovedImage Added


  35. Type shutdown -h now in order to shutdown the Virtual Machine.
    Image Removed
    Image Added


  36. In Hyper-V Manager, right-click on the Virtual Machine and click on Settings.
    Image Removed
    Image Added 

     
  37. Copy the file location of the VHD file of this Virtual Machine.
    Image Removed
    Image Added 

     
  38. Go to the VMM Host, open Windows explorer and paste the Iocation of the VHD file of the Virtual Machine. Copy the VHD file.
    Image Removed
    Image Added


  39. Open VMM, click on Library, then right-click on the Library main folder and click on Explore. Create a folder in the library and paste the VHD file in the folder.
    Image Removed
    Image Added 

     
  40. Create a folder in the library and paste the VHD file in the folder.
    Image Removed
    Image Added


  41. Go back to VMM, click on Library, right-click on Templates and select Create VM Template.
    Image Removed
    Image Added


  42. Follow the VM template Wizard. In the Select Source tab, choose "Use an existing VM template or a virtual hard disk stored in the library" and click on Browse.
    Image Removed
    Image Added


  43. Select the VHD file you pasted in step 50. Click on OK and then click on Next.
    Image Removed
    Image Added


  44. In the Identity tab, specify VM template's name, choose Generation 1 from the drop-down list and click on Next.
    Image Removed
    Image Added


  45. In the the Configure Hardware tab, select Hyper-V for capability profile, 
    Image Removed  Image Removed tab, in Cloud Capability Profile section, check Hyper-V.

    Image Added 

     
  46. Set Memory to at least 1024 MB and click on Next.

    Image Added


  47. In the Configure Operating System tab, select "Create new Linux operating system customization settings" from the Guest OS profile drop-down list. In the Operating System drop-down list, select "CentOS Linux 7 (64bit)" and click on Next.

    Image Added


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

       Image AddedImage Added


  49. In the Summary tab, click on Create.

    Image Added


  50. A CentOS 7.1 Template with cPanel is created. Congratulations!

    Image Added