How To Create Windows Image and VMs - kennethjiang/Wolke GitHub Wiki

Creating a Windows image in Openstack

Follow the instruction described in http://docs.openstack.org/diablo/openstack-compute/admin/content/creating-a-windows-image.html, except the last 3 "euca-" commands.

Instead of running the 3 "euca-" commands, follow these steps:

REQUEST="{"auth": {"passwordCredentials": {"username": "$NOVA_USERNAME", "password": "$NOVA_API_KEY"}}}"

RAW_TOKEN=`curl -s -d "$REQUEST" -H "Content-type: application/json" "http://$HOST_IP:5000/v2.0/tokens"`

TOKEN=`echo $RAW_TOKEN | python -c "import sys; import json; tok = json.loads(sys.stdin.read()); print tok['access']['token']['id'];"`

glance -A $TOKEN add name="Windows 2008 R2" is_public=true container_format=ovf disk_format=qcow2 <windowsserver.img (It looks like disk_format=raw, which is default, also works)

Launching Windows VMs

Mouse pointer problem

The vncserver included in qemu has a irritating drawback. There's a gap between the real mouse pointer and the vnc mouse pointe http://www.linux-kvm.com/content/tip-how-run-headless-guest-machine-using-vnc-kvm

To workaround it, I did the following (ugly) fix: rm /usr/bin/kvm

cat <<EOF >/usr/bin/kvm

#!/bin/bash

exec qemu-system-x86_64 -usbdevice tablet "\$@"

EOF

chmod +x /usr/bin/kvm

Reboot the VM.

pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"

To fix this error, run: apt-get install kvm-pxe

Using sysprep to set initial password (and probably other initialization too)

There is an article that mentions using sysprep http://blogs.poolsidemenace.com/2011/06/16/porting-windows-to-openstack/ No details given though.

⚠️ **GitHub.com Fallback** ⚠️