Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_template_creation [2018/07/01 09:40]
sathish
linux_template_creation [2018/07/10 08:00] (current)
sathish
Line 21: Line 21:
 Step 1:  Step 1: 
 From the Xencenter Click on New VM and Select the Operating System you prefer (here it is Centos 7), and then Click Next  From the Xencenter Click on New VM and Select the Operating System you prefer (here it is Centos 7), and then Click Next 
 +
 +''​Overall Process remains the same most of the Linux variants, Just the scripts you need to upload accordingly as per your Linux Version.''​
 +
 ---- ----
  
Line 91: Line 94:
  
 ---- ----
-Step 10: The Most Important thing while Installing the OS is you need to create partitions as shown below, for the Xenica functions to work properly+**Step 10: The Most Important thing while Installing the OS is you need to create partitions as shown below, for the Xenica functions to work properly. The below are partitioning schemes that we have in our templates**
  
 +''​Note:​ All are MBR,ext based templates''​
 ---- ----
  
-{{ :​user:​11partition.png?​direct |}}+**<fc #​ff0000><​fs medium>​Centos 6</​fs></​fc>​**
  
  
 +{{ :​user:​centos6_1.png |}}
 +----
 ---- ----
  
-{{ :user:13partitions2.png?​direct ​|}}+**<fc #​ff0000><​fs medium>​Centos 7</​fs></​fc>​** 
 + 
 + 
 +{{ :user:centos7_1.png |}}
 ---- ----
 +
 +
 +----
 +
 +**<fc #​ff0000><​fs medium>​Debian 8.2</​fs></​fc>​**
 +
 +
 +{{ :​user:​debian_1.png |}}
 +----
 +
 +----
 +
 +**<fc #​ff0000><​fs medium>​Ubuntu 16.4</​fs></​fc>​**
 +
 +
 +{{ :​user:​ubuntu_1.png |}}
 +----
 +
 +----
 +<fs medium>​**<​fc #​800080>​If you want to create your Custom partitioning scheme please modify this portions of the script as per your disk scheme</​fc>​**</​fs>​
 +
 +
 +----
 +
 +{{ :​user:​patition.png?​600 |}}
 +
 + 
 +
 +----
 +
 +
 Step 11: Instead of creating Swap partition ​ here we are going to Create a Linux Swap File. Step 11: Instead of creating Swap partition ​ here we are going to Create a Linux Swap File.
  
Line 154: Line 194:
 Step 17: Next we are going to Install Xentools in the VM, for the Xenica functions to work. Step 17: Next we are going to Install Xentools in the VM, for the Xenica functions to work.
    * Mount the disk containing Xentools and Install It as shown below.    * Mount the disk containing Xentools and Install It as shown below.
 +
 +''​Note:​ Please make sure that you are installing latest version of xentools''​
  
 {{ :​user:​0xentools.png?​direct |}} {{ :​user:​0xentools.png?​direct |}}
  
 ---- ----
 +Step 18:
 +From the Xenica package download the script file (xenicastart.sh) and place it  inside /etc as shown below
  
-{{ :user:19xenicaassignip.png?​direct ​|}}+---- 
 + 
 +{{ :user:19xenicastart.png |}}
  
 ---- ----
 +Step 19:Assign the executable mode to the file by the command
 +<​code>​chmod +x /​etc/​xenicastart.sh</​code>​
  
-{{ :​user:​20chmod.png?​direct |}} 
  
 ---- ----
 +Step 20:  Run the below command
 +<​code>​source /​etc/​xenicastart.sh</​code>​
  
-{{ :user:​21couldnotread.png?direct |}}+After running the file. It should print the message at the end : 
 + 
 +''​Could not read Ip Address from the xenstore. It seems IP Address is not written to xenstore.''​
  
 ---- ----
  
-{{ :user:22rclocal.png?​direct ​|}}+{{ :user:21couldnotread-confirm.png |}} 
 + 
 +---- 
 +Step 21: To make the script run at the start of the VM: 
 +  
 +a) Open the file /​etc/​rc.local in edit mode 
 + 
 +b) put the below lines inside /​etc/​rc.local 
 + 
 +<​code>/​etc/​xenicastart.sh 
 +/​etc/​xenicastart.sh</​code>​ 
 + 
 +---- 
 + 
 +{{ :​user:​22rclocalnew.png |}} 
 + 
 +---- 
 +Step 22: Assign the executable mode to the file by the command 
 +<​code>​chmod +x /​etc/​rc.local</​code>​
  
 ---- ----
Line 178: Line 247:
  
 ---- ----
 +Step 23: Run this script as /​etc/​rc.local on the command line
 +
 +It should print the same message as in step 20.
 +
 +''​Could not read Ip Address from the xenstore. It seems IP Address is not written to xenstore.''​
 +
 +{{ :​user:​24rclocalrun-new.png |}}
 +
 +
 +----
 +
 +Step 24: Shutdown the VM and Convert it to template
 +
 +{{:​user:​25converttemplate.png?​direct|}}
 +
 +----
 +<fs medium>''​Note:​ You shoud change the permissions of the xenstore from the xenserver once. So that VMs are able to read the xenstore.''</​fs>​
 +
 +Command
 +<​code>​xenstore-chmod /​local/​domain rw</​code>​
  
-{{ :​user:​24rclocalrun.png?​direct |}} 
  • linux_template_creation.1530438011.txt.gz
  • Last modified: 2018/07/01 09:40
  • by sathish