As you know on Oracle VM you can find different ready-to-run Appliances or Templates based on Oracle Linux. Oracle VM Templates allows to configure a Virtual-Machine on the first boot and apply configurations like:
This blog article will show how-to create the same kind of automation (with examples) for Microsoft Windows OS.
Step-by-Step How To:
On the same window you can also verify that the Virtual-NIC is an "Oracle VM Virtual Ethernet Adapter" that means Windows is correctly using Windows PV Drivers.
"Computer Configuration" => "Windows Settings" => "Scripts (Startup/Shutdown)" => "Startup"
On the "Startup Properties" windows add the "ovm-template-config.bat" batch, as in the following picture:
Confirm with OK and close.
Now your Oracle VM Template for Microsoft Windows is ready to be used and by leveraging the same you can automate the deployment of Microsoft Windows Virtual Machine on your Oracle VM Infrastructure; here the example of a Microsoft Windows Server 2016 deployment:
|sendVmMessage VM name=win2016srv key=com.oracle.windows.network.hostname message=win2k16-static log=yes
sendVmMessage VM name=win2016srv key=com.oracle.windows.network.bootproto message=STATIC log=yes
sendVmMessage VM name=win2016srv key=com.oracle.windows.admin.password message=Welcome2 log=yes
sendVmMessage VM name=win2016srv key=com.oracle.windows.network.ipaddr message=18.104.22.168 log=yes
sendVmMessage VM name=win2016srv key=com.oracle.windows.network.netmask message=255.255.255.0 log=yes
sendVmMessage VM name=win2016srv key=com.oracle.windows.network.gateway message=22.214.171.124 log=yes
sendVmMessage VM name=win2016srv key=com.oracle.windows.network.dns message=126.96.36.199,188.8.131.52 log=yes
|sendVmMessage VM name=win2016srv key=com.oracle.windows.network.hostname message=win2k16-dhcp log=yes
sendVmMessage VM name=win2016srv key=com.oracle.windows.network.bootproto message=DHCP log=yes
sendVmMessage VM name=win2016srv key=com.oracle.windows.admin.password message=Welcome3 log=yes
Consider following requirements while sending VM Messages for different values:
"com.oracle.windows.network.bootproto" accepts only "DHCP" and "STATIC", both uppercase
"com.oracle.windows.admin.password" accepts only passwords >= 8 characters with at least 1 uppercase and 1 number
"com.oracle.windows.network.dns" accepts not more than 2 entries supplied into an unique string (no spaces) as in the example above
This deployment automation has been tested on Microsoft Windows Server 2016; possible adjustments could be required on other supported Microsoft Windows Operating Systems.
The Microsoft Windows Virtual Machine will execute the following steps:
I also think that this solutions can be easily improved and/or extended, so feel free to add you comments on this blog entry!
Oracle VM Resources:
Oracle VM Software Download
Oracle VM can be downloaded, used and distributed free of charge, and all updates and errata are freely available. Instructions to download the Oracle VM Release 3.4.5, Oracle VM Windows PV drivers, tools, and utilities can be found on the Oracle Technology Network.
Oracle VM Support
Oracle VM Support offers access to award-winning Oracle support resources and virtualization support specialists, zero-downtime updates using Ksplice, additional management tools such as Oracle Enterprise Manager, and lifetime support, all at a low cost.
Additional Oracle VM Information
For the latest product information, best practices white papers and webinars, please visit Oracle Virtualization HomePage.
The latest education and training information for Oracle VM can be found on a recent Virtualization Blog entry here.