Table of Contents
< All Topics
Print

[VDI] Failed to convert to template

Issue Description

After create a new virtual machine and convert to template, the task fails and prompts
"Failed to convert template. Error: The private disk file has been damaged. Please contact technical support representative."

Error/Warning Information

file

Handling Process

  1. Check vtpdaemon logs and found there are multiple qemudrive errors.
    file

  2. Navigate to the template directory and discovered that the preload_disk.qcow2 file does not exist.

  3. Suspect there is issue with the script, so enter qcow2-dump command and found that prompts "Please contact the author !"
    file

  4. Try adding -e on the command, found that the script able to execute succesfully.
    file

Root Cause

Argument missing on backend logic.

Solution

  1. We can conclude that the issue is due to a script execution error, which can be resolved by adding -e to the command.

  2. Modify the script to include this change.

  3. Modify the script (make sure to create a backup first), vim /usr/share/perl5/VTP/QemuDerive.pm +899
    file
    add -e to the command
    file

  4. Restart the services. This will not affect production.

    /sf/etc/init.d/vtpdaemon restart
    /etc/init.d/apache2 restart 

Suggestions

If there are multiple hosts, all hosts needs to be modified.
-e is refer to environment inspection.