[one-users] OpenNebula 4.4(?)

Martin Alfke tuxmea at gmail.com
Sun Oct 20 23:49:15 PDT 2013


Hi,

we used the contextualisation from http://wiki.ieeta.pt/wiki/index.php/OpenNebula#Using_Windows_Images_for_new_Virtual_Machines
(which is also linked at the OpenNebula Wiki) and did some minor changes.

We only assign IP address, hostname and enable RDP
Hostname is set as contextualisation variable: HOSTNAME = $name
(We use the VM name as fqdn).

We now only miss setting the DNS according to contextualisation (we need to split the variable into an array).


This is the diff to the one_context.ps1 file:

--- one-context_orig.ps1	2013-10-21 08:43:14.000000000 +0200
+++ one-contextWin8.ps1	2013-10-18 14:35:34.000000000 +0200
@@ -4,14 +4,14 @@
 #####        DETI/IEETA Universidade de Aveiro 2011         #####
 #################################################################

-Set-ExecutionPolicy unrestricted -force # not needed if already done once on the VM
+Set-ExecutionPolicy Unrestricted -force # not needed if already done once on the VM
 [string]$computerName = "$env:computername"
 [string]$ConnectionString = "WinNT://$computerName"

 function getContext($file) {
     $context = @{}
     switch -regex -file $file {
-        '(.+)="(.+)"' {
+        "(.+)='(.+)'" {
             $name,$value = $matches[1..2]
             $context[$name] = $value
         }
@@ -77,13 +77,14 @@
 function configureNetwork($context) {
     $Nics = Get-WMIObject Win32_NetworkAdapterConfiguration | where {$_.IPEnabled -eq "TRUE" -and ($_.MACAddress)}
     foreach ($nic in $Nics) {
-        [String]$mac = $nic.MACAddress
-        [String]$ip = getIp($mac)
-        [String]$gw = getGateway($mac)
+        [String]$ip = $context["ETH0_IP"]
+        [String]$gw = $context["ETH0_GATEWAY"]
+        [String]$mask = $context["ETH0_MASK"]
         $nic.ReleaseDHCPLease()
-        $nic.EnableStatic($ip , "255.255.255.0")
+        $nic.EnableStatic($ip , $mask)
         $nic.SetGateways($gw)
-        $DNSServers = "193.136.172.20", "193.136.171.21"
+        $DNSServers = "10.175.4.11", "10.175.4.12"
+        # $DNSServers = $context["ETH0_DNS"]
         $nic.SetDNSServerSearchOrder($DNSServers)
         $nic.SetDynamicDNSRegistration("TRUE")
         $nic.SetWINSServer($DNSServers[0], $DNSServers[1])
@@ -91,8 +92,10 @@
 }

 function renameComputer($context) {
-    $ComputerInfo = Get-WmiObject -Class Win32_ComputerSystem
-    $ComputerInfo.rename($context["HOSTNAME"])
+    $fullName = $context["HOSTNAME"]
+    $computerName = $fullName.Split(".")[0]
+    $computerInfo = Get-WmiObject -Class Win32_ComputerSystem
+    $computerInfo.rename($computerName)
 }

 function enableRemoteDesktop()

hth,

Martin

On Oct 18, 2013, at 4:18 PM, Tino Vazquez <cvazquez at c12g.com> wrote:

> Hi Martin,
> 
> That sounds great. Did you extend the ecosystem windows
> contextualization contribution, or is it something custom made from
> scratch?
> 
> Regards,
> 
> -Tino
> --
> OpenNebula - Flexible Enterprise Cloud Made Simple
> 
> --
> Constantino Vázquez Blanco, PhD, MSc
> Senior Infrastructure Architect at C12G Labs
> www.c12g.com | @C12G | es.linkedin.com/in/tinova
> 
> --
> Confidentiality Warning: The information contained in this e-mail and
> any accompanying documents, unless otherwise expressly indicated, is
> confidential and privileged, and is intended solely for the person
> and/or entity to whom it is addressed (i.e. those identified in the
> "To" and "cc" box). They are the property of C12G Labs S.L..
> Unauthorized distribution, review, use, disclosure, or copying of this
> communication, or any part thereof, is strictly prohibited and may be
> unlawful. If you have received this e-mail in error, please notify us
> immediately by e-mail at abuse at c12g.com and delete the e-mail and
> attachments and any copy from your system. C12G thanks you for your
> cooperation.
> 
> 
> On Fri, Oct 18, 2013 at 3:40 PM, Martin Alfke <tuxmea at gmail.com> wrote:
>> Hi Tino,
>> 
>> many thanks for the update.
>> 
>> @Michael:
>> 
>> we run ONE 4.2 using Windows contextualisation without troubles (Network settings and RDP enabling) for Win7 and Win8.
>> 
>> Kind regards,
>> 
>> Martin
>> 
>> 
>> On Oct 18, 2013, at 11:05 AM, Tino Vazquez <cvazquez at c12g.com> wrote:
>> 
>>> Hi Michael,
>>> 
>>> The beta version of OpenNebula 4.4 is due in one week. The single
>>> quote issue would be resolved (we would love to hear your feedback on
>>> this as soon as it is out), RbVmomi in place and multiple system ds
>>> support.
>>> 
>>> We would appreciate it if you could elaborate a bit more on your plans
>>> regarding windows contextualization.
>>> 
>>> Best,
>>> 
>>> -Tino
>>> --
>>> OpenNebula - Flexible Enterprise Cloud Made Simple
>>> 
>>> --
>>> Constantino Vázquez Blanco, PhD, MSc
>>> Senior Infrastructure Architect at C12G Labs
>>> www.c12g.com | @C12G | es.linkedin.com/in/tinova
>>> 
>>> --
>>> Confidentiality Warning: The information contained in this e-mail and
>>> any accompanying documents, unless otherwise expressly indicated, is
>>> confidential and privileged, and is intended solely for the person
>>> and/or entity to whom it is addressed (i.e. those identified in the
>>> "To" and "cc" box). They are the property of C12G Labs S.L..
>>> Unauthorized distribution, review, use, disclosure, or copying of this
>>> communication, or any part thereof, is strictly prohibited and may be
>>> unlawful. If you have received this e-mail in error, please notify us
>>> immediately by e-mail at abuse at c12g.com and delete the e-mail and
>>> attachments and any copy from your system. C12G thanks you for your
>>> cooperation.
>>> 
>>> 
>>> On Thu, Oct 17, 2013 at 2:58 PM, Michael Curran
>>> <michael.curran at connectsolutions.com> wrote:
>>>> Is there any expected release date for this yet? I have a fully functional
>>>> POC that handles *nix and windows, but cannot contextualize windows because
>>>> of the single quotes around variables in the context.sh ... Which I was told
>>>> would be resolved in the next release, along with the move away from libvirt
>>>> to rbvmomi for accessing the cIpher and multiple system datastores support.
>>>> 
>>>> Any news would help me while wee start build of an OpenStack poc for
>>>> comparison against
>>>> 
>>>> Sent from my Android phone using TouchDown (www.nitrodesk.com)
>>>> 
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opennebula.org
>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>> 
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>> 
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org



More information about the Users mailing list