Octavia创建amphora-x64-haproxy镜像

 

制作并导入Amphora镜像

 

git clone https://github.com/openstack/octavia.git
cd octavia/diskimage-create/
./diskimage-create.sh -i centos -t qcow2 -o amphora-x64-haproxy -r 1234qwer -s 4

 

注:制作镜像时脚本会去读取国外的源,网络环境不好的情况下会无法顺利创建镜像

diskimage-create命令语法

 

diskimage-create.sh
[-a i386 | amd64 | armhf ]  
[-b haproxy ] 
[-c ~/.cache/image-create | <cache directory> ]
[-h]
[-i ubuntu | fedora | centos ]
[-o amphora-x64-haproxy | <filename> ]
[-r <root password> ]
[-s 5 | <size in GB> ]
[-t qcow2 | tar ]
[-w <working directory> ]
‘-a’ is the architecture type for the image (default: amd64) #指定镜像架构,默认是amd64
‘-b’ is the backend type (default: haproxy)  #指定backend类型,默认是haproxy
‘-c’ is the path to the cache directory (default: ~/.cache/image-create) 
‘-h’ display help message
‘-i’ is the base OS (default: ubuntu) #指定系统,默认是Ubuntu
‘-o’ is the output image file name  #指定镜像名称
‘-r’ enable the root account in the generated image (default: disabled) #启用root账号并指定密码
‘-s’ is the image size to produce in gigabytes (default: 5) #指定镜像大小
‘-t’ is the image type (default: qcow2) #指定镜像类型
‘-w’ working directory for image building (default: .)

 

 

参考:https://docs.openstack.org/octavia/ocata/specs/version0.5/base-image.html

 

posted @ 2021-05-28 15:38  钟桂耀  阅读(693)  评论(0编辑  收藏  举报