Openstack镜像制作

Openstack镜像制作

qemu-img create -f qcow2 /opt/centos6.5-x86-64-openstack-DEV.img 50G
qemu-img create -f qcow2 /opt/centos6.5-x86-64-openstack-QAS.img 50G
qemu-img create -f qcow2 /opt/centos6.5-x86-64-openstack-PRD.img 100G

virt-install --name centos6.5-x86-64-openstack --virt-type kvm --ram 1024 --cdrom=/opt/CentOS-6.5-x86_64-minimal.iso --disk path=/opt/centos6.5-x86-64-openstack.img --network network=default --graphics vnc,listen=0.0.0.0 --noautoconsole

virt-install --name centos6.5-x86-64-openstack-DEV --virt-type kvm --ram 1024 --cdrom=/opt/CentOS-6.5-x86_64-minimal.iso --disk path=/opt/centos6.5-x86-64-openstack-DEV.img --network bridge=br0 --graphics vnc,listen=0.0.0.0 --noautoconsole
virt-install --name centos6.5-x86-64-openstack-QAS --virt-type kvm --ram 1024 --cdrom=/opt/CentOS-6.5-x86_64-minimal.iso --disk path=/opt/centos6.5-x86-64-openstack-QAS.img --network bridge=br0 --graphics vnc,listen=0.0.0.0 --noautoconsole
virt-install --name centos6.5-x86-64-openstack-PRD --virt-type kvm --ram 1024 --cdrom=/opt/CentOS-6.5-x86_64-minimal.iso --disk path=/opt/centos6.5-x86-64-openstack-PRD.img --network bridge=br0 --graphics vnc,listen=0.0.0.0 --noautoconsole

1、执行初始化脚本

。。。。。。。。。。。


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
遇见的问题
openstack 中 启动虚拟机出现MP-BIOS bug:8254 timer not connected to IO-APIC

解决办法
添加noapic内容
根目录下的boot/grub 文件夹中的menu.lst 里的kernel /vmlinuz 这一行最后添加noapic 就行了。


[root@host-10-168-124-13 ~]# cat /boot/grub/menu.lst 
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/vda2
#          initrd /initrd-[generic-]version.img
#boot=/dev/vda
default=0
timeout=1
#splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-431.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=UUID=007e2a26-aa5b-4ad9-b9bb-1adf5dede72b rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb noapicquiet
initrd /initramfs-2.6.32-431.el6.x86_64.img
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2、网卡内容修改为

[nfyguser@server-7b0db96e ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0 
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"

3、同样地,清除 /etc/udev/rules.d文件的网络设备命名规则,因为这些规则将从实例的网卡获得。
rm -rf /etc/udev/rules.d/70-persistent-net.rules

你可能感兴趣的:(云计算)