您的位置:首页 > 运维架构 > Linux

openstack linux 虚拟机镜像制作

2014-08-31 14:44 387 查看
一、概述 在制作openstack linux镜像的过程中,之前一直按照VPsee的说明制作,期间遇到诸多的问题,一直没有成功,可能是由于自己对于kvm的参数不了解,而且简单的使用其命令没有动脑筋。导致此工作一直搁置,转而完成wins的镜像制作。 最近看到 http://blog.sina.com.cn/s/blog_98437f4001015iqt.html,简单明了,于是又开始尝试,经过测试没有问题。二、centos.img制作:(1)kvm-img create -f raw centos.img 10G(2)kvm -m 512 -cdrom CentOS-6.3-x86_64-minimal.iso \
-drive file=centos.img -boot d -net nic -net tap -nographic -vnc:0(3)kvm -m 512 -drive file=centos.img -boot c -net nic -net tap\
-nographic -vnc :0(4)glance发布到云中
glance add name="CentOS 6.3 x86_64" is_public=truecontainer_format=ovf \
disk_format=raw < /root/centos.img 三、ubuntu.img制作:(1)kvm-img create -f raw ubuntu.img 10G
(2)kvm -m 512 -cdrom ubuntu-11.10-server-amd64.iso \
-drive file=ubuntu.img -net nic -net tap -boot d -nographic-vnc :0
(3)kvm -m 512 -drive file=ubuntu.img -boot c -net nic -net tap -nographic -vnc :0(4)glance发布到云中
glance add name="Ubuntu 12.04 server" is_public=truecontainer_format=ovf \
disk_format=raw < /root/ubuntu.img
四、总结过去出问题的原因:1. 对于kvm命令的参数不了解,把问题想复杂了。2. 指导手册需要自己验证才可靠。3. openstack、linux的版本升级已经修正bug4. 镜像的制作流程化,应该可以用脚本来实现。
PS:后期将脚本发不出来。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: