Ask Your Question
0

windows xp instance problems when using nova under ubuntu 10.4 lts 64bit

asked 2011-01-10 16:13:08 -0500

arturo-lorenzo gravatar image

Trying to start a windows instance under nova (ubuntu 10.4 lts 64bit) and get errors when launching the instance. The status goes from launching to pending and stays in pending forever. Tried all tricks to connect via VNC and to ignore kernel and ramdisk unsuccessfully. I can run linux instances successfully and also the same windows image can be run successfully via KVM. Created the image with euca tools provided by the nova stack and using this URL as a reference: http://kiranmurari.wordpress.com/2010/03/29/uec-bundling-windows-image/ (http://kiranmurari.wordpress.com/2010...) The first I've noticed was when registering the memdisk I did not get an EKI-xxxxxxx I got an AMI-xxxxxxx and the same with ramdisk. But I was able to continue and bundle the image successfully using the AMIs from kernel and ramdisk.

Here is the list of my images:

root@ubuntu-svr2:/home/alorenzo/windowsxp# euca-describe-images IMAGE ami-ol70fuy6 mybucket/machine.manifest.xml IRT available private x86_64 machine ami-9bsb0d3n ami-8lw4w0x5 IMAGE ami-qhvha7sg winxp_bucket/memdisk.manifest.xml IRT available private x86_64 kernel true
IMAGE ami-8lw4w0x5 mybucket/ramdisk.manifest.xml IRT available private x86_64 ramdisk true IMAGE ami-p3tdhsdm winxp2_bucket/win-boot2.img.manifest.xml IRT available private x86_64 ramdisk true IMAGE ami-mcnbexg8 winxp2_bucket/memdisk.manifest.xml IRT available private x86_64 kernel true
IMAGE ami-tiny nebula/tiny vishvananda available public x86_64 machine aki-lucid ari-lucid IMAGE ami-pysc0kg3 winxp_bucket/winxp.img.manifest.xml IRT available private x86_64 machine ami-qhvha7sg ami-r32sryaf IMAGE ami-9bsb0d3n mybucket/kernel.manifest.xml IRT available private x86_64 kernel true
IMAGE ami-r32sryaf winxp_bucket/win-boot.img.manifest.xml IRT available private x86_64 ramdisk true IMAGE aki-lucid nebula/lucid-kernel admin available public x86_64 kernel
IMAGE ari-lucid nebula/lucid-ramdisk admin available public x86_64 ramdisk

IMAGE ami-rv30h74o winxp2_bucket/winxp2.img.manifest.xml IRT available private x86_64 machine ami-mcnbexg8 ami-p3tdhsdm

I am appending the part of the log (screenog.3 for compute) which I believe shows one of the problems:

OperationalError: (OperationalError) database is locked u'UPDATE services SET updated_at=?, report_count=? WHERE services.id = ?' ('2011-01-07 05:07:21.946395', 56, 3) ERROR:root:Recovered model server connection! DEBUG:root:instance 1: starting... DEBUG:root:Running cmd (subprocess): ifconfig vlan100 DEBUG:root:Running cmd (subprocess): ifconfig br100 DEBUG:root:Running cmd (subprocess): sudo ifconfig br100 up DEBUG:root:Running cmd (subprocess): sudo iptables --delete FORWARD --in-interface br100 -j ACCEPT DEBUG:root:Running cmd (subprocess): sudo iptables -I FORWARD --in-interface br100 -j ACCEPT DEBUG:root:Running cmd (subprocess): sudo iptables --delete FORWARD --out-interface br100 -j ACCEPT DEBUG:root:Running cmd (subprocess): sudo iptables -I FORWARD --out-interface br100 -j ACCEPT DEBUG:root:instance instance-1037839504: starting toXML method DEBUG:root:instance instance-1037839504: finished toXML method DEBUG:root:Running cmd (subprocess): mkdir -p /home/alorenzo/nova/nova/nova/..//instances/instance-1037839504/ DEBUG:root:Running cmd (subprocess): chmod 0777 /home/alorenzo/nova/nova/nova/..//instances/instance-1037839504/ INFO:root:instance instance-1037839504: Creating image DEBUG:root:Running cmd (subprocess): /usr/bin/curl --fail --silent http://192.168.1.194:3333/_images/ami-rv30h74o/image (http://192.168.1.194:3333/_images/ami...) -H "Date: Fri ... (more)

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2011-01-10 20:44:30 -0500

