I would prefer to not allow choosing for single or double quotes. To much overhead.
My vote: -1 On 30 Oct 2013, at 16:02, Michael Curran <[email protected]> wrote: > After realizing I missed the regex expression, I would say no...I've been > able to pull the variables and make all the scripts work as expected. > > Sent from my Android phone using TouchDown (www.nitrodesk.com) > > -----Original Message----- > From: Tino Vazquez [[email protected]] > Received: Wednesday, 30 Oct 2013, 10:47am > To: users [[email protected]] > Subject: Re: [one-users] OpenNebula 4.4(?) > > Hi Martin, Michael, André, > > In the light of these new developments in windows contextualization, I would > like to ask for your feedback regarding [1]. This feature request basically > states that OpenNebula should be able to provide context information in > single or double quotes. Do you still think this is relevant for windows > contextualization? > > Looking forward to your comments, > > -Tino > > [1] http://dev.opennebula.org/issues/2287 > > -- > 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 [email protected] and delete > the e-mail and attachments and any copy from your system. C12G thanks you for > your cooperation. > > > On Fri, Oct 25, 2013 at 3:32 PM, Javier Fontan <[email protected]> wrote: > I'm not really sure on how to proceed for addons that need some kind of > change in the OpenNebula code base. Maybe we can start having the > functionality that doesn't need this and open a new thread in dev mailing > list discussing what could be done for these cases. > > Anyone willing to be in charge of the addon repo? The instructions to start > the process are here: > > http://opennebula.org/software:add-ons > > To start this rolling on a mail should be sent to the dev mailing list > telling about the new addon, the name it is going to have and the github user > name or names of the people which you want to have write access to the > repository. > > Cheers > > > On Thu, Oct 24, 2013 at 1:33 PM, André Monteiro <[email protected]> > wrote: > Yes I know, but I was wondering if you wanted me to do something else because > of the addons. > Regarding other addons, we have a few tweaks that we can work on to fit, I'll > get back to you soon. > > > -- > André Monteiro > > > > On Thu, Oct 24, 2013 at 12:30 PM, Javier Fontan <[email protected]> > wrote: > You may be able to add the windows script using the files section of the > context. > > > On Thu, Oct 24, 2013 at 12:36 PM, André Monteiro <[email protected]> > wrote: > Hi Javier, > > I think the addons idea is excellent and will envolve the community more in > the ONE ecosystem. > Regarding the Windows contextualization, I was wondering how you want to > integrate this. Do you think it should be in the template creation like the > image or in another way? > > <SunstoneCreateTemplate.png> > > Regards, > > > > -- > André Monteiro > > > > On Thu, Oct 24, 2013 at 11:24 AM, Javier Fontan <[email protected]> > wrote: > Hi, > > You may have noticed the new addons way of contributing [1]. These > context packages are perfect for this way of development. > > What do you think? > > Cheers > > [1] http://opennebula.org/software:add-ons > > On Thu, Oct 24, 2013 at 8:31 AM, Martin Alfke <[email protected]> wrote: > > Hi Michael, > > > > we did not modify context.sh. > > > > We only have patched the one-context.ps1 script as described in one of my > > last emails: > > > > This its he important thing you have to change: > > "(.+)='(.+)'" { > > > > I have attached the diff as separate file. > > > > hth, > > > > Martin > > > > > > On Oct 23, 2013, at 5:28 PM, Michael Curran > > <[email protected]> wrote: > > > >> Martin -- have you made any changes to the context.sh that is created? > >> > >> When I leave the default context.sh (and I modified the one-context.ps1 to > >> only spit out variables) as default from opennebula -- it looks like this > >> > >> ETH0_DNS='10.7.6.21' > >> ETH0_GATEWAY='10.7.0.1' > >> ETH0_IP='10.7.3.243' > >> ETH0_MASK='255.255.248.0' > >> USERNAME='testing' > >> HOSTNAME='test1-vm' > >> > >> And this is the output of the one-context.ps1 script I am putting at the > >> bottom of this email > >> > >> PS C:\cygwin\home\mcurran\context_testing> .\one-context.ps1 > >> Windows username is > >> HOSTNAME is > >> IP address is , NETMASK is , GATEWAY is , DNS is > >> > >> When I modify the context.sh to use double-quotes around the variables, > >> instead of the single quotes shown above, this is my output > >> > >> PS C:\cygwin\home\mcurran\context_testing> .\one-context.ps1 > >> Windows username is testing > >> HOSTNAME is test1-vm > >> IP address is 10.7.3.243 , NETMASK is 255.255.248.0 , GATEWAY is 10.7.0.1 > >> , DNS is 10.7.6.21 > >> > >> > >> ################################################################# > >> ##### Windows Powershell Script to configure OpenNebula VMs ##### > >> ##### Created by [email protected] and [email protected] ##### > >> ##### DETI/IEETA Universidade de Aveiro 2011 ##### > >> ################################################################# > >> > >> 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 > >> } > >> } > >> return $context > >> } > >> > >> function addLocalUser($context) { > >> # Create new user > >> $username = $context["USERNAME"] > >> write-host "Windows username is $($username)" > >> } > >> > >> > >> function configureNetwork($context) { > >> # Print IP address data > >> $dns = $context["ETH0_DNS"] > >> $gateway = $context["ETH0_GATEWAY"] > >> $ip = $context["ETH0_IP"] > >> $netmask = $context["ETH0_MASK"] > >> write-host "IP address is $($ip) , NETMASK is $($netmask) , > >> GATEWAY is $($gateway) , DNS is $($dns)" > >> } > >> > >> function renameComputer($context) { > >> # Print new hostname > >> $hostname = $context["HOSTNAME"] > >> write-host "HOSTNAME is $($hostname)" > >> } > >> > >> # If folder context doesn't exist create it > >> if (-not (Test-Path "c:\cygwin\home\mcurran\context\")) { > >> New-Item "C:\cygwin\home\mcurran\context\" -type directory > >> } > >> > >> # Execute script > >> if( -not(Test-Path "c:\cygwin\home\mcurran\context\contextualized") -and > >> (Test-Path "C:\cygwin\home\mcurran\context_testing\context.sh")) { > >> $context = @{} > >> $context = > >> getContext('C:\cygwin\home\mcurran\context_testing\context.sh') > >> addLocalUser($context) > >> renameComputer($context) > >> configureNetwork($context) > >> echo "contextualized" |Out-File > >> ("c:\cygwin\home\mcurran\context\contextualized") > >> } > >> > >> > >> Michael Curran | connectsolutions | Lead Network Architect > >> Phone 614.568.2285 | Mobile 614.403.6320 | www.connectsolutions.com > >> > >> -----Original Message----- > >> From: Martin Alfke [mailto:[email protected]] > >> Sent: Tuesday, October 22, 2013 3:00 AM > >> To: Michael Curran > >> Cc: users > >> Subject: Re: [one-users] OpenNebula 4.4(?) > >> > >> Hi Michael, > >> > >> we use the same one-context.ps1 file for Win7 Professional and Win8 > >> Professional. > >> Win7 has PowerShell V2, Win8 has PowerShell V3. > >> > >> - Martin > >> > >> On Oct 21, 2013, at 8:25 PM, Michael Curran > >> <[email protected]> wrote: > >> > >>> That should way win2k8 R2 -- :) > >>> > >>> Michael Curran | connectsolutions | Lead Network Architect Phone > >>> 614.568.2285 | Mobile 614.403.6320 | www.connectsolutions.com > >>> > >>> -----Original Message----- > >>> From: [email protected] > >>> [mailto:[email protected]] On Behalf Of Michael > >>> Curran > >>> Sent: Monday, October 21, 2013 2:02 PM > >>> To: Martin Alfke > >>> Cc: users > >>> Subject: Re: [one-users] OpenNebula 4.4(?) > >>> > >>> Strange -- I updated to PS3 , and when I run their scripts in win2k7 > >>> r2 -- it states clearly it doenst understand the variables -- > >>> > >>> Could it be a difference between windows versions? > >>> > >>> Michael Curran | connectsolutions | Lead Network Architect Phone > >>> 614.568.2285 | Mobile 614.403.6320 | www.connectsolutions.com > >>> > >>> -----Original Message----- > >>> From: Martin Alfke [mailto:[email protected]] > >>> Sent: Monday, October 21, 2013 11:59 AM > >>> To: Michael Curran > >>> Cc: Tino Vazquez; users > >>> Subject: Re: [one-users] OpenNebula 4.4(?) > >>> > >>> Hi Michael, > >>> > >>> we did no changes to context.sh > >>> We only enable contextualisation and use the WIn startup and > >>> powershell wrapper script from ieeta.pt > >>> > >>> This is the context.sh from a Win8 VM (I modified the HOSTNAME to make it > >>> public): > >>> > >>> # Context variables generated by OpenNebula DISK_ID='1' > >>> ETH0_DNS='10.175.4.11 10.175.4.12' > >>> ETH0_GATEWAY='10.175.16.1' > >>> ETH0_IP='10.175.24.28' > >>> ETH0_MASK='255.255.240.0' > >>> ETH0_NETWORK='10.175.16.0' > >>> FILES_DS='/var/lib/one/datastores/2/6d59d36aaac67c69f1ceb0ce48ad9e30:'\''SetupCompleteWin8.cmd'\'' > >>> > >>> /var/lib/one/datastores/2/036c86e3eb2ba86910c5494471ff743d:'\''startupWin8.vbs'\'' > >>> > >>> /var/lib/one/datastores/2/d1abbf10eda3863726d9911df4d0868c:'\''one-contextWin8.ps1'\'' > >>> ' > >>> HOSTNAME='win8martin.domain.com' > >>> NETWORK='YES' > >>> TARGET='hdb' > >>> > >>> Note: our Linux systems are running in english only. > >>> > >>> - Martin > >>> > >>> > >>> On Oct 21, 2013, at 5:46 PM, Michael Curran > >>> <[email protected]> wrote: > >>> > >>>> Very helpful data Martin -- but the problem I ran into was that the > >>>> context.sh was created with single quotes and even PS3 couldn't read the > >>>> variables unless they were in double quotes -- how did you get past that > >>>> problem? > >>>> > >>>> Michael Curran | connectsolutions | Lead Network Architect Phone > >>>> 614.568.2285 | Mobile 614.403.6320 | www.connectsolutions.com > >>>> > >>>> -----Original Message----- > >>>> From: [email protected] > >>>> [mailto:[email protected]] On Behalf Of Tino Vazquez > >>>> Sent: Monday, October 21, 2013 6:35 AM > >>>> To: Martin Alfke > >>>> Cc: users > >>>> Subject: Re: [one-users] OpenNebula 4.4(?) > >>>> > >>>> Hi Martin, > >>>> > >>>> Indeed, this is very helpful. > >>>> > >>>> We've opened a feature request [1] to include windows guest > >>>> contextualization support in OpenNebula. > >>>> > >>>> Thanks a lot for your feedback, > >>>> > >>>> -Tino > >>>> > >>>> [1] http://dev.opennebula.org/issues/2395 > >>>> -- > >>>> 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 [email protected] and delete the e-mail and > >>>> attachments and any copy from your system. C12G thanks you for your > >>>> cooperation. > >>>> > >>>> > >>>> On Mon, Oct 21, 2013 at 8:49 AM, Martin Alfke <[email protected]> wrote: > >>>>> Hi, > >>>>> > >>>>> we used the contextualisation from > >>>>> http://wiki.ieeta.pt/wiki/index.php/OpenNebula#Using_Windows_Images_ > >>>>> f o r_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 <[email protected]> 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 [email protected] 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 <[email protected]> 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 <[email protected]> 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 [email protected] 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 > >>>>>>>> <[email protected]> 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 > >>>>>>>>> [email protected] > >>>>>>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > >>>>>>>>> > >>>>>>>> _______________________________________________ > >>>>>>>> Users mailing list > >>>>>>>> [email protected] > >>>>>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Users mailing list > >>>>>>> [email protected] > >>>>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > >>>>> > >>>>> _______________________________________________ > >>>>> Users mailing list > >>>>> [email protected] > >>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > >>>> _______________________________________________ > >>>> Users mailing list > >>>> [email protected] > >>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > >>> > >>> _______________________________________________ > >>> Users mailing list > >>> [email protected] > >>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > >> > > > > > > _______________________________________________ > > Users mailing list > > [email protected] > > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > > > > > > -- > Javier Fontán Muiños > Developer > OpenNebula - The Open Source Toolkit for Data Center Virtualization > www.OpenNebula.org | @OpenNebula | github.com/jfontan > > > > > -- > Javier Fontán Muiños > Developer > OpenNebula - The Open Source Toolkit for Data Center Virtualization > www.OpenNebula.org | @OpenNebula | github.com/jfontan > > > > > -- > Javier Fontán Muiños > Developer > OpenNebula - The Open Source Toolkit for Data Center Virtualization > www.OpenNebula.org | @OpenNebula | github.com/jfontan > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
