[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

Handling Process
-
Check vtpdaemon logs and found there are multiple qemudrive errors.

-
Navigate to the template directory and discovered that the preload_disk.qcow2 file does not exist.
-
Suspect there is issue with the script, so enter qcow2-dump command and found that prompts "Please contact the author !"

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

Root Cause
Argument missing on backend logic.
Solution
-
We can conclude that the issue is due to a script execution error, which can be resolved by adding -e to the command.
-
Modify the script to include this change.
-
Modify the script (make sure to create a backup first),
vim /usr/share/perl5/VTP/QemuDerive.pm +899

add -e to the command

-
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.