vishvananda gravatar image

The windows image needs virtio block drivers. I managed to get a windows instance to boot without them, but I had to modify the libvirt.xml to switch to ide drives instead.

Here is a basic walkthrough of what i did to get a windows image to boot:

Create a whole disk image version of windows. create an ami-win folder in your images folder copy your whole disk image to a file called ami-win/image create an ami-win/info.json file with the following info: { "imageId": "ami-win", "imageLocation": "nova/win", "imageOwnerId": "admin", "imageState": "available", "type": "machine", "isPublic": true, "architecture": "x86_64" } Run the windows instance euca-run-instances -t m1.medium ami-tiny (it will fail to run here unless you've installed virtio drivers in your image)

there will be a dir in your instance directory: instance-xxxxx

cd instance-xxxxx virsh destroy instance-xxxxx # use the number from the directory name in place of the xxx

edit the libvirt.xml by replacing <target dev="vda" bus="virtio"/>

with <target dev="hda" bus="ide"/>

If your windows instance doesn't include some kind of terminal services, you can also add a vnc console in the devices section:

<graphics type="vnc" port="5901" listen="&lt;host_ip&gt;" passwd="&lt;password&gt;"/>

recreate the instance using virsh

virsh create libvirt.xml

a properly configured windows instance should have virtio drivers installed and have some kind of terminal services client running so it won't need these changes, but this should get you started in testing.

The final issue is how to get a password into the windows instance. Key injection obviously doesn't work. I think the easiest solution is to have a script that runs on the windows instance to query user data from the metadata server, the password can be sent in in userdata.

Vish

On Jan 10, 2011, at 8:13 AM, arturo lorenzo wrote:

New question #140899 on OpenStack Compute (nova): https://answers.launchpad.net/nova/+q...

Trying to start a windows instance under nova (ubuntu 10.4 lts 64bit) and get errors when launching the instance. The status goes from launching to pending and stays in pending forever. Tried all tricks to connect via VNC and to ignore kernel and ramdisk unsuccessfully. I can run linux instances successfully and also the same windows image can be run successfully via KVM. Created the image with euca tools provided by the nova stack and using this URL as a reference: http://kiranmurari.wordpress.com/2010... The first I've noticed was when registering the memdisk I did not get an EKI-xxxxxxx I got an AMI-xxxxxxx and the same with ramdisk. But I was able to continue and bundle the image successfully using the AMIs from kernel and ramdisk.

Here is the list of my images:

root@ubuntu-svr2:/home/alorenzo/windowsxp# euca-describe-images IMAGE ami-ol70fuy6 mybucket/machine.manifest.xml IRT available private x86_64 machine ami-9bsb0d3n ami-8lw4w0x5 IMAGE ami-qhvha7sg winxp_bucket/memdisk.manifest.xml IRT available private x86_64 kernel true
IMAGE ami-8lw4w0x5 mybucket/ramdisk.manifest.xml IRT available private ...

(more)
edit flag offensive delete link more
0

answered 2011-01-11 07:56:18 -0500

Just a note on the password part, I believe Ed Leafe sent out an RFC for a client to do exactly that but I am not certain / don't know the status.

edit flag offensive delete link more
0

answered 2011-01-19 17:22:03 -0500

arturo-lorenzo gravatar image

Thanks Vish Ishaya, that solved my question.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-01-10 16:13:08 -0500

Seen: 69 times

Last updated: Jan 19 '11