boolean needDelegation = false;
//NOTE: the hostid can be a hypervisor host, or a ssvm agent. For copycommand, if it's for volume upload, the hypervisor
//type is empty, so we need to check the format of volume at first.
if (cmd instanceof CopyCommand) {
CopyCommand cpyCommand = (CopyCommand)cmd;
DataTO srcData = cpyCommand.getSrcTO();
DataStoreTO srcStoreTO = srcData.getDataStore();
DataTO destData = cpyCommand.getDestTO();
DataStoreTO destStoreTO = destData.getDataStore();
if (srcData.getObjectType() == DataObjectType.VOLUME) {
VolumeObjectTO volumeObjectTO = (VolumeObjectTO)srcData;
if (Storage.ImageFormat.OVA == volumeObjectTO.getFormat()) {