openstack image guide总结

来源:互联网 发布:淘宝宝贝搬家 编辑:程序博客网 时间:2024/05/17 09:25

引言

What is a virtual machine image?
A virtual machine image is a single file which contains a virtual disk that has a bootable operating system installed on it.


Virtual machine images come in different formats:
    Raw     The "raw" image format is the simplest one, and is natively supported by both KVM and Xen hypervisors. You can think of a raw image as being the bit-equivalent of a block device file, created as if somebody had copied, say, /dev/sdato a file using the ddcommand.


    qcow2    The qcow2(QEMU copy-on-write version 2) format is commonly used with the KVM hypervisor. It has some additional features over the raw format, such as:
? Using sparse representation, so the image size is smaller
? Support for snapshots
    Note:Because raw images don't support snapshots, OpenStack Compute will automatically convert raw image files to qcow2 as needed.
    
    ISO     The ISOformat is a disk image formatted with the read-only ISO 9660 (also known as ECMA-119) filesystem commonly used for CDs and DVDs. While we don't normally think of ISO as a virtual machine image format, since ISOs contain bootable filesystems with an installed operating system, you can treat them the same as you treat other virtual machine image files.






Disk and container formats for images
When you add an image to the Image Service, you can specify its disk and container formats.
Disk formats
    The disk format of a virtual machine image is the format of the underlying disk image. 
    Set the disk format for your image to one of the following values:
    ? raw. An unstructured disk image format; if you have a file without an extension it is possibly a raw format
    ? vdi. Supported by VirtualBox virtual machine monitor and the QEMU emulator
Container formats
    The container format indicates whether the virtual machine image is in a file format that also contains metadata about the actual virtual machine.
    You can set the container format for your image to one of the following values:
    ? bare. The image does not have a container or metadata envelope.
    
2 Get images
The simplest way to obtain a virtual machine image that works with OpenStack is to download one that someone else has already created.    
CirrOS is a minimal Linux distribution that was designed for use as a test image on clouds
such as OpenStack Compute. You can download a CirrOS image in various formats from the
https://download.cirros-cloud.net/
https://download.cirros-cloud.net/0.3.0/cirros-0.3.0-x86_64-disk.img


Official Ubuntu images: http://cloud-images.ubuntu.com/
If your deployment uses QEMU or KVM, we recommend using the images in qcow2 format. 
http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
    

安装

apt-get install libguestfs-tools


To create a new image, you will need the installation CD or DVD ISO file for the guest operating system. 


0 0
原创粉丝点击