// all the disk files should be marked with "snapshot + OVF_BUNDLE_PATH_IDENTIFIER" + hRef
// (packagePath relative)
for (String diskFileId : diskFileIds)
{
FileType file;
try
{
file = OVFReferenceUtils.getReferencedFile(envelope, diskFileId);
}
catch (IdNotFoundException e)
{
throw new AMException(AMError.PROMOTE_MASTER_OVF, String.format(
"The promote [%s] can not be created because the "
+ "referenced file Id [%s] is not found on the Envelope", relativeDiskPath,
diskFileId), e);
}
file.setSize(diskSizeInBytes);
file.setHref(relativeDiskPath);
}
return envelope;
}