Building a Windows Image for OpenStack
Building a Windows Image for OpenStack : Here is a how-to for building a Windows image to import into OpenStack or a KVM Hypervisor. We need to sysprep the image before we can import it into Glance.
http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/
System Prep
1 2 3 4 5 6 |
; html-script: false ]apt-get install vncviewer kvm qemu-kvm kvm-img create -f raw windowsr2.img 20G (Create the image file) kvm -m 2048 -no-reboot -boot order=d -drive file=windowsr2.img,if=virtio,boot=off -drive file=windows-2008r2.iso,media=cdrom,boot=on -drive file=virtio-win-0.1-30.iso,media=cdrom,boot=off -net nic,model=virtio -nographic -vnc :1 vncviewer |
Build the Windows Image for OpenStack
Enter 127.0.0.1:1 into the window. :1 = is the screen number after you put in the KVM command. This will spawn a VNC window in which you will install windows.
Import the Image into Glance
1 2 3 4 5 6 |
; html-script: false ]glance add name=Ubuntu-12.04 is_public=true container_format=ovf disk_format=qcow2 < windowsr2.img #Open TCP 3389 and ICMP in Nova Security nova secgroup-add-rule default tcp 3389 3389 0.0.0.0/0 nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0 |
Good article.Thanks..
Unable to connect to the windows system using vnc after reboot.
So, Unable to perform steps mentioned in fig6 and fig7
hi…i am able to take vnc console again after running same command.
This time i was unable to update the driver.Please give your suggestions.
Hi Karthick, Do you you mean you cannot update the NIC driver? Is it showing up as using the Redhat virtio driver? You load that driver from the red hat virtio iso.
When you said VNC did you mean windows remote desktop? Are you trying to attach inside an OpenStack env? More info and I will try and assist.
Thanks,
You guide is excellent, when it comes to install Windows Server or windows Vista as they have facility to look the drivers but what about the Windows Xp, please cater this also in you respected blog entry.
I am not able to connect to the Windows Server machine running in Openstack. I am currently running instance using VNC Console in browser.
I can ping other host, machines and even browse internet on same subnet and different subnet from the windows instance itself.
I can also ping & connect other linux instance which are running in openstack from host and other machine.
In My windows server Windows firewall is completely turned off.
Problem is i am not able to connect using RDP or able to ping to my windows instance running in openstack. Please help me.
Hey Brent
Been following this blog for a while now wanted to say you are making an awesome contribution to anybody who wants to learn networking and opensource cloud computing..
Thank you.
I wanted to ask the windows image you have prepared was it 32 or 64 bit
For some reason I am unable to run 64bit windows images under open stack
Prepared the image with virt-install and it updated all the drivers runs fine under kvm but as soon as i added to glance getting
0x0000005D error
virt-install –connect qemu:///system –arch=x86_64 -n winserver2008 -r 4096 –vcpus=2 \
–disk path=/opt/vmimgs/windows2008.img,bus=virtio,cache=none -c /opt/isos/winserver2008.iso –vnc \
–noautoconsole –os-type windows –os-variant=win2k8 –network=bridge:br100 \
–force –disk path=/opt/isos/virtio-win-0.1-30.iso,device=cdrom,perms=ro
Will appreciate any help I can get
Sincerely
Hi Alexander, thanks for the kind comments. Wonder, do you have anymore information in syslog or /var/log/glance/* ? Might give us some hints at what is failing there. Also probably dumb but just in case run a glance index to make sure Glance is operating and maybe even suck in a cloud precise image just for good measure.
Something like this in case you haven’t which you may very well have already.
wget https://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img &&
glance add name=Ubuntu-12.04 is_public=true container_format=ovf disk_format=qcow2 < precise-server-cloudimg-amd64-disk1.img Traveling some this coming week so response times may suck 🙂
Oh forgot to answer on the image, 64-bit.
Cya!
-Brent
Hello Brent
Was trying to figure out myself with no luck why i am unable to run 64 bit windows on the openstack essex install well tried all possible combinations missing something not sure what i am not what. Don’t have enough knowledge on networking and cloud computing but I am a java programmer so the the consents are not new :)..
Well here it goes. Installed under kvm with virt-install everything runs fine and dandy but when I load image to glance and spin the instance I get this 0x0000005D error not shure what causing it tred different combinations of creating an image with qcow2 formatting and raw and then upload with no luck.
Not shure if qemu openstack unable to run this kvm image or what. I was wondering if you could take a look for a minute maby you can help me out or pont me it to the right directions on where at list should i dig …
Panel default log in as I have used you python installer script. So the is a clean install of openstack essex
Through virtual machine manager you can see the is 3 instances one is running under kvm created with virt-install and the other 2 sinned in the openstack.
Windows running under kvm boots fine but under openstack it throws me an error massage ..
I have sent you a Metal SSH credentials via email
Will appreciate any help I can get .
Hey Brent
Thanks for the step by step instructions. They are a huge help. One question, after I uploaded the image to openstack the ethernet driver shows as a Realtek RTL8139C+ Fast Ethernet NIC. Details of the interface show it connected at 100Mbps. I was expecting a 1 gig connection. Do you konw if this is by design or just the limitation of the driver installed?
Thanks,
John
Hi Brent, I ran line 3 of the system prep and kvm: -drive file=windowsr2.img: drive with bus=0,unit=0(index =0) exists? How to solve that?
I did follow your steps
Hey Brent
When i’m try to execute “kvm -m 2048 -no-reboot -boot order=d -drive … ” to boot kvm with my iso files , i got this :
kvm: pci_add_option_rom: failed to find romfile “pxe-virtio.bin”
Warning: vlan 0 is not connected to host network
Thanks 🙂
Hi Nasir, Hi Nasir, Might be worth checking for the kvm-pxe dependency “dpkg –list | grep pxe” or “apt-get install kvm-pxe”
Thanks,
-Brent
Hey Brent, followed your guide and everything worked flawlessly in Folsom, except when I go to spin up the instance in my Horizon dashboard, I get an error. I opened up the all the ports on the VM including RDP and ICMP specifically. I even completely turned off the firewall the second time and the instance errors out at startup.
I feel like it may be a metadata problem where openstack is having trouble getting metadata through to instance during launch. (I thought maybe the Redhat Ethernet Driver would some magic happen there)… Is there like a cloud-utils or something I need to run in windows before uploading it with glance? Any help would be truly appreciated
Please can anybody help me???
On this link “http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/”, i see the latest Virtio drivers for Windows (virtio-win-0.1-52.iso) , but the directiories into this ISO show me: /VISTA, /WIN7, /WIN8, /WLH, /WNET, /WXP and finally /XP.
But i don’t know where are the drivers for Win-Servers? (ie Win 2003, 2003R2, 2008, 2008r2, 2011 and 2012 – for 32 and 64 Bit flavors)
Any help is welcome !!!!
Eest regards
Cesar
Hi Brent,
could you provide how to windows image on RHEL .. this stpes are used on ubuntu .. so i did openstack setup on RHEL..