Skip to content

Instantly share code, notes, and snippets.

@vitor-caetano
Last active January 31, 2017 21:05
Show Gist options
  • Select an option

  • Save vitor-caetano/1e404b00cc722e9d634f16adf44dece7 to your computer and use it in GitHub Desktop.

Select an option

Save vitor-caetano/1e404b00cc722e9d634f16adf44dece7 to your computer and use it in GitHub Desktop.
Create Windows Server 2012 image for openstack
<network>
<name>default</name>
<bridge name="virbr0"/>
<forward mode="nat"/>
<ip address="192.168.122.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.122.2" end="192.168.122.254"/>
</dhcp>
</ip>
</network>

General guidelines on http://docs.openstack.org/image-guide/windows-image.html

Virsh network creation, Use default.xml to create the default network.

# virsh net-define /tmp/default.xml
# virsh net-start default
# virsh net-autostart default

Create a qcow2 image

$ qemu-img create -f qcow2 ws2012.qcow2 70G

Bring virtual machine up from virsh:

$ virt-install --connect qemu:///session \
    --name ws2012 --ram 2048 --vcpus 2 \
    --network network=default,model=virtio \
    --disk path=ws2012.qcow2,format=qcow2,device=disk,bus=virtio \
    --cdrom /opt/Windows12.ISO \
    --vnc --os-type windows --os-variant win2k8

See http://tutoriaisgnulinux.com/?p=8344

https://launchpad.net/kvm-guest-drivers-windows/+download

$ virt-install --connect qemu:///session 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment