Skip to content

Instantly share code, notes, and snippets.

@timbot
Last active December 16, 2015 04:59
Show Gist options
  • Save timbot/5381140 to your computer and use it in GitHub Desktop.
Save timbot/5381140 to your computer and use it in GitHub Desktop.
Gists related to creating a Windows image for Openstack
$ glance add name=win7sp1_x64_vlk_20130301 is_public=true container_format=bare disk_format=qcow2 < win7sp1_x64_vlk.qcow2
Added new image with ID: c4e19c5c-704c-438b-a49d-42d885f6945a
$ glance add name=<glance display name> is_public=true container_format=bare disk_format=qcow2 < <image>
$ sudo kvm -m 2048 -cdrom en_windows_7_professional_with_sp1_vl_build_x64_dvd_u_677791.iso -drive file=win7sp1_x64_vlk.qcow2,if=virtio -drive file=virtio-win-0.1-52.iso,index=3,media=cdrom -net nic,model=virtio -net user -nographic -vnc :9 -usbdevice tablet
$ nova boot --flavor 2 --image win7sp1_x64_vlk_20130301 --security_groups default,rdp --poll win7-test
$ qemu-img create -f qcow2 win7sp1_x64_vlk.qcow2 30G
Formatting 'win7sp1_x64_vlk.qcow2', fmt=qcow2 size=32212254720 encryption=off cluster_size=65536
$ sudo qemu-img create -f qcow2 <image> <size>
$ nova secgroup-create rdp "RDP-enabled Windows domains"
+------+-----------------------------+
| Name | Description |
+------+-----------------------------+
| rdp | RDP-enabled Windows domains |
+------+-----------------------------+
$ nova secgroup-add-rule rdp tcp 3389 3389 0.0.0.0/0
+-------------+-----------+---------+-----------+--------------+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+-------------+-----------+---------+-----------+--------------+
| tcp | 3389 | 3389 | 0.0.0.0/0 | |
+-------------+-----------+---------+-----------+--------------+
$ nova secgroup-add-rule default tcp 3389 3389 0.0.0.0/0
+-------------+-----------+---------+-----------+--------------+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+-------------+-----------+---------+-----------+--------------+
| tcp | 3389 | 3389 | 0.0.0.0/0 | |
+-------------+-----------+---------+-----------+--------------+
$ ssh -L5909:node1:5909 me@jumpserver.example.com
ssh -L<vnc port>:<compute node>:<vnc port> <account>@<jump server>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment