Skip to content

Commit

Permalink
DLPX-87206 Remove optional ovf:size attribute from OVF template
Browse files Browse the repository at this point in the history
  • Loading branch information
palash-gandhi committed Aug 1, 2023
1 parent c30d05d commit 80b011e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ esac

DATE=$(date --utc --iso-8601=seconds)

VMDK_FILESIZE=$(stat -c %s "$ARTIFACT_NAME.vmdk")
VMDK_CAPACITY=$(qemu-img info --output=json "$ARTIFACT_NAME.vmdk" |
jq '.["virtual-size"]')

Expand All @@ -58,7 +57,6 @@ cp "$ARTIFACT_NAME.vmdk" "$OVA_DIRECTORY/$ARTIFACT_NAME.vmdk"
cp config/hooks/template.ovf "$OVA_DIRECTORY/$ARTIFACT_NAME.ovf"
sed -i "$OVA_DIRECTORY/$ARTIFACT_NAME.ovf" \
-e "s/@@VMDK_FILENAME@@/$ARTIFACT_NAME.vmdk/g" \
-e "s/@@VMDK_FILESIZE@@/$VMDK_FILESIZE/g" \
-e "s/@@VMDK_CAPACITY@@/$VMDK_CAPACITY/g" \
-e "s/@@CPUS_COUNT@@/$CPUS_COUNT/g" \
-e "s/@@MEMORY_MB@@/$MEMORY_MB/g" \
Expand Down
2 changes: 1 addition & 1 deletion live-build/config/hooks/vm-artifacts/template.ovf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<!--Generated by VMware ESX Server, User: root, UTC time: 2018-04-04T04:40:29.324628Z-->
<Envelope vmw:buildId="build-1483097" xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<References>
<File ovf:href="@@VMDK_FILENAME@@" ovf:id="file1" ovf:size="@@VMDK_FILESIZE@@"/>
<File ovf:href="@@VMDK_FILENAME@@" ovf:id="file1"/>
</References>
<DiskSection>
<Info>Virtual disk information</Info>
Expand Down

0 comments on commit 80b011e

Please sign in to comment.