Create an openstack centos-6.2 image on a centos-6.2

Source: Internet
Author: User

Currently, many openstack images are created based on Ubuntu.ArticleBut many of my friends, like me, install openstack Based on centos 6.2 and create their own image files. There are almost no articles in this regard, so I have made my own centos6.2 image by referring to creating images and other articles on Ubuntu, And I will share it with you as a record, for future use.

Preparations:

A centos system is installed on the Virtual Machine VMWare, and CentOS-6.2-x86_64-minimal.iso and qemu-KVM are also required.

Yum install KVM

Configure the server of RealVNC on centos.

After preparation, run: 

A: qemu-IMG create-F raw centos. IMG 5g

B:/usr/libexec/qemu-KVM-M 1024-CDROM
CentOS-6.2-x86_64-minimal.iso-Drive file = centos. IMG, if = virtio, Index = 1-boot D-net NIC-Net user-nographic-VNC: 1

In this case, connect with the VNC tool (when using vncviewer to connect, you need to remove the hook before adapt to network speed in option), then install centos6.2, and create a partition on the disk. It is best to go to the desktop package and install the development kit. Then, clear the iptables rule and disable SELinux. Set the NIC configuration to DHCP mode.

Note: If a problem occurs after centos is installed and restarted, you can kill the process in B and re-execute/usr/libexec/qemu-KVM-M 1024-drive file = centos. IMG,-boot C-net NIC-nographic-VNC: 1 and then connect with vncviewer again. To ensure that the image can be connected through SSH, make sure that the image sshd service is enabled (that is, service sshd start ).

C: reboot

D: Halt

At this time, you can import the image.

Glance Add name = "centos6.2" is_public = true container_format = ovf disk_format = raw </root/centos. img

 

At this time, if the glance index shows centos6.2, it indicates that the production is successful.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.