[Openstack-operators] Problem on running windows on openstack

Qi Zhang baileifirst at gmail.com
Tue Nov 15 11:49:19 UTC 2011


Hi Guys,

I am writing to you for some question on creating my own windows image for
openstack.
I have built my own openstack, and ubuntu works well on it. But when I try
to run windows instance, it failed to get IP address and host information.
I found a blog via Google search. But the page described about windows
2008. I am sure it's similar to windows 2003.
Here is the URL:
http://blogs.poolsidemenace.com/2011/06/16/porting-windows-to-openstack/

Here are what I did:
1. kvm-img create -f raw windows.img 10G
2. kvm -m 2048 -cdrom *** -drive file=windows.img -fda virtdrivefile ***
3. Install a windows 2003 to that image.
4. Run windows update and shutdown the virtual system.
5. Use euca commands upload and register the image.
6. Run euca-run-instance

OK, below are the problems:
1. First time the windows won't start, no log in consloe.log(Full path will
be /var/lib/nova/instance/*instance-id*/console.log by default)
2. If I run euca-reboot-instance follow the instance id, windows start. But
no IP assigned.
3. If I do a reboot or power recycle on the physical machine, all Linux
instance restored to running status, but windows won't.

I tried to solve those problems myself. And found the blog.
I also read four microsoft links in the post. But I have no idea about how
to design my solution.
So what I need to do are:
1. design a unattend.xml
    I found if no IP address give to windows, he can get a 169.254.x.y, but
couldn't communicate with 169.254.169.254. If I assign an IP to the
instance, 169.254.169.254 is reachable.
    Is that OK to write an IP on unattend.xml so when the instance first
start he can get information from ec2 or nova api.
2. How does RunSynchronousCommand work?
Below are on the blog. With the MS technet link. But I still do not know
how to use runsyncronouscommand.
*    The Windows base image that is illustrated here utilizes a custom
unattend.xml file for sysprep that contains a RunSynchronousCommand. The
RunSynchronousCommand calls a custom executable that calls the OpenStack
metadata API at http://169.254.169.254/latest/user-data/ to pull user
specified data (e.g., Administrator password) for configuration data. The
custom executable than takes the configuration data and slams it into the
cached copy of the unattend.xml file for sysprep to use to customize the
Windows OS.*

Finally, I think I should give you my nova configuration file here:

--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/data/nova
--lock_path=/var/lock/nova
--verbose
--s3_host=100.100.0.254
--rabbit_host=100.100.0.254
--cc_host=100.100.0.254
--ec2_url=http://100.100.0.254:8773/services/Cloud
--fixed_range=192.168.0.0/16
--network_size=8
--network_manager=nova.network.manager.FlatDHCPManager
--FAKE_subdomain=ec2
--routing_source_ip=100.100.0.254
--sql_connection=mysql://nova:nova@100.100.0.254/nova
--glance_host=100.100.0.254
--image_service=nova.image.glance.GlanceImageService
--start_guests_on_host_boot=true
--scheduler_driver=nova.scheduler.simple.SimpleScheduler
--use_cow_images=false
--my_ip=100.100.0.254
*
Note: If you use my nova.conf and found it won't work, you can try to
change the network_manager to FlatManager and restart all nova services.*

Thanks your time reading my problem.

Zhang Qi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20111115/4952ff1a/attachment-0002.html>


More information about the Openstack-operators mailing list