我要评分
获取效率
正确性
完整性
易理解

Uploading Images to the Image Service

Before uploading an image to the image service, you need to prepare the required VM image.

  1. Import environment variables.
    source ~/.admin-openrc
  2. Download the image. For example, the openEuler-22.03-LTS-SP2 VM image from the Huawei Mirrors website.
    wget --no-check-certificate https://mirrors.huaweicloud.com/openeuler/openEuler-22.03-LTS-SP2/virtual_machine_img/aarch64/openEuler-22.03-LTS-SP2-aarch64.qcow2.xz
    xz -d openEuler-22.03-LTS-SP2-aarch64.qcow2.xz
  3. Query the virtual drive size of the image.
    qemu-img info openEuler-22.03-LTS-SP2-aarch64.qcow2

    In the command output, virtual size indicates the virtual drive size of the image.

  4. Upload the image to the image service.
    openstack image create --disk-format qcow2 --container-format bare --file openEuler-22.03-LTS-SP2-aarch64.qcow2 --public $image_name

    Replace image_name with the name of the created image.