root@controller:~# ls -l /var/lib/mysql/glance/
total 160
-rw-rw---- 1 mysql mysql 61 2¿ù 24 11:39 db.opt
-rw-rw---- 1 mysql mysql 8862 2¿ù 24 13:24 image_locations.frm
-rw-rw---- 1 mysql mysql 8864 2¿ù 24 13:24 image_members.frm
-rw-rw---- 1 mysql mysql 8818 2¿ù 24 13:24 image_properties.frm
-rw-rw---- 1 mysql mysql 8788 2¿ù 24 13:24 image_tags.frm
-rw-rw---- 1 mysql mysql 9180 2¿ù 24 13:24 images.frm
-rw-rw---- 1 mysql mysql 8804 2¿ù 24 13:24 metadef_namespace_resource_types.frm
-rw-rw---- 1 mysql mysql 8884 2¿ù 24 13:24 metadef_namespaces.frm
-rw-rw---- 1 mysql mysql 8842 2¿ù 24 13:24 metadef_objects.frm
-rw-rw---- 1 mysql mysql 8760 2¿ù 24 13:24 metadef_properties.frm
-rw-rw---- 1 mysql mysql 8710 2¿ù 24 13:24 metadef_resource_types.frm
-rw-rw---- 1 mysql mysql 8666 2¿ù 24 13:24 migrate_version.frm
-rw-rw---- 1 mysql mysql 8668 2¿ù 24 13:24 task_info.frm
-rw-rw---- 1 mysql mysql 8856 2¿ù 24 13:24 tasks.frm
root@controller:~# service glance-registry restart
glance-registry stop/waiting
glance-registry start/running, process 7426
root@controller:~# service glance-api restart
glance-api stop/waiting
glance-api start/running, process 7443
root@controller:~# rm -f /var/lib/glance/glance.sqlite
À̹ÌÁöµî·Ï
OpenStack ¸Þ´º¾ó»ó¿¡¼´Â °¡ÀåÀ̹ÌÁö ½ÎÀÌÁî°¡ ÀûÀº
CIrros À̹ÌÁö·Î µî·ÏµÇ´Â ¹æ¹ýÀ¸·Î ¸í½ÃµÇ¾îÀÖ½À´Ï´Ù.
Cirros ´Â Ŭ¶ó¿ìµå¼ºñ½º³»¿¡¼ ½ÇÇàÀ» Àü¹®ÀûÀ¸·Î ÀûÀº ¿ë·®¿¡ OS ÀÔ´Ï´Ù.
root@controller:~# mkdir /tmp/images
root@controller:~# cd /tmp/images
root@controller:/tmp/images# wget http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img
root@controller:/tmp/images# source /root/admin-openrc.sh
root@controller:/tmp/images# glance image-create --name "cirros-0.3.2-x86_64" --file cirros-0.3.2-x86_64-disk.img --disk-format qcow2 --container-format bare --is-public True --progress
[=============================>] 100%
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 64d7c1cd2b6f60c92c14662941cb7913 |
| container_format | bare |
| created_at | 2015-02-24T05:12:00 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | 14cb4b95-07c2-478a-88a6-fa1e7931f828 |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-0.3.2-x86_64 |
| owner | 1cf650d0c8ea4b8b93ee38b1bb3cea76 |
| protected | False |
| size | 13167616 |
| status | active |
| updated_at | 2015-02-24T05:12:01 |
| virtual_size | None |
+------------------+--------------------------------------+
»ý¼ºµÈ À̹ÌÁö¿¡ ±âº»°æ·Î´Â /var/lib/glance/images/ ÀÔ´Ï´Ù.
root@controller:/var/lib/glance/images# ls
14cb4b95-07c2-478a-88a6-fa1e7931f828
root@controller:/tmp/images# glance image-list
+--------------------------------------+---------------------+-------------+------------------+----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+---------------------+-------------+------------------+----------+--------+
| 14cb4b95-07c2-478a-88a6-fa1e7931f828 | cirros-0.3.2-x86_64 | qcow2 | bare | 13167616 | active |
+--------------------------------------+---------------------+-------------+------------------+----------+--------+
Ubuntu ±âº» Ŭ¶ó¿ìµå À̹ÌÁö µî·Ï (http://cloud-images.ubuntu.com/)
root@controller:/tmp/images# wget http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img
root@controller:/tmp/images# qemu-img info trusty-server-cloudimg-amd64-disk1.img
image: trusty-server-cloudimg-amd64-disk1.img
file format: qcow2
virtual size: 2.2G (2361393152 bytes)
disk size: 245M
cluster_size: 65536
Format specific information:
compat: 0.10
root@controller:/tmp/images# glance image-create --name "Ubuntu14.04_cloud-images" --file trusty-server-cloudimg-amd64-disk1.img --disk-format qcow2 --container-format bare --is-public True --progress
[=============================>] 100%
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | cf0fc236ad04ee6066852ca759a7ade9 |
| container_format | bare |
| created_at | 2015-02-26T05:41:43 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | a86622c9-a876-4fbc-825f-6f80a2fb8354 |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | Ubuntu14.04_cloud-images |
| owner | 1cf650d0c8ea4b8b93ee38b1bb3cea76 |
| protected | False |
| size | 256705024 |
| status | active |
| updated_at | 2015-02-26T05:41:45 |
| virtual_size | None |
+------------------+--------------------------------------+
root@controller:/tmp/images# glance image-list
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
| 14cb4b95-07c2-478a-88a6-fa1e7931f828 | cirros-0.3.2-x86_64 | qcow2 | bare | 13167616 | active |
| a86622c9-a876-4fbc-825f-6f80a2fb8354 | Ubuntu14.04_cloud-images | qcow2 | bare | 256705024 | active |
+--------------------------------------+--------------------------+-------------+------------------+-----------+--------+
root@controller:/tmp/images# ls -l /var/lib/glance/images/
total 263552
-rw-r----- 1 glance glance 13167616 2¿ù 24 14:12 14cb4b95-07c2-478a-88a6-fa1e7931f828
-rw-r----- 1 glance glance 256705024 2¿ù 26 14:41 a86622c9-a876-4fbc-825f-6f80a2fb8354
:: ´ë½Ãº¸µå¸¦ ÀÌ¿ëÇؼ VM ÀνºÅϽº »ý¼º
cloud-images.ubuntu.com¿¡¼ ¹èÆ÷µÇ´Â À̹ÌÁö´Â compute ³ëµå¿¡¼¸¸ Á¢±Ù°¡´É
root@ubuntu:~# ssh -lroot 192.168.145.3
Please login as the user "ubuntu" rather than the user "root".
root@ubuntu:~# ssh -lubuntu 192.168.145.3
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-45-generic x86_64)
½º¸¶Àϼºê Ŭ¶ó¿ìµå ¹èÆ÷¿ë À̹ÌÁö µî·Ï
À̹ÌÁö´Â FTP¸¦ ÅëÇØ /tmp/images µð·ºÅ丮·Î ´Ù¿î·Îµå
root@controller:/tmp/images# wget http://mirror.cloudv.kr/Openstack_images/Centos_6.6_64bit.qcow2
root@controller:/tmp/images# glance image-create --name "CentOS6.6 SMILESERV-IMG" --file Centos_6.6_64bit.qcow2 --disk-format qcow2 --container-format bare --is-public True --progress
[=============================>] 100%
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 578f975bc18009a9fe12f5e211e38db0 |
| container_format | bare |
| created_at | 2015-02-26T06:58:23 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | a4373411-7dff-4083-aa9a-6e94b3f2944d |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | CentOS6.6 SMILESERV-IMG |
| owner | 1cf650d0c8ea4b8b93ee38b1bb3cea76 |
| protected | False |
| size | 2822307840 |
| status | active |
| updated_at | 2015-02-26T06:59:27 |
| virtual_size | None |
+------------------+--------------------------------------+
root@controller:/tmp/images# glance image-list
+--------------------------------------+------------------------------+-------------+------------------+------------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+------------------------------+-------------+------------------+------------+--------+
| 14cb4b95-07c2-478a-88a6-fa1e7931f828 | cirros-0.3.2-x86_64 | qcow2 | bare | 13167616 | active |
| a86622c9-a876-4fbc-825f-6f80a2fb8354 | Ubuntu14.04_cloud-images | qcow2 | bare | 256705024 | active |
| a4373411-7dff-4083-aa9a-6e94b3f2944d | CentOS6.6 SMILESERV-IMG | qcow2 | bare | 2822307840 | active |
+--------------------------------------+------------------------------+-------------+------------------+------------+--------+
root@controller:/tmp/images# ls -l /var/lib/glance/images/
total 3019716
-rw-r----- 1 glance glance 13167616 2¿ù 24 14:12 14cb4b95-07c2-478a-88a6-fa1e7931f828
-rw-r----- 1 glance glance 2822307840 2¿ù 26 15:59 a4373411-7dff-4083-aa9a-6e94b3f2944d
-rw-r----- 1 glance glance 256705024 2¿ù 26 14:41 a86622c9-a876-4fbc-825f-6f80a2fb8354
:: ´ë½Ãº¸µå¸¦ ÀÌ¿ëÇؼ VM ÀνºÅϽº »ý¼º