Giter Club home page Giter Club logo

oz-minimum's Introduction

Create CentOS minimum image

Setup

yum install -y oz
cp -a /etc/oz/oz.cfg{,.orig}
sed -i 's/raw/qcow2/g' /etc/oz/oz.cfg

Image Create

oz-install -p -u -d3 -a centos6.ks -x centos65-libvirt.xml centos65.tdl
qemu-img convert -c /var/lib/libvirt/images/centos-6.5.x86_64.qcow2 -O qcow2 /root/centos-6.5-`date '+%Y%m%d'`.0.x86_64.qcow2
rm -rf /var/lib/oz/icicletmp/centos-6.5.x86_64
rm -f /var/lib/libvirt/images/centos-6.5.x86_64.qcow2

oz-install -p -u -d3 -a centos6-epel.ks -x centos65-epel-libvirt.xml centos65-epel.tdl
qemu-img convert -c /var/lib/libvirt/images/centos-6.5-epel.x86_64.qcow2 -O qcow2 /root/centos-6.5-epel-`date '+%Y%m%d'`.0.x86_64.qcow2
rm -rf /var/lib/oz/icicletmp/centos-6.5-epel.x86_64
rm -f /var/lib/libvirt/images/centos-6.5-epel.x86_64.qcow2

Cleanup

rm -f /var/lib/oz/kernels/CentOS-65x86_64-kernel
rm -f /var/lib/oz/kernels/CentOS-65x86_64-ramdisk

Test

. ~/keystonerc_admin
nova flavor-create m2.small 6 1024 2 1
glance image-create --name 'CentOS 6.5' --disk-format qcow2 --container-format bare --file ~/centos-6.5-epel-*.0.x86_64.qcow2 --is-public True --progress

. ~/keystonerc_demo
nova keypair-add --pub-key ~/.ssh/id_rsa.pub root
neutron security-group-rule-create --direction ingress --protocol icmp default --remote-ip-prefix 0.0.0.0/0
neutron security-group-rule-create --direction ingress --protocol tcp --port-range-min 22 --port-range-max 22 default --remote-ip-prefix 0.0.0.0/0
nova boot --flavor m2.small --image 'CentOS 6.5' --key-name root --nic net-id=`neutron net-list | awk '/private/ { print $2 }'` --poll test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.