Created
November 21, 2019 18:17
-
-
Save vincent-zurczak/abc2a7e19c167adb010f7fd1cbc1b5a7 to your computer and use it in GitHub Desktop.
A quick reminder about how to prepare a VMWare (OVF) export to Openstack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Let's assume you have an OVF image exported from VMWare | |
# (the *.ovf descriptor, *.vmdk, *.mf and *.nvram files) | |
# that you want to deploy on Openstack. | |
# An OVA file is a TAR archive that wraps all this file structure. | |
BASE_NAME="sample" | |
tar -cf "${BASE_NAME}.ova" "${BASE_NAME}.ovf" "${BASE_NAME}.mf" "${BASE_NAME}-1.vmdk" | |
# Verify the list of files | |
tar -tvf "${BASE_NAME}.ova" | |
# Upload the image on Openstack. | |
# See https://docs.openstack.org/python-openstackclient/latest/cli/command-objects/image.html#image-create | |
openstack image create \ | |
--disk-format vmdk \ | |
--container-format ova \ | |
--private \ | |
--file "${BASE_NAME}" \ | |
"your-image-name" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment