使用virt
小伙伴们好不容易的把openstack环境部署好了;默认会有一个ubuntu系统的镜像,如果想使用centos或者是其它的系统怎么办呢?那么接下就是制作咯;如果你会制作一个任意系统只要是openstack能支持的就行,这样就不用担心没有系统资源的问题了;如果在安装配置virt-manager有问题,请看我之前发布的文章;
前提准备:
系统镜像:centos6
虚拟磁盘:virtual_disk
创建虚拟磁盘:
qemu-img create -f qcow2 centos6.img 10G 运行
# virt-manager 打开Virtual Machine Manaer图形界面;
http://www.iopenstack.com/wp-content/uploads/2014/03/%E6%89%93%E5%BC%80virt-manager.png
这个还可以监控vm的cpu,内存等信息;
新建一个vm
http://www.iopenstack.com/wp-content/uploads/2014/03/%E6%96%B0%E5%BB%BA-vm.png
选择操作系统
http://www.iopenstack.com/wp-content/uploads/2014/03/%E9%80%89%E6%8B%A9%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F.png
选择启动镜像
http://www.iopenstack.com/wp-content/uploads/2014/03/%E9%80%89%E6%8B%A9%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F2.png
选择存储磁盘
http://www.iopenstack.com/wp-content/uploads/2014/03/%E9%80%89%E6%8B%A9%E5%AD%98%E5%82%A8%E7%9B%98.png
配置cpu和内存大小
http://www.iopenstack.com/wp-content/uploads/2014/03/%E9%85%8D%E7%BD%AE%E5%86%85%E5%AD%98%E5%92%8Ccpu.png
完成配置
http://www.iopenstack.com/wp-content/uploads/2014/03/%E9%85%8D%E7%BD%AE%E5%AE%8C%E6%88%90.png
配置键盘模式;要不输入会有问题
http://www.iopenstack.com/wp-content/uploads/2014/03/%E9%85%8D%E7%BD%AE%E4%B8%80%E4%B8%8B%E9%94%AE%E7%9B%98%E6%A8%A1%E5%BC%8F.png
完成配置,开始安装;
http://www.iopenstack.com/wp-content/uploads/2014/03/%E5%BC%80%E6%9C%BA%E5%AE%89%E8%A3%85.png
http://www.iopenstack.com/wp-content/uploads/2014/03/%E5%AE%89%E8%A3%85%E8%BF%87%E7%A8%8B1.png
http://www.iopenstack.com/wp-content/uploads/2014/03/%E8%B7%B3%E8%BF%87%E6%A3%80%E6%9F%A5%E9%95%9C%E5%83%8F.png
http://www.iopenstack.com/wp-content/uploads/2014/03/%E5%8F%91%E7%8E%B0%E9%95%9C%E5%83%8F.png
http://www.iopenstack.com/wp-content/uploads/2014/03/%E9%85%8D%E7%BD%AE%E4%B8%BB%E6%9C%BA%E5%90%8D.png
http://www.iopenstack.com/wp-content/uploads/2014/03/%E8%AE%BE%E7%BD%AE%E6%97%B6%E5%8C%BA.png
http://www.iopenstack.com/wp-content/uploads/2014/03/%E9%80%89%E6%8B%A9%E8%87%AA%E5%AE%9A%E4%B9%89%E5%88%86%E5%8C%BA.png
http://www.iopenstack.com/wp-content/uploads/2014/03/%E5%BC%80%E5%A7%8B%E8%87%AA%E5%AE%9A%E4%B9%89%E5%88%86%E5%8C%BA.png
http://www.iopenstack.com/wp-content/uploads/2014/03/%E5%88%86%E5%8C%BA%E5%AE%8C%E6%88%90.png
http://www.iopenstack.com/wp-content/uploads/2014/03/%E7%A1%AE%E8%AE%A4%E5%88%86%E5%8C%BA.png
http://www.iopenstack.com/wp-content/uploads/2014/03/%E6%A0%BC%E5%BC%8F%E5%8C%96%E7%A3%81%E7%9B%98.png
http://www.iopenstack.com/wp-content/uploads/2014/03/%E6%9C%80%E5%B0%8F%E5%AE%89%E8%A3%85%E6%9C%8D%E5%8A%A1.png
http://www.iopenstack.com/wp-content/uploads/2014/02/20.jpg
完成重新启动一下!
删除网络配置
删除ifcfg-eth0的HWADDR一行,最后你的ifcfg-eth0的配置文件应该是这样的:
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
删除已生成的网络设备规则
rm -rf /etc/udev/rules.d/70-persistent-net.rules
关闭防火墙和selinux
sed -i s/^SELINUX=.*/SELINUX=disabled/g /etc/selinux/config
service iptables stop && chkconfig iptables off
service ip6tables stop && chkconfig ip6tables off
init 0
上传到openstack中:http://kernal.blog.51cto.com/8136890/1530227
页:
[1]