Refference [CSS group] Image management
I'm using WinXP b32 Eng.
On a linux host and kvm is installed inside this machine , Actually , you can use nova-compute node
1. Prepare a WinXP ISO image. I named it as "WinXP_E.ISO". Make an ISO image
I use free software ImgBurn to build iso image on Windows.
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
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
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. I use VNC on my windows desktop . For now , you need RealVNC to connect your VM. Don't forget the -vnc :0 with your VNC viewer.
The IP address is the host which hold the VM.
After that you'll see a QEMU window , Just follow the installation step. You'll get into XP soon.
6. Install any softwares that you'll run in cloud server later.
7. Configure your XP for Cloud starting up.
- Create an "ADMIN" account for RDP connection
- Enable RDP connection
- Due to the security will be handle by openstack , and RDP port should be open. I disabled windows firewall
- Verify the Network interface is set to DHCP mode, Nova assign IP for instance by dnsmasq(FlatDHCP&Vlan)
8. Now turn off you Windows VM , everything is been write in winxp.img , we have to bundle it into cloud now. Euca2ool will be use in my example . But it wastes lots of time for Openstack Nova.
euca-bundle-image -i winxp.img euca-upload-bundle -b mybucket -m /tmp/winxp.img.manifest.xml euca-register mybucket/winxp.img.manifest.xml
Due to nova-objectstore need to untarring the image for Glance , It takes time to do that.
We can check the status by
glance index watch "glance show img_id"
Once the "image_state" is available , yes it's ready. In my case , it takes 15mins to untar
URI: http://0.0.0.0/images/48 Id: 48 Public: Yes Name: None Size: 21474836480 Location: file:///var/lib/glance/images/48 Disk format: ami Container format: ami Property 'image_location': WinXP/windowsserver.img.manifest.xml Property 'image_state': available Property 'project_id': hugopro Property 'architecture': x86_64
Actually , we can add the image to Glance directly without euca2ools."#glance add" or "glance-upload" cmds will be faster. Plz check the instruction for more details
9. Security group for RDP connection. For OpenStack to allow incoming RDP Connections, use euca-authorize command to open up port 3389 .
euca-authorize -P tcp -p 3389 default
root@nova:~# euca-describe-group GROUP pro1 default default PERMISSION pro1 default ALLOWS icmp -1 -1 FROM CIDR 0.0.0.0/0 PERMISSION pro1 default ALLOWS tcp 22 22 FROM CIDR 0.0.0.0/0 PERMISSION pro1 default ALLOWS tcp 3389 3389 FROM CIDR 0.0.0.0/0
10. You can associate a public IP for the instance , and connect to winXP by RDP
11. Use volume storage(EBS) in WIN instance
Attach a volume to instance as usual . You have to partition the new storage of instance.
Any possible to get console-output of raw image?