...
Code Block | ||
---|---|---|
| ||
glanceopenstack image- create --name <image_name> --file <image_location> --disk-format raw --container-format bare --visibility public --progress openstack image create --file <image_location> --disk-format raw --container-format bare [--public|--private][--public|--private] <image_name> # There is a bug where in some/most/many circumstances you will not be able to use --protected with the "image create" command. Workaround: Just set the protected flag after the image has been uploaded openstack image set --protected <image_name> |
For example, the following command would upload an ubuntu image:
Code Block | ||
---|---|---|
| ||
glanceopenstack image-create --name "Ubuntu Server 16.04 (Xenial) amd64" create --file xenial-server-cloudimg-amd64-disk1.img.raw --disk-format raw --container-format bare --is-public True --progress openstack image create --file xenial-server-cloudimg-amd64-disk1.img.raw --disk-format raw --container-format bare --public"Ubuntu Server 16.04 (Xenial) amd64" openstack image set --protected "Ubuntu Server 16.04 (Xenial) amd64" |
The "–visibility public–public" flag is used to indicate that all projects should have access to this image, and the upload would then require admin credentials. In the case of an image upload which should only be accessible to the project uploading it, that flag can be omitted.
...
Code Block | ||
---|---|---|
| ||
# Mounting the filesystem :~$ sudo guestfish Welcome to guestfish, the guest filesystem shell for editing virtual machine filesystems and disk images. Type: 'help' for help on commands 'man' to read the manual 'quit' to quit the shell ><fs> add <path to image> ><fs> run ><fs> list-filesystems /dev/sda1: ext4 ><fs> mount /dev/sda1 / # Editing a file ><fs> vi /etc/fstab #Copying in a file from outside the image ><fs> copy-in <file outside the image> <pat to where to put it inside image> # Commiting and exiting guestfish. Exit does both ><fs> exit |
Change existing images
...