...
Code Block | ||
---|---|---|
| ||
openstack image create --file <image_location> --disk-format raw --container-format bare --protected [--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 | ||
---|---|---|
| ||
openstack image create --file xenial-server-cloudimg-amd64-disk1.img.raw --disk-format raw --container-format bare --protectedpublic "Ubuntu Server 16.04 (Xenial) amd64" openstack image set --publicprotected "Ubuntu Server 16.04 (Xenial) amd64" |
...
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
...