How to create a Xen PV custom template from Xen PV VM?

Have more questions? Submit a request

Applicable to:

  • SolusVM

Question

How to create a Xen PV custom template from Xen PV VM? 

Answer

  1. Create XenPV VPS that will be used as a source for the template. Set the disk size as small as possible
  2. Stop the VPS
  3. Find path to the LVM image

    # cat /home/xen/vmID/vmID.cfg | grep phy disk = ['phy:/dev/name_of_lvg/vmID_img,xvda1,w', 'phy:/dev/name_of_lvg/vmID_swap,xvda2,w']

    replace vmID with actual VPS ID

  4. Mount the VPS image to the mount point:

    # mount /dev/name_of_lvg/vmID_img /home/xen/vmID/mnt

  5. Change directory to the mount point:

    # cd /home/xen/vmID/mnt

  6. Create a template file, e.g. for CentOS 7 + Plesk VPS:

    # tar -cpvzf /root/centos-7-plesk-latest-x64.tar.gz .

    Warning: the dot should not be missed at the end of the line above

  7. Add the template to the SolusVM

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.