openstack创建winxp镜像的注意事项

openstack创建winxp镜像的注意事项

网络上有创建winxp镜像的过程文章在这里以及中文版本这里。但是文章不齐全,丢弃了很多步骤,主要过程为:

1. 准备winxp的ISO

2. The first step would be to create a raw image on Client1, this will represent the main HDD of the virtual machine, so make sure to give it as much space as you will need.

kvm-img create -f raw winxp.img 20G

3.OpenStack presents the disk using aVIRTIO interface while launching the instance. Hence the OS needs to have drivers for VIRTIO. By default, the Windows Server 2008 ISO does not have the drivers for VIRTIO. Sso download a virtual floppy drive containing VIRTIO drivers from the following location

http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/

Download both files for later using .

Parent Directory -

virtio-win-0.1-mm34.iso 15-Jun-2011 18:02 40M

virtio-win-1.1.16.vfd 15-Jun-2011 18:02 1.4M

4.Attach it during installation and Start running by

sudo kvm -m 1024 -cdrom WinXP_E.ISO -drive file=winxp.img,if=virtio,boot=on -fda virtio-win-1.1.16.vfd -boot d -nographic -vnc :0

Caution:

I. open /dev/kvm: No such file or directory

Could not initialize KVM, will disable KVM support [means your machine do not support VT]

II. pci_add_option_rom: failed to find romfile “pxe-rtl8139.bin”

You have to install kvm-pxe

apt-get install kvm-pxe

5.使用vnc客户端连接安装系统。

但是网络上的文章都不太齐全,在第4步的时候会不通过。会走硬盘启动,需要让kvm提示启动菜单走光驱启动,所以正确的是:

kvm -m 1024 -cdrom winxp.iso -drive file=winxp.img,if=virtio,boot=on -fda virtio-win-1.1.16.vfd -boot order=d,menu=on -nographic -vnc :0

加上-boot order=d,menu=on 才正确!

服务器维护 服务器配置 服务器 维护 运维 网管 系统调优 网络调优 数据库优化