Windows VM template build up?



Does there are any official manual available for how to setup Windows VM template is available online.

I am using version 5.4.6 and would like to setup Windows 2016 template.

However, still no idea how to even read another discussion

Please guide me on this.



At some point I documented this for myself, this is Vagrant based so all steps are listed in cli and you should be able to extract all relevant steps:

(Roland) #3

Hi, might as well post the update for windows 10 / Server 2016 here; this is what I use to get Windows running on KVM and Ceph, using opennebula 5.4.6

  • download bootable Windows iso, in a template mount prefix hda
  • download virtio driver CD, in template, mount it as hdb
  • create a new disk, depending on your storage you should prob. use sda (qcow2) or vda (virtio)
  • also depending on the storage, use the correct driver (raw, qcow2, etc)
  • in the template, under Other > RAW data, select “kvm” and paste this into the field next to it:
    DATA="<cpu><model fallback='allow'>SandyBridge</model></cpu>",TYPE="kvm"
    (make sure to adjust the CPU type to your generation, it must be newer or equal!)
  • in template, under OS booting > features, set Localtime to NO (prevents windows to always be 1 hr behind on booting)

Now boot the VM from the template, if all is set ok, you should see Windows setup starting, if it breaks down (BSOD) - most likely disk settings are wrong, check again.
When you get it booting, you eventually get to the section where you can select the disk to install to. None will show up there, probably. You will need to browse to your attached virtio iso and load any driver that seems relevant to storage and any other device you need. As long as storage works, you should see a disk when refreshing the install location selection window.
Finish all the windows setup stuff, afterwards install all virtio iso-drivers for any unknown device in Windows, and reboot to check it all. Now, time to setup networking if that wasnt done already, and download the Windows context addon, see: (or include it in the template Context > Files if network is unavailable)
If fine, remove the install iso and the virtio iso from the template, and you should be done!

The inclusion of the RAW CPU specification is needed to boot Win10 and Server 2016, that wasn’t necessary for the win7 and server 2012.


Thanks all,

Now I can create Windows VM template.

I have another problem while update administrator password via VM template context. I have edit context by Sunstone and added like below:

However, when I create new VM. It got following error. Did you have any idea how to solve it?

[one.template.instantiate] Error allocating a new virtual machine template. Error parsing: DISK_ID=1@^^@NETWORK=YES@^^@PASSWORD=StrongPassword$$@^^@SSH_PUBLIC_KEY=$USER[SSH_PUBLIC_KEY]@^^@TARGET=hda@^_^@USERNAME=Administrator. syntax error, unexpected EOA, expecting $end or VARIABLE or RSTRING at line 1, columns 52:53