We moved this page to our Documentation Portal. You can find the latest updates here. |
Issue
VM provisioning failed with an error similar to the following:
Running: LOCK_FILE=/onapp/backups/templates/ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz.lock;EXTRACTING_ATTEMPTS=300;[ -f $LOCK_FILE ] && echo 'Template is temporary locked due to extracting.' || exit 0;i=0;echo -n "$EXTRACTING_ATTEMPTS unlock attempts.";while [ -f $LOCK_FILE -a $i -lt $EXTRACTING_ATTEMPTS ]; do sleep 1; echo -n "."; i=$((${i}+1));done;echo '';[ -f $LOCK_FILE ] && exit 1 || exit 0
Template is temporary locked due to extracting.
300 unlock attempts.............................................................................................................................................................................................................................................................................................................
Fatal: Provisioning failed. The template has not been extracted yet. Try again. If this problem repeats, contact your administrator.
Environment
OnApp 4.x or later
Linux Template
Resolution
1) Make sure no other virtual machines are currently provisioning using the affected template.
2) Remove the lock file:
This is found on the backup server. If you have more than one backup server, check the "Remote Server" IP from the failed log to find which one to run this on.
cd /onapp/backups/templates
rm ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz.lock
(The Ubuntu 14.04 template is just being used here as an example)
3) Attempt to provision again.
If provisioning fails again, there may be an issue with the template itself and you should download the most recent version of that template.
Additional Info
Linux templates are compressed tar files which contain all of the system files for the operating system. Provisioning consists of extracting those files and then copying them to the virtual machine's disk.
The compressed template files exist in /onapp/templates/
by default and the extracted templates exist in /onapp/backups/templates/
Provisioning a 2nd virtual machine with the same template may take less time since the extracted files may still be there. (Thus skipping the extraction part of provisioning.)
Optionally, you may extract template manually:
touch /onapp/backups/templates/ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz.lock
mkdir -p /onapp/backups/templates/ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz
tar -xzpf /onapp/templates/ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz -C /onapp/backups/templates/ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz
rm /onapp/backups/templates/ubuntu-14.04-x64-1.7-xen.kvm.kvm_virtio.tar.gz.lock