Change-Id: I60fc0baf7d6482c578d8ff78601b62d5af95b6a0
Reviewed-on: http://photon-jenkins.eng.vmware.com/856
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: Sharath George
(cherry picked from commit 81de4219b38c1fa8ef0f70a05ebb7edc39397bcd)
Reviewed-on: http://photon-jenkins.eng.vmware.com/862
Reviewed-by: suezzelur <anishs@vmware.com>
| ... | ... |
@@ -28,11 +28,20 @@ cd $PHOTON_IMG_OUTPUT_PATH/temp |
| 28 | 28 |
|
| 29 | 29 |
sed -i "s/otherGuest/other3xLinux64Guest/g" $PHOTON_IMG_OUTPUT_PATH/temp/photon-ova.ovf |
| 30 | 30 |
#Add product info |
| 31 |
-sed -i '/\/VirtualSystem>/i \ \t<ProductSection> \n \t\t<Info>Information about the installed software</Info> \n \t\t<Product>Photon</Product> \n \t\t<Vendor>VMware Inc.</Vendor> \n \t\t<Version>1.0.0</Version> \n \t\t<FullVersion>1.0.0-TP2</FullVersion> \n \t</ProductSection> ' $PHOTON_IMG_OUTPUT_PATH/temp/photon-ova.ovf |
|
| 31 |
+sed -i '/\/VirtualSystem>/i \ \t<ProductSection> \n \t\t<Info>Information about the installed software</Info> \n \t\t<Product>Photon</Product> \n \t\t<Vendor>VMware Inc.</Vendor> \n \t\t<Version>1.0</Version> \n \t\t<FullVersion>1.0</FullVersion> \n \t</ProductSection> ' $PHOTON_IMG_OUTPUT_PATH/temp/photon-ova.ovf |
|
| 32 | 32 |
rm -f $PHOTON_IMG_OUTPUT_PATH/temp/photon-ova.mf |
| 33 | 33 |
openssl sha1 *.vmdk photon-ova.ovf > photon-ova.mf |
| 34 | 34 |
tar cf photon-ova-$PHOTON_RELEASE_VER-$PHOTON_BUILD_NUM.ova photon-ova.ovf photon-ova.mf photon-ova-disk1.vmdk |
| 35 | 35 |
mv $PHOTON_IMG_OUTPUT_PATH/temp/photon-ova-$PHOTON_RELEASE_VER-$PHOTON_BUILD_NUM.ova $PHOTON_IMG_OUTPUT_PATH/ |
| 36 |
+ |
|
| 37 |
+#generate a second ova with lower hardware version |
|
| 38 |
+cp photon-ova.ovf photon-ova-hw10.ovf |
|
| 39 |
+sed -i 's/vmx-11/vmx-10/g' photon-ova-hw10.ovf |
|
| 40 |
+rm -f $PHOTON_IMG_OUTPUT_PATH/temp/photon-ova.mf |
|
| 41 |
+openssl sha1 *.vmdk photon-ova-hw10.ovf > photon-ova-hw10.mf |
|
| 42 |
+tar cf photon-ova-hw10-$PHOTON_RELEASE_VER-$PHOTON_BUILD_NUM.ova photon-ova-hw10.ovf photon-ova-hw10.mf photon-ova-disk1.vmdk |
|
| 43 |
+mv $PHOTON_IMG_OUTPUT_PATH/temp/photon-ova-hw10-$PHOTON_RELEASE_VER-$PHOTON_BUILD_NUM.ova $PHOTON_IMG_OUTPUT_PATH/ |
|
| 44 |
+ |
|
| 36 | 45 |
cd $PHOTON_IMG_OUTPUT_PATH |
| 37 | 46 |
rm -rf photon-custom |
| 38 | 47 |
DISK_DEVICE=`losetup --show -f ${PHOTON_IMG_OUTPUT_PATH}/photon-ova.raw`
|
| ... | ... |
@@ -69,11 +78,20 @@ ovftool /tmp/vmx-temp-custom.vmx $PHOTON_IMG_OUTPUT_PATH/temp1/photon-custom.ovf |
| 69 | 69 |
cd $PHOTON_IMG_OUTPUT_PATH/temp1 |
| 70 | 70 |
sed -i "s/otherGuest/other3xLinux64Guest/g" $PHOTON_IMG_OUTPUT_PATH/temp1/photon-custom.ovf |
| 71 | 71 |
#Add product info |
| 72 |
-sed -i '/\/VirtualSystem>/i \ \t<ProductSection> \n \t\t<Info>Information about the installed software</Info> \n \t\t<Product>Photon</Product> \n \t\t<Vendor>VMware Inc.</Vendor> \n \t\t<Version>1.0.0</Version> \n \t\t<FullVersion>1.0.0-TP2</FullVersion> \n \t</ProductSection> ' $PHOTON_IMG_OUTPUT_PATH/temp1/photon-custom.ovf |
|
| 72 |
+sed -i '/\/VirtualSystem>/i \ \t<ProductSection> \n \t\t<Info>Information about the installed software</Info> \n \t\t<Product>Photon</Product> \n \t\t<Vendor>VMware Inc.</Vendor> \n \t\t<Version>1.0</Version> \n \t\t<FullVersion>1.0</FullVersion> \n \t</ProductSection> ' $PHOTON_IMG_OUTPUT_PATH/temp1/photon-custom.ovf |
|
| 73 | 73 |
rm -f $PHOTON_IMG_OUTPUT_PATH/temp1/photon-custom.mf |
| 74 | 74 |
openssl sha1 *.vmdk photon-custom.ovf > photon-custom.mf |
| 75 | 75 |
tar cf photon-custom-$PHOTON_RELEASE_VER-$PHOTON_BUILD_NUM.ova photon-custom.ovf photon-custom.mf photon-custom-disk1.vmdk |
| 76 | 76 |
mv $PHOTON_IMG_OUTPUT_PATH/temp1/photon-custom-$PHOTON_RELEASE_VER-$PHOTON_BUILD_NUM.ova $PHOTON_IMG_OUTPUT_PATH/ |
| 77 |
+ |
|
| 78 |
+#generate a second custom ova with lower hardware version |
|
| 79 |
+cp photon-custom.ovf photon-custom-hw10.ovf |
|
| 80 |
+sed -i 's/vmx-11/vmx-10/g' photon-custom-hw10.ovf |
|
| 81 |
+rm -f $PHOTON_IMG_OUTPUT_PATH/temp/photon-custom.mf |
|
| 82 |
+openssl sha1 *.vmdk photon-custom-hw10.ovf > photon-custom-hw10.mf |
|
| 83 |
+tar cf photon-custom-hw10-$PHOTON_RELEASE_VER-$PHOTON_BUILD_NUM.ova photon-custom-hw10.ovf photon-custom-hw10.mf photon-custom-disk1.vmdk |
|
| 84 |
+mv $PHOTON_IMG_OUTPUT_PATH/temp1/photon-custom-hw10-$PHOTON_RELEASE_VER-$PHOTON_BUILD_NUM.ova $PHOTON_IMG_OUTPUT_PATH/ |
|
| 85 |
+ |
|
| 77 | 86 |
cd $PHOTON_IMG_OUTPUT_PATH |
| 78 | 87 |
rm -rf $PHOTON_IMG_OUTPUT_PATH/temp/ |
| 79 | 88 |
rm -rf $PHOTON_IMG_OUTPUT_PATH/temp1/ |