© 2016 BlackBerry. All Rights Reserved. 1
1
Alternative Contextualization for Windows
 Issues with current contextualization
 Current mechanism (context.ps1) requires a reboot to set the hostname
 Context.ps1 has no mechanism for joining AD domains automatically
 Alternative contextualization packages (e.g. cloud-init) have poor OpenNebula support
 Rebooting costs iops and time. Initializing the PowerShell environment takes time and iops
 Alternative contextualization
 Windows already has a native contextualization mechanism – Unattend.xml
 It is possible to have setup.exe search an external device for unattend.xml (e.g. context iso)
 Need to convert from context.sh to unattend.xml that setup.exe can understand.
 Currently, it is somewhat difficult to dynamically generate a file for a booting VM with a script.
 Can’t be done on the VM as the file is required for the VM to boot.
 Can’t be done ahead of time as we don’t know any of the parameters we need to set (e.g. IP address)
 Hooks don’t work as the script must block VM startup until it has completed.
 It would be really nice if OpenNebula supported a mechanism for calling a script to generate a file to go on the context iso as a VM is booting.
© 2016 BlackBerry. All Rights Reserved. 2
2
Alternative Contextualization for Windows 2
 Context FILES attribute to the rescue…
 We can substitute VM parameters specific to the VM in this parameter (e.g. VM ID)
 The FILES attribute can reference an external source - e.g. webserver.
 FILES="http://context-helper/cgi-bin/makeunattend/$VMID/Unattend.xml",
 Webserver:
 Takes the VM ID, queries the frontend for the parameters assigned to this VM
 Takes a template Unattend.xml and populates it with the parameters retrieved earlier
 Unattend.xml is placed on the context iso, and is available to the booting VM.
 Result:
 Windows test VM with context.ps1, boots in 7m (including 2 reboots to rename and join AD)
 Windows test VM with unattend.xml boots in 3m 30s to a usable login prompt, with no further rebooting required.
 Source
 https://github.com/Batz-10K/FastContext

OpenNebulaConf2017EU: Alternative Context for Windows by Paul Batchelor, BlackBerry

  • 1.
    © 2016 BlackBerry.All Rights Reserved. 1 1 Alternative Contextualization for Windows  Issues with current contextualization  Current mechanism (context.ps1) requires a reboot to set the hostname  Context.ps1 has no mechanism for joining AD domains automatically  Alternative contextualization packages (e.g. cloud-init) have poor OpenNebula support  Rebooting costs iops and time. Initializing the PowerShell environment takes time and iops  Alternative contextualization  Windows already has a native contextualization mechanism – Unattend.xml  It is possible to have setup.exe search an external device for unattend.xml (e.g. context iso)  Need to convert from context.sh to unattend.xml that setup.exe can understand.  Currently, it is somewhat difficult to dynamically generate a file for a booting VM with a script.  Can’t be done on the VM as the file is required for the VM to boot.  Can’t be done ahead of time as we don’t know any of the parameters we need to set (e.g. IP address)  Hooks don’t work as the script must block VM startup until it has completed.  It would be really nice if OpenNebula supported a mechanism for calling a script to generate a file to go on the context iso as a VM is booting.
  • 2.
    © 2016 BlackBerry.All Rights Reserved. 2 2 Alternative Contextualization for Windows 2  Context FILES attribute to the rescue…  We can substitute VM parameters specific to the VM in this parameter (e.g. VM ID)  The FILES attribute can reference an external source - e.g. webserver.  FILES="http://context-helper/cgi-bin/makeunattend/$VMID/Unattend.xml",  Webserver:  Takes the VM ID, queries the frontend for the parameters assigned to this VM  Takes a template Unattend.xml and populates it with the parameters retrieved earlier  Unattend.xml is placed on the context iso, and is available to the booting VM.  Result:  Windows test VM with context.ps1, boots in 7m (including 2 reboots to rename and join AD)  Windows test VM with unattend.xml boots in 3m 30s to a usable login prompt, with no further rebooting required.  Source  https://github.com/Batz-10K/FastContext