Unable to create a custom KVM template from SolusVM file-based KVM VPS.

Have more questions? Submit a request

Applicable to:

  • SolusVM

Symptoms 

Unable to create a custom KVM template from SolusVM file-based KVM VPS:

# /scripts/kvmtemplate --mode=prescan --vmid=kvm166 --generation=2
error: prescan can't find the specified vmid

Cause

This is known SolusVM issue with ID #SVM-2527 

Resolution

As a workaround use the following steps:

  1. connect to KVM node via SSH
  2. Shutdown the server in SolusVM > Virtual Servers > the necessary VPS (note its VMID, for example, kvm123):

    How to shutdown VPS and find its VMID:

    shutdown.jpg

  3. Find the VPS image path using the VPS VMID:

    # virsh domblklist VMID | grep hda | awk {'print $2'}

    For example:

    # virsh domblklist kvm101 | grep hda | awk {'print $2'}
    /vmdata/kvm101.img

  4. Prepare the VPS using the VPS image path from step 3:

    # virt-sysprep -v -a /vmdata/kvm101.img

  5. Pack the template with the command:

    # virt-sparsify --machine-readable /vmdata/kvm101.img --convert qcow2 --compress /home/solusvm/kvm/template/template-name.gz

    where template-name is the name of the new template.

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.