製作一個系統鏡像上傳到/mnt/p_w_picpath目錄下:
CentOS6.5.img
$ glance p_w_picpath-create –name centos6.5 –disk-format=qcow2 –container-format=bare –is-public=True –file=/mnt/p_w_picpath/centos6.5.img
解釋:
–name NAME 上傳完鏡像在openstack中顯示的名稱;
–disk-format DISK_FORMAT 鏡像格式;openstack支持的格式詳情請看官方介紹;
–container-format CONTAINER_FORMAT 圖片的容器格式,可以是ami,ari,aki,ovf,bare默認是bare
–owner TENANT_ID 那個租戶可以使用此鏡像
–size SIZE 這個鏡像的大小
–min-disk DISK_GB 這個鏡像啓動最小需要的大小;
–min-ram DISK_RAM 啓動這個鏡像需要的最小內存;
–location IMAGE_URL 在web界面中可以使用url地址上傳鏡像,目前支持http協議的;
–file FILE 鏡像所在本地目錄;
–checksum CHECKSUM 鏡像數據驗證;
–is-public [True|False] 是否共享此鏡像;共享後其他用戶也可以使用此鏡像啓動instance;