Create Image with useful softwares

来源:互联网 发布:广联达预算软件试用版 编辑:程序博客网 时间:2024/06/06 07:30
n the openstack setup testing, usually we need to launch many instances with pre-installed softwares, and then start the testing. Here is how to make images with the useful softwares.

In KVM setup:

Step1: Create one vm in Virtual Machine Manager.

Step2: Set the network available for the vm, and then copy the installer files into the vm, and install them.

Step3: Check the disk location of the vm, and then convert the image type using qemu-img command.

Example:

Creat temp-redhat vm, and source path is: /root/temp.img

Check the file format:

[root@juno-auto-slot1 ~]# qemu-img info  temp.img
image: temp.img
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 8.4G
[root@juno-auto-slot1 ~]#

 

Convert the image format from raw to qcow2:

[root@juno-auto-slot1 ~]# qemu-img convert -c -f raw -O qcow2 temp.img redhat_new.qcow2

-c: means to be compressed

-f: the original format

-O: the output format

Step 4: transfer the image file to controller node and add into the glance image  pool

 

VMware VM:

Will add after verification.

0 0
原创粉丝点击