Skip to content

OpenStack:Glance

Default metadata

다음의 CLI 명령을 사용하여 Glance 기본 정의를 가져올 수 있습니다.

glance-manage db_load_metadefs

Create image

  1. OS 설치.
  2. ACPI 설치.
    ```bash $ sudo yum install acpid && sudo systemctl enable acpid
    </li>
    <li markdown="1">
    [cloud-init](Cloud-init.md) 설치.
    </li>
    
    </ol>
    <h2 markdown="1">
    Windows cloud image
    </h2>
    <ul markdown="1">
    <li markdown="1">
    [OpenStack Windows Server 2012 R2 Evaluation Image](https://cloudbase.it/openstack-windows-server-2012-r2-evalution-images/)
    </li>
    <li markdown="1">
    [How to create Windows OpenStack images](https://cloudbase.it/create-windows-openstack-images/)
    </li>
    
    </ul>
    <p markdown="1">
    How to deploy the images in OpenStack
    </p>
    <p markdown="1">
    The first thing consists in downloading an image and uploading it in Glance. (for KVM)
    </p>
    ```bash
    gunzip -cd  windows_server_2012_r2_standard_eval_kvm_20131031.vhd.gz | \
    glance image-create --property hypervisor_type=qemu --name "Windows Server 2012 R2 Std Eval" \
    --container-format bare --disk-format qcow2
    

    Now just boot the image as usual, providing a keypair, which is needed to retrieve the password later.

    nova boot --flavor 2 --image "Windows Server 2012 Std Eval" --key-name key1 MyWindowsInstance
    

    Once the image has been booted, you can get the Admin user’s password with:

    nova get-password MyWindowsInstance /path/to/your/keypairs/private/key
    

    WARNING

    Please note that the HTTP metadata service must be available in order for this feature to work. If you see a blank password, most probably the HTTP metadata service was not available when the password was set or the instance has been booted without a keypair assigned.

    Metadata 접근이 정상적으로 이루어 지지 않을 경우, http://169.254.169.254/latest/meta-data/주소로 접근이 잘 되는지 확인해 보자. 덧붙여, External network에 직접 연결될 경우 169.154.169.254/32에 대한 라우팅 테이블을 추가해야 한다.

    How to access the image via Remore Desktop Protocol (RDP)

    First, make sure to add the RDP TCP port (3389) to a security group, for example:

    nova secgroup-add-rule default tcp 3389 3389 0.0.0.0/0
    

    Download URL

    ## CentOS 7 x86_64
    ## Centos 6.X and 7.0 default username and password: https://stackops.zendesk.com/hc/en-us/articles/201923327-Centos-6-X-and-7-0-default-username-and-password
    curl -O http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1605.qcow2
    
    ## Cirros 0.3.4 x86_64
    curl -O http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
    
    ## Ubuntu 14.04 x86_64
    curl -O http://cloud-images.ubuntu.com/trusty/20160610/trusty-server-cloudimg-amd64-disk1.img
    
    ## CoreOS 1010.5.0 x86_64
    curl -O https://stable.release.core-os.net/amd64-usr/1010.5.0/coreos_production_openstack_image.img.bz2
    
    # cat cirros-0.3.4-x86_64-disk.img | glance image-create --name='CirrOS 0.3.4 x86_64'  --visibility=public --container-format=bare --disk-format=qcow2
    # cat CentOS-7-x86_64-GenericCloud-1605.qcow2 | glance image-create --name='CentOS 7 x86_64 GenericCloud 1605'  --visibility=public --container-format=bare --disk-format=qcow2
    # cat coreos_production_openstack_image.img | glance image-create --name='CoreOS 0.3.4 x86_64 OpenStack'  --visibility=public --container-format=bare --disk-format=qcow2
    # cat trusty-server-cloudimg-amd64-disk1.img | glance image-create --name='Ubuntu 14.04 amd64 Server Cloudimg'  --visibility=public --container-format=bare --disk-format=qcow2
    # cat windows_server_2012_r2_standard_eval_kvm_20151021.qcow2 | glance image-create --name='Windows Server 2012 Std Eval KVM 20151021'  --visibility=public --container-format=bare --disk-format=qcow2
    

    Troubleshooting

    List of OpenStack Service

    OpenStack Service

    Main

    Horizon, Nova, Neutron

    Storage

    Swift, Cinder

    Shared services

    Keystone, Glance, Ceilometer

    Higher-level services

    Heat

    ETC

    cloud-init

    See also

    Favorite site