gushiren

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
yum -y install python-virtualenv.noarch
virtualenv ~/dib-virtualenv
. ~/dib-virtualenv/bin/activate
git clone https://github.com/openstack/diskimage-builder.git
git clone https://git.openstack.org/openstack/tripleo-image-elements.git
pip install diskimage-builder
pip install dib-utils pyyaml
pip list
 
 
disk-image-create --mkfs-options '-i 16384' <distro> vm
disk-image-create ubuntu baremetal dhcp-all-interfaces grub2 -o ubuntu -t raw
 
disk-image-create vm centos7 os-collect-config os-refresh-config os-apply-config heat-config heat-config-script heat-config-ansible -o centos7-software-config.qcow2
 
disk-image-create centos7 vm  -o rain4 -t raw --image-size 20 >> rain4.txt 2>&1
 
export DIB_RELEASE=jessie
export DIB_DISABLE_KERNEL_CLEANUP=1
export DIB_LOCAL_IMAGE='/root/precise-server-cloudimg-amd64.img'
export REG_METHOD='portal' REG_REPOS='rhel-7-server-openstack-8-rpms'
export REG_USER='root' REG_PASSWORD='www.123' REG_AUTO_ATTACH=true
 
export DISTRO_NAME=centos7
export DIB_RELEASE=GenericCloud-1508
export DIB_RELEASE=precise
export DIB_LOCAL_IMAGE='/root/precise-server-cloudimg-amd64.img'
export DIB_CLOUD_INIT_DATASOURCES="ConfigDrive,OpenStack"
export DIB_CLOUD_IMAGES=CentOS-7-x86_64-GenericCloud-1503.qcow2
 
disk-image-create --offline vm centos7  -o centos7.3 -t raw --image-size 20 >> centos7.3-2.txt
disk-image-create vm debian -p qemu-guest-agent >>debian1.txt 2>&1
disk-image-create ubuntu vm -0 rain5 -t raw >> rain5.txt 2>&1
wget http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-OracleCloud.raw.tar.gz
file test.raw
fdisk -l test.raw
kpartx -a test.raw
losetup -a
dd if=/dev/mapper/loop0p1 of=test.xfs.raw bs=1M
 
mkdir /tmp/mnt
mount test.raw /tmp/mnt
chroot /tmp/mnt /bin/bash
echo nameserver 114.114.114.114 > /etc/resolv.conf
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
yum install puppet
yum install ntpdate lsof
vi /etc/selinux/config
disabled
openstack windows image creation newbie
http://cloud.centos.org/centos/7/images/
 
export DIB_RELEASE=21
export DIB_CLOUD_IMAGES='http://1.1.1.1/iamges'
export BASE_IAMGE_FILE="test.qcow2"
export DIB_YUM_REPO_CONF='pwd'/redhat.repo
export REG-METHOD=’disable'
export REG_HALT_UNREGISTER=1

 

posted on 2018-08-30 16:32  gushiren  阅读(853)  评论(0编辑  收藏  举报