cc_staff
1,486
edits
(Adjusted grouping of sections) |
|||
Line 126: | Line 126: | ||
where <code><IMAGE_ID></code> is ID of the image to update, <code><MEMBER_ID></code> is the ID of the second project, and <code><MEMBER_STATUS></code> is the new status of the image. Valid Values for status are <code>accepted</code>, <code>rejected</code>, and <code>pending</code>. The image will then be available for use and appear in the OpenStack dashboard's list of images in the second project. | where <code><IMAGE_ID></code> is ID of the image to update, <code><MEMBER_ID></code> is the ID of the second project, and <code><MEMBER_STATUS></code> is the new status of the image. Valid Values for status are <code>accepted</code>, <code>rejected</code>, and <code>pending</code>. The image will then be available for use and appear in the OpenStack dashboard's list of images in the second project. | ||
= | ==Downloading an Image== <!--T:38--> | ||
The first step is to install the OpenStack client and download the OpenStack RC file and source it (see [[OpenStack Command Line Clients]]). | |||
The OpenStack client can list the available images on your OpenStack project with | |||
{{Command|openstack image list}} | |||
producing something like: | |||
<!--T:39--> | |||
+--------------------------------------+---------------------------------------+-------------+------------------+-------------+--------+ | |||
| ID | Name | Disk Format | Container Format | Size | Status | | |||
+--------------------------------------+---------------------------------------+-------------+------------------+-------------+--------+ | |||
| 982761b2-c77b-4852-8ae3-bf98b32b8894 | Hadoop-2.2.4 | qcow2 | bare | 10253107200 | active | | |||
| b7bd3033-9836-406d-a8f2-2e91978026b4 | hadoopmaster | qcow2 | bare | 3493527552 | active | | |||
| 2c751755-854d-49c3-af82-d501e51e7159 | hadoopmaster-active | qcow2 | bare | 13134004224 | active | | |||
| c41012f4-ed82-4478-a81f-5efb96a31b1a | hadoopmaster-old | qcow2 | bare | 3493527552 | active | | |||
| 78e61a3f-b546-441a-b476-a7077b04ca36 | hadoopslave | qcow2 | bare | 3490971648 | active | | |||
| 516845c3-b256-4c6d-a2cb-e31e822c7e34 | hadoopslave1-active | qcow2 | bare | 8345026560 | active | | |||
| 1546bd86-5314-4fce-9576-e2f6930dad30 | hadoopslave1-old | qcow2 | bare | 3490971648 | active | | |||
| baf78e8d-8288-4854-a66b-812cdf3ccbca | TestVM | qcow2 | bare | 13167616 | active | | |||
| 2faf97d7-5b0b-44ce-8024-3bef5a634570 | test_ubuntu_initial | qcow2 | bare | 1799487488 | active | | |||
| 308b6614-396a-4360-9c33-4e86f41ea0ec | trusty | qcow2 | bare | 256180736 | active | | |||
| 9b3c3fda-2aca-43b5-a3e7-662a94f5e7fb | Ubuntu_14.04_Trusty-amd64-20150708 | qcow2 | bare | 257884672 | active | | |||
| f93e66cf-fec1-4460-8fc7-506e716fbf30 | ucernvm-prod.1.18-10 | raw | bare | 20971520 | active | | |||
+--------------------------------------+---------------------------------------+-------------+------------------+-------------+--------+ | |||
<!--T:40--> | |||
You can then download a particular image with | |||
{{Command|openstack image save --file ./<file-name-for-image>.<format> <ID>}} | |||
where <format> matches the value in the ''Disk format'' column and <ID> matches the value in the ''ID'' column. | |||
==Uploading an Image== <!--T:50--> | |||
The first step is to install the OpenStack client and download the OpenStack RC file and source it (see [[OpenStack Command Line Clients]]). | |||
Then run the command | |||
{{Command|openstack image create --file <path-to-local-file-image> --disk-format <format> <new-image-name>}} | |||
<!--T:51--> | |||
where | |||
* <path-to-local-file-image> is the path to the file containing the image you wish to upload from your local machine, | |||
* <format> is the disk format; if not specified, the raw format is assumed, which is incorrect since it can cause issues when using the image in OpenStack, | |||
* <new-image-name> is the name of the image as it appears on the OpenStack dashboard. | |||
==Creating a VirtualBox VM from a Cloud Image== <!--T:41--> | |||
[https://www.virtualbox.org/ VirtualBox] is a software package which allows you to create and run virtual machines on your desktop or laptop. It can be run on many different operating systems (Windows, Linux, Mac) and the virtual machines it creates may run one of many different operating systems. | |||
<!--T:52--> | |||
To use a QCOW2 image downloaded from an OpenStack cloud, as shown above, with VirtualBox you will need to convert the image in the qcow2 format to the vmdk format. This can be done with the <code>qemu-img</code> tool. This can be installed with something like | |||
{{Command|sudo apt-get install qemu-img}} | |||
then do the conversion with | |||
{{Command|qemu-img convert -f qcow2 vdisk.qcow2 -O vmdk vdisk.vmdk}} | |||
Then you can create a new virtual machine and attach the vmdk image to it (see [http://techathlon.com/how-to-run-a-vmdk-file-in-oracle-virtualbox/ how to run a vmdk file in virtualbox] for detailed instructions on this). | |||
=Linux VM User Management= <!--T:28--> | |||
There are a number of ways to allow more than one person to log into a VM. We recommend creating new user accounts and adding public [[SSH Keys]] to these accounts. | There are a number of ways to allow more than one person to log into a VM. We recommend creating new user accounts and adding public [[SSH Keys]] to these accounts. | ||
Line 195: | Line 245: | ||
<!--T:37--> | <!--T:37--> | ||
Once this is done, users can log into the VM with their private keys as usual (see [[SSH Keys]]). | Once this is done, users can log into the VM with their private keys as usual (see [[SSH Keys]]). | ||
<!--T:49--> | <!--T:49--> | ||
[[Category:CC-Cloud]] | [[Category:CC-Cloud]] | ||
</translate> | </translate> |