Recently I made a post about how to make a TKR for GPUs on TKG. But what if you SCREW UP the TKR version / naming... and want to rename the version ? I think i just did this last night.. and I dont want to re run image-builder. So I decided to try to use tar to simply create an OVA from a modified OVF + VMDK . I think it worked ... because the exact size of the OVA in bytes, that i get from running tar -cvf my.ova * == the original OVA that i used to generated the VMDK+OVF files, that is:
1) input: OVA file
2) output: VMDK + OVF file
3) Hack the values in VMDK file
4) Run tar -vcf my.ova *
And i guess thats all you have to do ....
Details
Just posting my whole set of notes in here...
Whats in an OVA?
kubo@7SrCMCnVHizPQ:~/ova$ ls
ubuntu-2004-kube-1.6.1-v1.23.10-EFI.ova ubuntu-2004-kube-v1.23.10+vmware.1.mf ubuntu-2004-kube-v1.23.10+vmware.1-tkg.1-f83d41690f8742e7388f2c553fd9a1bb.cert
ubuntu-2004-kube-v1.23.10+vmware.1-disk1.vmdk ubuntu-2004-kube-v1.23.10+vmware.1.ovf
- ova
- vmdk
- mv
- cert
Where is the "main content" ?
-rw-rw-r-- 1 kubo kubo 1.8G Nov 26 03:55 ubuntu-2004-kube-1.6.1-v1.23.10-EFI.ova. <-- big image
# EXACT contents == VMD Is smaller, bc OVA has metadata...
-rw-rw-r-- 1 kubo kubo 1860536320 Nov 26 03:55 ubuntu-2004-kube-1.6.1-v1.23.10-EFI.ova
-rw-r--r-- 1 kubo kubo 1860484096 Nov 26 03:56 ubuntu-2004-kube-v1.23.10+vmware.1-disk1.vmdk
...... post unzipping .....
-rw-r--r-- 1 kubo kubo 41K Nov 26 03:56 ubuntu-2004-kube-v1.23.10+vmware.1.ovf <-- XML file
-rw-r--r-- 1 kubo kubo 233 Nov 26 03:56 ubuntu-2004-kube-v1.23.10+vmware.1.mf
-rw-r--r-- 1 kubo kubo 1.8G Nov 26 03:56 ubuntu-2004-kube-v1.23.10+vmware.1-disk1.vmdk <-- big image
drwxrwxr-x 2 kubo kubo 4.0K Nov 26 03:56 .
-rw-r--r-- 1 kubo kubo 1.9K Nov 26 03:56 ubuntu-2004-kube-v1.23.10+vmware.1-tkg.1-f83d41690f8742e7388f2c553fd9a1bb.cert
So, who cares? WELL If you want to modify a parameter in a VM like the <VERSION>...
This all means you can do it (I THINK) just using TAR !!!
rm -rf ubuntu-2004-kube-1.6.1-v1.23.10-EFI.ova
NOW I can modify XML parameters in the OVF file .... and run tar in this directory, and CREATE the SAME OVA from the OVF...
tar -cvf ubuntu-2004-kube-1.6.1-v1.23.10-EFI.ova *
-rw-rw-r-- 1 kubo kubo 1860536320 Nov 26 04:03 ubuntu-2004-kube-1.6.1-v1.23.10-EFI.ova <-- result of Tar !!! SAME CONTENT !!!
No comments:
Post a Comment