You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@libcloud.apache.org by Mihai Garbia <mi...@yahoo.com> on 2013/04/15 13:59:34 UTC

String format for Windows provisioning on IBM SCE

Hello,

Can you tell me what is the string format for user and password on provisioning a Windows instance in IBM SCE using libcloud?

I'm using NodeDriver(BaseDriver) : -> create_node to create a Windows instance in IBM SCE.

I cant find in the documentation what is the string format for the username and password. This is what the docs for create_node say:
auth:   L{NodeAuthSSHKey} or L{NodeAuthPassword}

I tried with "user:pass" as in the official SCE API, but it does not work in libcloud.

The error I'm getting is: 
"Exception: Error 412: The parameter &#40;UserName&#41; is required while creating Windows instance." 


Thanks.


Mihai



Re: String format for Windows provisioning on IBM SCE

Posted by Sengor Kusturica <se...@gmail.com>.
Hi Tomaz,

Thanks for the direction. Documentation patch submitted via LIBCLOUD-397.


On 22 April 2013 13:47, Tomaz Muraus <to...@apache.org> wrote:

> Sengor - Thanks for explanation / clarification. I'm happy to include this
> in the official documentation.
>
> Documentation is located in an SVN repository (
> http://svn.apache.org/repos/asf/libcloud/site/trunk/content/docs/) so if
> I don't get to it in the next couple of days you can create a patch
> yourself and submit it on JIRA and I will commit it as soon as possible.
>
> On Sat, Apr 20, 2013 at 2:44 AM, Sengor <se...@gmail.com> wrote:
>
>> Greetings,
>>
>>
>> There is a way to instantiate Windows based instances on IBM SCE. The
>> trick is to use ex_configurationData argument. You can bypass
>> NodeAuthSSHKey completely. I've tried it just now and it works. Tomaz I'm
>> happy for this to be included in the official libcloud docs. If Jira is
>> needed let me know...
>>
>>
>> Example:
>> ~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> from libcloud.compute.types import Provider
>> from libcloud.compute.providers import get_driver
>>
>> Driver = get_driver(Provider.IBM)
>> conn = Driver("username", "password")
>>
>> images = conn.list_images()
>> for i in images:
>>    if i.id == '20014110':
>>      win=i
>>
>> locations=conn.list_locations()
>> for i in locations:
>>   if i.id == '82':
>>     location=i
>>
>> size=conn.list_sizes()[2]
>> node = conn.create_node(name="windows box", image=win, size=size,
>> ex_configurationData={'UserName':'someone', 'Password':'My0wnPass'},
>> location=location)
>> conn.list_nodes()
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>
>>
>>
>> On 16 April 2013 06:11, Tomaz Muraus <to...@apache.org> wrote:
>>
>>> I just quickly glanced over the code (
>>>
>>> https://github.com/apache/libcloud/blob/trunk/libcloud/compute/drivers/ibm_sce.py#L208
>>> )
>>> and it looks like that the driver currently only supports public key
>>> authentication.
>>>
>>> I'm not too familiar with the IBM SCE API myself, but if the API support
>>> this functionality, it should probably be relatively easy to add it and
>>> external contributions are always more than welcome.
>>>
>>> P.S. Please also CC mailing list (users@libcloud.apache.org) on the
>>> future
>>> emails.
>>>
>>> On Mon, Apr 15, 2013 at 1:05 PM, Mihai Garbia <mihai.garbia@yahoo.com
>>> >wrote:
>>>
>>> > Can you give me an example of how it would look like for Windows. I
>>> > already know how to do it to provision Linux (it is a string name
>>> > representing a SSH key stored in SCE), but for windows only user and
>>> > password is required.
>>> >
>>> > Thanks.
>>> >
>>> > Mihai
>>> >
>>> > ------------------------------
>>> > Blog: experimentenaturiste.blogspot.ro
>>>
>>> >
>>> >
>>> > --- On *Mon, 15/4/13, Tomaz Muraus <to...@apache.org>* wrote:
>>> >
>>> >
>>> > From: Tomaz Muraus <to...@apache.org>
>>> > Subject: Re: String format for Windows provisioning on IBM SCE
>>> > To: users@libcloud.apache.org
>>> > Cc: mihai.garbia@yahoo.com
>>> > Date: Monday, 15 April, 2013, 22:56
>>> >
>>> >
>>> > I'm not totally sure about the IBM SCE driver and Windows instances,
>>> but
>>> > usually you pass an instance of NodeAuthSSHKey or NodeAuthPassword
>>> class to
>>> > the create_node method as an "auth" argument.
>>> >
>>> > On Mon, Apr 15, 2013 at 4:59 AM, Mihai Garbia <mihai.garbia@yahoo.com<
>>> http://mc/compose?to=mihai.garbia@yahoo.com>
>>>
>>> > > wrote:
>>> >
>>> >
>>> > Hello,
>>> >
>>> > Can you tell me what is the string format for user and password on
>>> > provisioning a Windows instance in IBM SCE using libcloud?
>>> >
>>> > I'm using NodeDriver(BaseDriver) : -> create_node to create a Windows
>>> > instance in IBM SCE.
>>> >
>>> > I cant find in the documentation what is the string format for the
>>> > username and password. This is what the docs for create_node say:
>>> > auth:   L{NodeAuthSSHKey} or L{NodeAuthPassword}
>>> >
>>> > I tried with "user:pass" as in the official SCE API, but it does not
>>> work
>>> > in libcloud.
>>> >
>>> > The error I'm getting is:
>>> > "Exception: Error 412: The parameter (UserName) is required while
>>> creating
>>> > Windows instance."
>>> >
>>> >
>>> > Thanks.
>>> >
>>> >
>>> > Mihai
>>> >
>>> >
>>> >
>>> >
>>>
>>
>>
>>
>> --
>> sengork
>>
>
>


-- 
sengork

Re: String format for Windows provisioning on IBM SCE

Posted by Tomaz Muraus <to...@apache.org>.
Sengor - Thanks for explanation / clarification. I'm happy to include this
in the official documentation.

Documentation is located in an SVN repository (
http://svn.apache.org/repos/asf/libcloud/site/trunk/content/docs/) so if I
don't get to it in the next couple of days you can create a patch yourself
and submit it on JIRA and I will commit it as soon as possible.

On Sat, Apr 20, 2013 at 2:44 AM, Sengor <se...@gmail.com> wrote:

> Greetings,
>
>
> There is a way to instantiate Windows based instances on IBM SCE. The
> trick is to use ex_configurationData argument. You can bypass
> NodeAuthSSHKey completely. I've tried it just now and it works. Tomaz I'm
> happy for this to be included in the official libcloud docs. If Jira is
> needed let me know...
>
>
> Example:
> ~~~~~~~~~~~~~~~~~~~~~~~~~
>
> from libcloud.compute.types import Provider
> from libcloud.compute.providers import get_driver
>
> Driver = get_driver(Provider.IBM)
> conn = Driver("username", "password")
>
> images = conn.list_images()
> for i in images:
>    if i.id == '20014110':
>      win=i
>
> locations=conn.list_locations()
> for i in locations:
>   if i.id == '82':
>     location=i
>
> size=conn.list_sizes()[2]
> node = conn.create_node(name="windows box", image=win, size=size,
> ex_configurationData={'UserName':'someone', 'Password':'My0wnPass'},
> location=location)
> conn.list_nodes()
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>
> On 16 April 2013 06:11, Tomaz Muraus <to...@apache.org> wrote:
>
>> I just quickly glanced over the code (
>>
>> https://github.com/apache/libcloud/blob/trunk/libcloud/compute/drivers/ibm_sce.py#L208
>> )
>> and it looks like that the driver currently only supports public key
>> authentication.
>>
>> I'm not too familiar with the IBM SCE API myself, but if the API support
>> this functionality, it should probably be relatively easy to add it and
>> external contributions are always more than welcome.
>>
>> P.S. Please also CC mailing list (users@libcloud.apache.org) on the
>> future
>> emails.
>>
>> On Mon, Apr 15, 2013 at 1:05 PM, Mihai Garbia <mihai.garbia@yahoo.com
>> >wrote:
>>
>> > Can you give me an example of how it would look like for Windows. I
>> > already know how to do it to provision Linux (it is a string name
>> > representing a SSH key stored in SCE), but for windows only user and
>> > password is required.
>> >
>> > Thanks.
>> >
>> > Mihai
>> >
>> > ------------------------------
>> > Blog: experimentenaturiste.blogspot.ro
>>
>> >
>> >
>> > --- On *Mon, 15/4/13, Tomaz Muraus <to...@apache.org>* wrote:
>> >
>> >
>> > From: Tomaz Muraus <to...@apache.org>
>> > Subject: Re: String format for Windows provisioning on IBM SCE
>> > To: users@libcloud.apache.org
>> > Cc: mihai.garbia@yahoo.com
>> > Date: Monday, 15 April, 2013, 22:56
>> >
>> >
>> > I'm not totally sure about the IBM SCE driver and Windows instances, but
>> > usually you pass an instance of NodeAuthSSHKey or NodeAuthPassword
>> class to
>> > the create_node method as an "auth" argument.
>> >
>> > On Mon, Apr 15, 2013 at 4:59 AM, Mihai Garbia <mihai.garbia@yahoo.com<
>> http://mc/compose?to=mihai.garbia@yahoo.com>
>>
>> > > wrote:
>> >
>> >
>> > Hello,
>> >
>> > Can you tell me what is the string format for user and password on
>> > provisioning a Windows instance in IBM SCE using libcloud?
>> >
>> > I'm using NodeDriver(BaseDriver) : -> create_node to create a Windows
>> > instance in IBM SCE.
>> >
>> > I cant find in the documentation what is the string format for the
>> > username and password. This is what the docs for create_node say:
>> > auth:   L{NodeAuthSSHKey} or L{NodeAuthPassword}
>> >
>> > I tried with "user:pass" as in the official SCE API, but it does not
>> work
>> > in libcloud.
>> >
>> > The error I'm getting is:
>> > "Exception: Error 412: The parameter (UserName) is required while
>> creating
>> > Windows instance."
>> >
>> >
>> > Thanks.
>> >
>> >
>> > Mihai
>> >
>> >
>> >
>> >
>>
>
>
>
> --
> sengork
>

Re: Apache Libcloud Vcloud change network for VM

Posted by Sengor <se...@gmail.com>.
One could extend the VCloudNodeDriver._to_image() method to extract and
include the VM network for each VM within the vApp template and store it
within NodeImage.extra dictionary.

Patches are always welcome. ;) http://libcloud.apache.org/contributing.html




On 20 April 2013 21:30, Kashif Ali <ka...@linuxcraft.co.uk> wrote:

> I have the issue, that our vAPP is generic so we need to define which
> network it will go in and by default it goes in DEV01-APP.
>
> The bad thing about this, as you have now confirmed their isn't a way to
> grab which network has been defined in the vAPP, and in our case where we
> may going from one org to another, we would need to know in advance what
> the default network is. I will test by defining NO network and see if it
> works, that will at least make things a little simpler.
>
> Thanks again
>
> Kash
>
>
> On 20 Apr 2013, at 12:18, Sengor <se...@gmail.com> wrote:
>
> > Hi,
> >
> > Glad it worked for you. From what I understand vApp templates created
> > within a vCloud will always have ex_vm_network defined unless you import
> > them from an external OVF (as the DMTF standard allows 0 or more Netowrk
> > name elements). I have not tried your proposed combination so cannot tell
> > if it'd work. This certainly places a limit on vApp template (image)
> > portability amongst different cloud providers and is an area where cloud
> > standards help.
> >
> > One of the deficiencies of the libcloud vCloud compute driver is you
> cannot
> > easily query the vApp template VM network name. That is you have to know
> > the ex_vm_network in advance if it is not the same as organisation's
> > ex_network. For this I normally enable libcloud debugging and inspect the
> > raw XML when list_images in invoked as per
> > http://libcloud.apache.org/docs/debugging.html
> >
> > In most situations I've seen neither of the arguments is required as vApp
> > templates tend to originate from the same virtual organisation they are
> > being instantiated in.
> >
> >
> >
> >
> >
> > On 20 April 2013 21:00, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >
> >> I just tested, and I confirm it worked :) thank you for clarifying.
> >>
> >> so just to finish off, if the default network is not defined,
> >>
> >> Can I do:
> >>
> >> ex_vm_network = None
> >> ex_network = <NEW DESIRED NETWORK>
> >>
> >> Kash
> >>
> >>
> >>
> >> On 20 Apr 2013, at 11:54, Sengor <se...@gmail.com> wrote:
> >>
> >>> Yes your understanding is correct and should work as expected.
> >>>
> >>>
> >>>
> >>>
> >>> On 20 April 2013 20:52, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >>>
> >>>> Almost there, so when we are creating a vAPP - we can select the org
> >>>> network:
> >>>>
> >>>> DEV01-APP
> >>>> DEV01-DMZ
> >>>> DEV01-DB
> >>>>
> >>>> So if I understand you correctly, because we have set the default
> >> network
> >>>> in the template to DEV01-APP, I have to set
> >>>>
> >>>> ex_vm_network=<DEFAULT in TEMPLATE>
> >>>> ex_network=<NEW DESIRED NETWORK>
> >>>>
> >>>> ill test it out now :)
> >>>>
> >>>> Thanks
> >>>>
> >>>> Kash
> >>>>
> >>>> On 20 Apr 2013, at 11:48, Sengor <se...@gmail.com> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> I know what you mean now, the GUI associates vApp template's VM
> network
> >>>>> DEV01-APP to any organisational network you select from the list
> >>>> (DEV01-DMZ
> >>>>> or DEV01-DB). I can tell that the vApp template was created from an
> >>>>> instantiated vApp originating on the DEV01-APP network.
> >>>>>
> >>>>> If you go through the API this association does not happen
> >> automatically
> >>>>> unless you set the following as part of create_node request:
> >>>>> ex_vm_network="DEV01-APP"
> >>>>> ex_network="DEV01-DMZ"
> >>>>>
> >>>>>
> >>>>> This is exactly why those two variables exist in create_node. They
> will
> >>>>> associate the VM network from vApp template
> (ex_vm_network="DEV01-APP")
> >>>>> with the organisation network (ex_network="DEV01-DMZ") as part of the
> >>>> vApp
> >>>>> instantiation request.
> >>>>>
> >>>>> For reference: http://libcloud.apache.org/docs/compute-examples.html
> >>>>>
> >>>>>
> >>>>> Let us know how you go...
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> On 20 April 2013 20:36, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >>>>>
> >>>>>> Ok,
> >>>>>>
> >>>>>> So we have a vAPP, which defines a virtual machine, and by default
> >> joins
> >>>>>> it to the DEV01-APP network (ex_network and vm_network).
> >>>>>>
> >>>>>> If youcreate a new instance of the vAPP using the GUI you can change
> >> the
> >>>>>> network to DEV01-DMZ or DEV01-DB for example.
> >>>>>>
> >>>>>> What I wanted to do was create an instance via lib cloud and change
> >> the
> >>>>>> network to DEV01-DMZ, if I don't mention the network it defaults to
> >>>>>> DEV01-APP (as defined in the template) and the instance is
> >> successfully
> >>>>>> created, however if I define ex_network and ex_vm_network I get the
> >>>> error:
> >>>>>>
> >>>>>> The VCD entity network DEV01-APP does not exist.
> >>>>>>
> >>>>>> I do not understand why it still trying to use DEV01-APP when I have
> >>>>>> defined DEV01-DMZ in the two variables.
> >>>>>>
> >>>>>> This is where I am confused…
> >>>>>>
> >>>>>> Kash.
> >>>>>>
> >>>>>> On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:
> >>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> Those arguments to create_node indicate which one of the virtual
> >>>>>>> organisation networks (ex_network) to associate at runtime with
> which
> >>>> one
> >>>>>>> of the vApp template VM networks (ex_vm_network) before a running
> >> vApp
> >>>>>> can
> >>>>>>> be instantiated.
> >>>>>>>
> >>>>>>> They will not change any of the networks currently defined within
> >> your
> >>>>>>> virtual organisation or within your current vApp template (image).
> >>>>>>>
> >>>>>>>
> >>>>>>> More info as to what you're trying to achieve would help.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk>
> wrote:
> >>>>>>>
> >>>>>>>> Hi,
> >>>>>>>>
> >>>>>>>> I was hoping someone could explain to me how I would go about
> >> changing
> >>>>>> my
> >>>>>>>> vAPP or VM network using lib cloud when talking to vCloud.
> >>>>>>>>
> >>>>>>>> I tried setting the ex_network and the ex_vm_network however it
> >> seems
> >>>>>> that
> >>>>>>>> it doesn't change the VM network :(
> >>>>>>>>
> >>>>>>>> Any advice would be appreciated.
> >>>>>>>>
> >>>>>>>> Regards
> >>>>>>>>
> >>>>>>>> Kash
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> sengork
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> sengork
> >>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> sengork
> >>
> >>
> >
> >
> > --
> > sengork
>
>


-- 
sengork

Re: Apache Libcloud Vcloud change network for VM

Posted by Kashif Ali <ka...@linuxcraft.co.uk>.
I have the issue, that our vAPP is generic so we need to define which network it will go in and by default it goes in DEV01-APP.

The bad thing about this, as you have now confirmed their isn't a way to grab which network has been defined in the vAPP, and in our case where we may going from one org to another, we would need to know in advance what the default network is. I will test by defining NO network and see if it works, that will at least make things a little simpler.

Thanks again

Kash


On 20 Apr 2013, at 12:18, Sengor <se...@gmail.com> wrote:

> Hi,
> 
> Glad it worked for you. From what I understand vApp templates created
> within a vCloud will always have ex_vm_network defined unless you import
> them from an external OVF (as the DMTF standard allows 0 or more Netowrk
> name elements). I have not tried your proposed combination so cannot tell
> if it'd work. This certainly places a limit on vApp template (image)
> portability amongst different cloud providers and is an area where cloud
> standards help.
> 
> One of the deficiencies of the libcloud vCloud compute driver is you cannot
> easily query the vApp template VM network name. That is you have to know
> the ex_vm_network in advance if it is not the same as organisation's
> ex_network. For this I normally enable libcloud debugging and inspect the
> raw XML when list_images in invoked as per
> http://libcloud.apache.org/docs/debugging.html
> 
> In most situations I've seen neither of the arguments is required as vApp
> templates tend to originate from the same virtual organisation they are
> being instantiated in.
> 
> 
> 
> 
> 
> On 20 April 2013 21:00, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> 
>> I just tested, and I confirm it worked :) thank you for clarifying.
>> 
>> so just to finish off, if the default network is not defined,
>> 
>> Can I do:
>> 
>> ex_vm_network = None
>> ex_network = <NEW DESIRED NETWORK>
>> 
>> Kash
>> 
>> 
>> 
>> On 20 Apr 2013, at 11:54, Sengor <se...@gmail.com> wrote:
>> 
>>> Yes your understanding is correct and should work as expected.
>>> 
>>> 
>>> 
>>> 
>>> On 20 April 2013 20:52, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>> 
>>>> Almost there, so when we are creating a vAPP - we can select the org
>>>> network:
>>>> 
>>>> DEV01-APP
>>>> DEV01-DMZ
>>>> DEV01-DB
>>>> 
>>>> So if I understand you correctly, because we have set the default
>> network
>>>> in the template to DEV01-APP, I have to set
>>>> 
>>>> ex_vm_network=<DEFAULT in TEMPLATE>
>>>> ex_network=<NEW DESIRED NETWORK>
>>>> 
>>>> ill test it out now :)
>>>> 
>>>> Thanks
>>>> 
>>>> Kash
>>>> 
>>>> On 20 Apr 2013, at 11:48, Sengor <se...@gmail.com> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> I know what you mean now, the GUI associates vApp template's VM network
>>>>> DEV01-APP to any organisational network you select from the list
>>>> (DEV01-DMZ
>>>>> or DEV01-DB). I can tell that the vApp template was created from an
>>>>> instantiated vApp originating on the DEV01-APP network.
>>>>> 
>>>>> If you go through the API this association does not happen
>> automatically
>>>>> unless you set the following as part of create_node request:
>>>>> ex_vm_network="DEV01-APP"
>>>>> ex_network="DEV01-DMZ"
>>>>> 
>>>>> 
>>>>> This is exactly why those two variables exist in create_node. They will
>>>>> associate the VM network from vApp template (ex_vm_network="DEV01-APP")
>>>>> with the organisation network (ex_network="DEV01-DMZ") as part of the
>>>> vApp
>>>>> instantiation request.
>>>>> 
>>>>> For reference: http://libcloud.apache.org/docs/compute-examples.html
>>>>> 
>>>>> 
>>>>> Let us know how you go...
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On 20 April 2013 20:36, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>>>> 
>>>>>> Ok,
>>>>>> 
>>>>>> So we have a vAPP, which defines a virtual machine, and by default
>> joins
>>>>>> it to the DEV01-APP network (ex_network and vm_network).
>>>>>> 
>>>>>> If youcreate a new instance of the vAPP using the GUI you can change
>> the
>>>>>> network to DEV01-DMZ or DEV01-DB for example.
>>>>>> 
>>>>>> What I wanted to do was create an instance via lib cloud and change
>> the
>>>>>> network to DEV01-DMZ, if I don't mention the network it defaults to
>>>>>> DEV01-APP (as defined in the template) and the instance is
>> successfully
>>>>>> created, however if I define ex_network and ex_vm_network I get the
>>>> error:
>>>>>> 
>>>>>> The VCD entity network DEV01-APP does not exist.
>>>>>> 
>>>>>> I do not understand why it still trying to use DEV01-APP when I have
>>>>>> defined DEV01-DMZ in the two variables.
>>>>>> 
>>>>>> This is where I am confused…
>>>>>> 
>>>>>> Kash.
>>>>>> 
>>>>>> On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:
>>>>>> 
>>>>>>> Hi,
>>>>>>> 
>>>>>>> Those arguments to create_node indicate which one of the virtual
>>>>>>> organisation networks (ex_network) to associate at runtime with which
>>>> one
>>>>>>> of the vApp template VM networks (ex_vm_network) before a running
>> vApp
>>>>>> can
>>>>>>> be instantiated.
>>>>>>> 
>>>>>>> They will not change any of the networks currently defined within
>> your
>>>>>>> virtual organisation or within your current vApp template (image).
>>>>>>> 
>>>>>>> 
>>>>>>> More info as to what you're trying to achieve would help.
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>>>>>> 
>>>>>>>> Hi,
>>>>>>>> 
>>>>>>>> I was hoping someone could explain to me how I would go about
>> changing
>>>>>> my
>>>>>>>> vAPP or VM network using lib cloud when talking to vCloud.
>>>>>>>> 
>>>>>>>> I tried setting the ex_network and the ex_vm_network however it
>> seems
>>>>>> that
>>>>>>>> it doesn't change the VM network :(
>>>>>>>> 
>>>>>>>> Any advice would be appreciated.
>>>>>>>> 
>>>>>>>> Regards
>>>>>>>> 
>>>>>>>> Kash
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> sengork
>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> sengork
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> sengork
>> 
>> 
> 
> 
> -- 
> sengork


Re: Apache Libcloud Vcloud change network for VM

Posted by Kashif Ali <ka...@linuxcraft.co.uk>.
Agreed, its not a big deal, for now I know the networks, later on I can build out functionality, which checks the default network of a vAPP and then i can use that later on to change the network.

BTW - in my setup we are doing one VM per VAPP so things are as simple as they get, if someone read this email chain, I wanted to make it clear how i was testing and using this.

Kash


On 22 Apr 2013, at 12:13, Sengor <se...@gmail.com> wrote:

> I suspect this is the behaviour of vCloud Director API not libcloud itself.
> 
> 
> 
> 
> 
> On 22 April 2013 21:00, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> 
>> so just a FYI
>> 
>> I tested a vAPP with a single VM (which didn't have any network defined)
>> then tried to change the network.
>> 
>> It seems the network is changed, however even though the IPMODE is
>> specified it doesn't get an ip address. (IPMODE = POOL)
>> 
>> If i set a default network for example DEV01-APP then change this to
>> DEV01-DMZ as discussed earlier in this list, everything works (IPMODE =
>> POOL is defined as well).
>> 
>> I thought it would also work if i set the default network to None, and the
>> change but it doesn't :(
>> 
>> Kash
>> 
>> 
>> 
>> On 20 Apr 2013, at 12:18, Sengor <se...@gmail.com> wrote:
>> 
>>> Hi,
>>> 
>>> Glad it worked for you. From what I understand vApp templates created
>>> within a vCloud will always have ex_vm_network defined unless you import
>>> them from an external OVF (as the DMTF standard allows 0 or more Netowrk
>>> name elements). I have not tried your proposed combination so cannot tell
>>> if it'd work. This certainly places a limit on vApp template (image)
>>> portability amongst different cloud providers and is an area where cloud
>>> standards help.
>>> 
>>> One of the deficiencies of the libcloud vCloud compute driver is you
>> cannot
>>> easily query the vApp template VM network name. That is you have to know
>>> the ex_vm_network in advance if it is not the same as organisation's
>>> ex_network. For this I normally enable libcloud debugging and inspect the
>>> raw XML when list_images in invoked as per
>>> http://libcloud.apache.org/docs/debugging.html
>>> 
>>> In most situations I've seen neither of the arguments is required as vApp
>>> templates tend to originate from the same virtual organisation they are
>>> being instantiated in.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On 20 April 2013 21:00, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>> 
>>>> I just tested, and I confirm it worked :) thank you for clarifying.
>>>> 
>>>> so just to finish off, if the default network is not defined,
>>>> 
>>>> Can I do:
>>>> 
>>>> ex_vm_network = None
>>>> ex_network = <NEW DESIRED NETWORK>
>>>> 
>>>> Kash
>>>> 
>>>> 
>>>> 
>>>> On 20 Apr 2013, at 11:54, Sengor <se...@gmail.com> wrote:
>>>> 
>>>>> Yes your understanding is correct and should work as expected.
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On 20 April 2013 20:52, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>>>> 
>>>>>> Almost there, so when we are creating a vAPP - we can select the org
>>>>>> network:
>>>>>> 
>>>>>> DEV01-APP
>>>>>> DEV01-DMZ
>>>>>> DEV01-DB
>>>>>> 
>>>>>> So if I understand you correctly, because we have set the default
>>>> network
>>>>>> in the template to DEV01-APP, I have to set
>>>>>> 
>>>>>> ex_vm_network=<DEFAULT in TEMPLATE>
>>>>>> ex_network=<NEW DESIRED NETWORK>
>>>>>> 
>>>>>> ill test it out now :)
>>>>>> 
>>>>>> Thanks
>>>>>> 
>>>>>> Kash
>>>>>> 
>>>>>> On 20 Apr 2013, at 11:48, Sengor <se...@gmail.com> wrote:
>>>>>> 
>>>>>>> Hi,
>>>>>>> 
>>>>>>> I know what you mean now, the GUI associates vApp template's VM
>> network
>>>>>>> DEV01-APP to any organisational network you select from the list
>>>>>> (DEV01-DMZ
>>>>>>> or DEV01-DB). I can tell that the vApp template was created from an
>>>>>>> instantiated vApp originating on the DEV01-APP network.
>>>>>>> 
>>>>>>> If you go through the API this association does not happen
>>>> automatically
>>>>>>> unless you set the following as part of create_node request:
>>>>>>> ex_vm_network="DEV01-APP"
>>>>>>> ex_network="DEV01-DMZ"
>>>>>>> 
>>>>>>> 
>>>>>>> This is exactly why those two variables exist in create_node. They
>> will
>>>>>>> associate the VM network from vApp template
>> (ex_vm_network="DEV01-APP")
>>>>>>> with the organisation network (ex_network="DEV01-DMZ") as part of the
>>>>>> vApp
>>>>>>> instantiation request.
>>>>>>> 
>>>>>>> For reference: http://libcloud.apache.org/docs/compute-examples.html
>>>>>>> 
>>>>>>> 
>>>>>>> Let us know how you go...
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On 20 April 2013 20:36, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>>>>>> 
>>>>>>>> Ok,
>>>>>>>> 
>>>>>>>> So we have a vAPP, which defines a virtual machine, and by default
>>>> joins
>>>>>>>> it to the DEV01-APP network (ex_network and vm_network).
>>>>>>>> 
>>>>>>>> If youcreate a new instance of the vAPP using the GUI you can change
>>>> the
>>>>>>>> network to DEV01-DMZ or DEV01-DB for example.
>>>>>>>> 
>>>>>>>> What I wanted to do was create an instance via lib cloud and change
>>>> the
>>>>>>>> network to DEV01-DMZ, if I don't mention the network it defaults to
>>>>>>>> DEV01-APP (as defined in the template) and the instance is
>>>> successfully
>>>>>>>> created, however if I define ex_network and ex_vm_network I get the
>>>>>> error:
>>>>>>>> 
>>>>>>>> The VCD entity network DEV01-APP does not exist.
>>>>>>>> 
>>>>>>>> I do not understand why it still trying to use DEV01-APP when I have
>>>>>>>> defined DEV01-DMZ in the two variables.
>>>>>>>> 
>>>>>>>> This is where I am confused…
>>>>>>>> 
>>>>>>>> Kash.
>>>>>>>> 
>>>>>>>> On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:
>>>>>>>> 
>>>>>>>>> Hi,
>>>>>>>>> 
>>>>>>>>> Those arguments to create_node indicate which one of the virtual
>>>>>>>>> organisation networks (ex_network) to associate at runtime with
>> which
>>>>>> one
>>>>>>>>> of the vApp template VM networks (ex_vm_network) before a running
>>>> vApp
>>>>>>>> can
>>>>>>>>> be instantiated.
>>>>>>>>> 
>>>>>>>>> They will not change any of the networks currently defined within
>>>> your
>>>>>>>>> virtual organisation or within your current vApp template (image).
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> More info as to what you're trying to achieve would help.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk>
>> wrote:
>>>>>>>>> 
>>>>>>>>>> Hi,
>>>>>>>>>> 
>>>>>>>>>> I was hoping someone could explain to me how I would go about
>>>> changing
>>>>>>>> my
>>>>>>>>>> vAPP or VM network using lib cloud when talking to vCloud.
>>>>>>>>>> 
>>>>>>>>>> I tried setting the ex_network and the ex_vm_network however it
>>>> seems
>>>>>>>> that
>>>>>>>>>> it doesn't change the VM network :(
>>>>>>>>>> 
>>>>>>>>>> Any advice would be appreciated.
>>>>>>>>>> 
>>>>>>>>>> Regards
>>>>>>>>>> 
>>>>>>>>>> Kash
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>>> sengork
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> sengork
>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> sengork
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> sengork
>> 
>> 
> 
> 
> -- 
> sengork


Re: Apache Libcloud Vcloud change network for VM

Posted by Sengor <se...@gmail.com>.
I suspect this is the behaviour of vCloud Director API not libcloud itself.





On 22 April 2013 21:00, Kashif Ali <ka...@linuxcraft.co.uk> wrote:

> so just a FYI
>
> I tested a vAPP with a single VM (which didn't have any network defined)
> then tried to change the network.
>
> It seems the network is changed, however even though the IPMODE is
> specified it doesn't get an ip address. (IPMODE = POOL)
>
> If i set a default network for example DEV01-APP then change this to
> DEV01-DMZ as discussed earlier in this list, everything works (IPMODE =
> POOL is defined as well).
>
> I thought it would also work if i set the default network to None, and the
> change but it doesn't :(
>
> Kash
>
>
>
> On 20 Apr 2013, at 12:18, Sengor <se...@gmail.com> wrote:
>
> > Hi,
> >
> > Glad it worked for you. From what I understand vApp templates created
> > within a vCloud will always have ex_vm_network defined unless you import
> > them from an external OVF (as the DMTF standard allows 0 or more Netowrk
> > name elements). I have not tried your proposed combination so cannot tell
> > if it'd work. This certainly places a limit on vApp template (image)
> > portability amongst different cloud providers and is an area where cloud
> > standards help.
> >
> > One of the deficiencies of the libcloud vCloud compute driver is you
> cannot
> > easily query the vApp template VM network name. That is you have to know
> > the ex_vm_network in advance if it is not the same as organisation's
> > ex_network. For this I normally enable libcloud debugging and inspect the
> > raw XML when list_images in invoked as per
> > http://libcloud.apache.org/docs/debugging.html
> >
> > In most situations I've seen neither of the arguments is required as vApp
> > templates tend to originate from the same virtual organisation they are
> > being instantiated in.
> >
> >
> >
> >
> >
> > On 20 April 2013 21:00, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >
> >> I just tested, and I confirm it worked :) thank you for clarifying.
> >>
> >> so just to finish off, if the default network is not defined,
> >>
> >> Can I do:
> >>
> >> ex_vm_network = None
> >> ex_network = <NEW DESIRED NETWORK>
> >>
> >> Kash
> >>
> >>
> >>
> >> On 20 Apr 2013, at 11:54, Sengor <se...@gmail.com> wrote:
> >>
> >>> Yes your understanding is correct and should work as expected.
> >>>
> >>>
> >>>
> >>>
> >>> On 20 April 2013 20:52, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >>>
> >>>> Almost there, so when we are creating a vAPP - we can select the org
> >>>> network:
> >>>>
> >>>> DEV01-APP
> >>>> DEV01-DMZ
> >>>> DEV01-DB
> >>>>
> >>>> So if I understand you correctly, because we have set the default
> >> network
> >>>> in the template to DEV01-APP, I have to set
> >>>>
> >>>> ex_vm_network=<DEFAULT in TEMPLATE>
> >>>> ex_network=<NEW DESIRED NETWORK>
> >>>>
> >>>> ill test it out now :)
> >>>>
> >>>> Thanks
> >>>>
> >>>> Kash
> >>>>
> >>>> On 20 Apr 2013, at 11:48, Sengor <se...@gmail.com> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> I know what you mean now, the GUI associates vApp template's VM
> network
> >>>>> DEV01-APP to any organisational network you select from the list
> >>>> (DEV01-DMZ
> >>>>> or DEV01-DB). I can tell that the vApp template was created from an
> >>>>> instantiated vApp originating on the DEV01-APP network.
> >>>>>
> >>>>> If you go through the API this association does not happen
> >> automatically
> >>>>> unless you set the following as part of create_node request:
> >>>>> ex_vm_network="DEV01-APP"
> >>>>> ex_network="DEV01-DMZ"
> >>>>>
> >>>>>
> >>>>> This is exactly why those two variables exist in create_node. They
> will
> >>>>> associate the VM network from vApp template
> (ex_vm_network="DEV01-APP")
> >>>>> with the organisation network (ex_network="DEV01-DMZ") as part of the
> >>>> vApp
> >>>>> instantiation request.
> >>>>>
> >>>>> For reference: http://libcloud.apache.org/docs/compute-examples.html
> >>>>>
> >>>>>
> >>>>> Let us know how you go...
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> On 20 April 2013 20:36, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >>>>>
> >>>>>> Ok,
> >>>>>>
> >>>>>> So we have a vAPP, which defines a virtual machine, and by default
> >> joins
> >>>>>> it to the DEV01-APP network (ex_network and vm_network).
> >>>>>>
> >>>>>> If youcreate a new instance of the vAPP using the GUI you can change
> >> the
> >>>>>> network to DEV01-DMZ or DEV01-DB for example.
> >>>>>>
> >>>>>> What I wanted to do was create an instance via lib cloud and change
> >> the
> >>>>>> network to DEV01-DMZ, if I don't mention the network it defaults to
> >>>>>> DEV01-APP (as defined in the template) and the instance is
> >> successfully
> >>>>>> created, however if I define ex_network and ex_vm_network I get the
> >>>> error:
> >>>>>>
> >>>>>> The VCD entity network DEV01-APP does not exist.
> >>>>>>
> >>>>>> I do not understand why it still trying to use DEV01-APP when I have
> >>>>>> defined DEV01-DMZ in the two variables.
> >>>>>>
> >>>>>> This is where I am confused…
> >>>>>>
> >>>>>> Kash.
> >>>>>>
> >>>>>> On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:
> >>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> Those arguments to create_node indicate which one of the virtual
> >>>>>>> organisation networks (ex_network) to associate at runtime with
> which
> >>>> one
> >>>>>>> of the vApp template VM networks (ex_vm_network) before a running
> >> vApp
> >>>>>> can
> >>>>>>> be instantiated.
> >>>>>>>
> >>>>>>> They will not change any of the networks currently defined within
> >> your
> >>>>>>> virtual organisation or within your current vApp template (image).
> >>>>>>>
> >>>>>>>
> >>>>>>> More info as to what you're trying to achieve would help.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk>
> wrote:
> >>>>>>>
> >>>>>>>> Hi,
> >>>>>>>>
> >>>>>>>> I was hoping someone could explain to me how I would go about
> >> changing
> >>>>>> my
> >>>>>>>> vAPP or VM network using lib cloud when talking to vCloud.
> >>>>>>>>
> >>>>>>>> I tried setting the ex_network and the ex_vm_network however it
> >> seems
> >>>>>> that
> >>>>>>>> it doesn't change the VM network :(
> >>>>>>>>
> >>>>>>>> Any advice would be appreciated.
> >>>>>>>>
> >>>>>>>> Regards
> >>>>>>>>
> >>>>>>>> Kash
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> sengork
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> sengork
> >>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> sengork
> >>
> >>
> >
> >
> > --
> > sengork
>
>


-- 
sengork

Re: Apache Libcloud Vcloud change network for VM

Posted by Kashif Ali <ka...@linuxcraft.co.uk>.
so just a FYI

I tested a vAPP with a single VM (which didn't have any network defined) then tried to change the network.

It seems the network is changed, however even though the IPMODE is specified it doesn't get an ip address. (IPMODE = POOL) 

If i set a default network for example DEV01-APP then change this to DEV01-DMZ as discussed earlier in this list, everything works (IPMODE = POOL is defined as well). 

I thought it would also work if i set the default network to None, and the change but it doesn't :(

Kash



On 20 Apr 2013, at 12:18, Sengor <se...@gmail.com> wrote:

> Hi,
> 
> Glad it worked for you. From what I understand vApp templates created
> within a vCloud will always have ex_vm_network defined unless you import
> them from an external OVF (as the DMTF standard allows 0 or more Netowrk
> name elements). I have not tried your proposed combination so cannot tell
> if it'd work. This certainly places a limit on vApp template (image)
> portability amongst different cloud providers and is an area where cloud
> standards help.
> 
> One of the deficiencies of the libcloud vCloud compute driver is you cannot
> easily query the vApp template VM network name. That is you have to know
> the ex_vm_network in advance if it is not the same as organisation's
> ex_network. For this I normally enable libcloud debugging and inspect the
> raw XML when list_images in invoked as per
> http://libcloud.apache.org/docs/debugging.html
> 
> In most situations I've seen neither of the arguments is required as vApp
> templates tend to originate from the same virtual organisation they are
> being instantiated in.
> 
> 
> 
> 
> 
> On 20 April 2013 21:00, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> 
>> I just tested, and I confirm it worked :) thank you for clarifying.
>> 
>> so just to finish off, if the default network is not defined,
>> 
>> Can I do:
>> 
>> ex_vm_network = None
>> ex_network = <NEW DESIRED NETWORK>
>> 
>> Kash
>> 
>> 
>> 
>> On 20 Apr 2013, at 11:54, Sengor <se...@gmail.com> wrote:
>> 
>>> Yes your understanding is correct and should work as expected.
>>> 
>>> 
>>> 
>>> 
>>> On 20 April 2013 20:52, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>> 
>>>> Almost there, so when we are creating a vAPP - we can select the org
>>>> network:
>>>> 
>>>> DEV01-APP
>>>> DEV01-DMZ
>>>> DEV01-DB
>>>> 
>>>> So if I understand you correctly, because we have set the default
>> network
>>>> in the template to DEV01-APP, I have to set
>>>> 
>>>> ex_vm_network=<DEFAULT in TEMPLATE>
>>>> ex_network=<NEW DESIRED NETWORK>
>>>> 
>>>> ill test it out now :)
>>>> 
>>>> Thanks
>>>> 
>>>> Kash
>>>> 
>>>> On 20 Apr 2013, at 11:48, Sengor <se...@gmail.com> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> I know what you mean now, the GUI associates vApp template's VM network
>>>>> DEV01-APP to any organisational network you select from the list
>>>> (DEV01-DMZ
>>>>> or DEV01-DB). I can tell that the vApp template was created from an
>>>>> instantiated vApp originating on the DEV01-APP network.
>>>>> 
>>>>> If you go through the API this association does not happen
>> automatically
>>>>> unless you set the following as part of create_node request:
>>>>> ex_vm_network="DEV01-APP"
>>>>> ex_network="DEV01-DMZ"
>>>>> 
>>>>> 
>>>>> This is exactly why those two variables exist in create_node. They will
>>>>> associate the VM network from vApp template (ex_vm_network="DEV01-APP")
>>>>> with the organisation network (ex_network="DEV01-DMZ") as part of the
>>>> vApp
>>>>> instantiation request.
>>>>> 
>>>>> For reference: http://libcloud.apache.org/docs/compute-examples.html
>>>>> 
>>>>> 
>>>>> Let us know how you go...
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On 20 April 2013 20:36, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>>>> 
>>>>>> Ok,
>>>>>> 
>>>>>> So we have a vAPP, which defines a virtual machine, and by default
>> joins
>>>>>> it to the DEV01-APP network (ex_network and vm_network).
>>>>>> 
>>>>>> If youcreate a new instance of the vAPP using the GUI you can change
>> the
>>>>>> network to DEV01-DMZ or DEV01-DB for example.
>>>>>> 
>>>>>> What I wanted to do was create an instance via lib cloud and change
>> the
>>>>>> network to DEV01-DMZ, if I don't mention the network it defaults to
>>>>>> DEV01-APP (as defined in the template) and the instance is
>> successfully
>>>>>> created, however if I define ex_network and ex_vm_network I get the
>>>> error:
>>>>>> 
>>>>>> The VCD entity network DEV01-APP does not exist.
>>>>>> 
>>>>>> I do not understand why it still trying to use DEV01-APP when I have
>>>>>> defined DEV01-DMZ in the two variables.
>>>>>> 
>>>>>> This is where I am confused…
>>>>>> 
>>>>>> Kash.
>>>>>> 
>>>>>> On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:
>>>>>> 
>>>>>>> Hi,
>>>>>>> 
>>>>>>> Those arguments to create_node indicate which one of the virtual
>>>>>>> organisation networks (ex_network) to associate at runtime with which
>>>> one
>>>>>>> of the vApp template VM networks (ex_vm_network) before a running
>> vApp
>>>>>> can
>>>>>>> be instantiated.
>>>>>>> 
>>>>>>> They will not change any of the networks currently defined within
>> your
>>>>>>> virtual organisation or within your current vApp template (image).
>>>>>>> 
>>>>>>> 
>>>>>>> More info as to what you're trying to achieve would help.
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>>>>>> 
>>>>>>>> Hi,
>>>>>>>> 
>>>>>>>> I was hoping someone could explain to me how I would go about
>> changing
>>>>>> my
>>>>>>>> vAPP or VM network using lib cloud when talking to vCloud.
>>>>>>>> 
>>>>>>>> I tried setting the ex_network and the ex_vm_network however it
>> seems
>>>>>> that
>>>>>>>> it doesn't change the VM network :(
>>>>>>>> 
>>>>>>>> Any advice would be appreciated.
>>>>>>>> 
>>>>>>>> Regards
>>>>>>>> 
>>>>>>>> Kash
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> sengork
>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> sengork
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> sengork
>> 
>> 
> 
> 
> -- 
> sengork


Re: Apache Libcloud Vcloud change network for VM

Posted by Sengor <se...@gmail.com>.
Hi,

Glad it worked for you. From what I understand vApp templates created
within a vCloud will always have ex_vm_network defined unless you import
them from an external OVF (as the DMTF standard allows 0 or more Netowrk
name elements). I have not tried your proposed combination so cannot tell
if it'd work. This certainly places a limit on vApp template (image)
portability amongst different cloud providers and is an area where cloud
standards help.

One of the deficiencies of the libcloud vCloud compute driver is you cannot
easily query the vApp template VM network name. That is you have to know
the ex_vm_network in advance if it is not the same as organisation's
ex_network. For this I normally enable libcloud debugging and inspect the
raw XML when list_images in invoked as per
http://libcloud.apache.org/docs/debugging.html

In most situations I've seen neither of the arguments is required as vApp
templates tend to originate from the same virtual organisation they are
being instantiated in.





On 20 April 2013 21:00, Kashif Ali <ka...@linuxcraft.co.uk> wrote:

> I just tested, and I confirm it worked :) thank you for clarifying.
>
>  so just to finish off, if the default network is not defined,
>
> Can I do:
>
> ex_vm_network = None
> ex_network = <NEW DESIRED NETWORK>
>
> Kash
>
>
>
> On 20 Apr 2013, at 11:54, Sengor <se...@gmail.com> wrote:
>
> > Yes your understanding is correct and should work as expected.
> >
> >
> >
> >
> > On 20 April 2013 20:52, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >
> >> Almost there, so when we are creating a vAPP - we can select the org
> >> network:
> >>
> >> DEV01-APP
> >> DEV01-DMZ
> >> DEV01-DB
> >>
> >> So if I understand you correctly, because we have set the default
> network
> >> in the template to DEV01-APP, I have to set
> >>
> >> ex_vm_network=<DEFAULT in TEMPLATE>
> >> ex_network=<NEW DESIRED NETWORK>
> >>
> >> ill test it out now :)
> >>
> >> Thanks
> >>
> >> Kash
> >>
> >> On 20 Apr 2013, at 11:48, Sengor <se...@gmail.com> wrote:
> >>
> >>> Hi,
> >>>
> >>> I know what you mean now, the GUI associates vApp template's VM network
> >>> DEV01-APP to any organisational network you select from the list
> >> (DEV01-DMZ
> >>> or DEV01-DB). I can tell that the vApp template was created from an
> >>> instantiated vApp originating on the DEV01-APP network.
> >>>
> >>> If you go through the API this association does not happen
> automatically
> >>> unless you set the following as part of create_node request:
> >>> ex_vm_network="DEV01-APP"
> >>> ex_network="DEV01-DMZ"
> >>>
> >>>
> >>> This is exactly why those two variables exist in create_node. They will
> >>> associate the VM network from vApp template (ex_vm_network="DEV01-APP")
> >>> with the organisation network (ex_network="DEV01-DMZ") as part of the
> >> vApp
> >>> instantiation request.
> >>>
> >>> For reference: http://libcloud.apache.org/docs/compute-examples.html
> >>>
> >>>
> >>> Let us know how you go...
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On 20 April 2013 20:36, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >>>
> >>>> Ok,
> >>>>
> >>>> So we have a vAPP, which defines a virtual machine, and by default
> joins
> >>>> it to the DEV01-APP network (ex_network and vm_network).
> >>>>
> >>>> If youcreate a new instance of the vAPP using the GUI you can change
> the
> >>>> network to DEV01-DMZ or DEV01-DB for example.
> >>>>
> >>>> What I wanted to do was create an instance via lib cloud and change
> the
> >>>> network to DEV01-DMZ, if I don't mention the network it defaults to
> >>>> DEV01-APP (as defined in the template) and the instance is
> successfully
> >>>> created, however if I define ex_network and ex_vm_network I get the
> >> error:
> >>>>
> >>>> The VCD entity network DEV01-APP does not exist.
> >>>>
> >>>> I do not understand why it still trying to use DEV01-APP when I have
> >>>> defined DEV01-DMZ in the two variables.
> >>>>
> >>>> This is where I am confused…
> >>>>
> >>>> Kash.
> >>>>
> >>>> On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> Those arguments to create_node indicate which one of the virtual
> >>>>> organisation networks (ex_network) to associate at runtime with which
> >> one
> >>>>> of the vApp template VM networks (ex_vm_network) before a running
> vApp
> >>>> can
> >>>>> be instantiated.
> >>>>>
> >>>>> They will not change any of the networks currently defined within
> your
> >>>>> virtual organisation or within your current vApp template (image).
> >>>>>
> >>>>>
> >>>>> More info as to what you're trying to achieve would help.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>> I was hoping someone could explain to me how I would go about
> changing
> >>>> my
> >>>>>> vAPP or VM network using lib cloud when talking to vCloud.
> >>>>>>
> >>>>>> I tried setting the ex_network and the ex_vm_network however it
> seems
> >>>> that
> >>>>>> it doesn't change the VM network :(
> >>>>>>
> >>>>>> Any advice would be appreciated.
> >>>>>>
> >>>>>> Regards
> >>>>>>
> >>>>>> Kash
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> sengork
> >>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> sengork
> >>
> >>
> >
> >
> > --
> > sengork
>
>


-- 
sengork

Re: Apache Libcloud Vcloud change network for VM

Posted by Kashif Ali <ka...@linuxcraft.co.uk>.
Also note, the doc in the vCloud.py should be re-worded, as it wasn't clear this is how this works :)

On 20 Apr 2013, at 12:00, Kashif Ali <ka...@linuxcraft.co.uk> wrote:

> I just tested, and I confirm it worked :) thank you for clarifying.
> 
> so just to finish off, if the default network is not defined,
> 
> Can I do:
> 
> ex_vm_network = None
> ex_network = <NEW DESIRED NETWORK>
> 
> Kash
> 
> 
> 
> On 20 Apr 2013, at 11:54, Sengor <se...@gmail.com> wrote:
> 
>> Yes your understanding is correct and should work as expected.
>> 
>> 
>> 
>> 
>> On 20 April 2013 20:52, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>> 
>>> Almost there, so when we are creating a vAPP - we can select the org
>>> network:
>>> 
>>> DEV01-APP
>>> DEV01-DMZ
>>> DEV01-DB
>>> 
>>> So if I understand you correctly, because we have set the default network
>>> in the template to DEV01-APP, I have to set
>>> 
>>> ex_vm_network=<DEFAULT in TEMPLATE>
>>> ex_network=<NEW DESIRED NETWORK>
>>> 
>>> ill test it out now :)
>>> 
>>> Thanks
>>> 
>>> Kash
>>> 
>>> On 20 Apr 2013, at 11:48, Sengor <se...@gmail.com> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I know what you mean now, the GUI associates vApp template's VM network
>>>> DEV01-APP to any organisational network you select from the list
>>> (DEV01-DMZ
>>>> or DEV01-DB). I can tell that the vApp template was created from an
>>>> instantiated vApp originating on the DEV01-APP network.
>>>> 
>>>> If you go through the API this association does not happen automatically
>>>> unless you set the following as part of create_node request:
>>>> ex_vm_network="DEV01-APP"
>>>> ex_network="DEV01-DMZ"
>>>> 
>>>> 
>>>> This is exactly why those two variables exist in create_node. They will
>>>> associate the VM network from vApp template (ex_vm_network="DEV01-APP")
>>>> with the organisation network (ex_network="DEV01-DMZ") as part of the
>>> vApp
>>>> instantiation request.
>>>> 
>>>> For reference: http://libcloud.apache.org/docs/compute-examples.html
>>>> 
>>>> 
>>>> Let us know how you go...
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On 20 April 2013 20:36, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>>> 
>>>>> Ok,
>>>>> 
>>>>> So we have a vAPP, which defines a virtual machine, and by default joins
>>>>> it to the DEV01-APP network (ex_network and vm_network).
>>>>> 
>>>>> If youcreate a new instance of the vAPP using the GUI you can change the
>>>>> network to DEV01-DMZ or DEV01-DB for example.
>>>>> 
>>>>> What I wanted to do was create an instance via lib cloud and change the
>>>>> network to DEV01-DMZ, if I don't mention the network it defaults to
>>>>> DEV01-APP (as defined in the template) and the instance is successfully
>>>>> created, however if I define ex_network and ex_vm_network I get the
>>> error:
>>>>> 
>>>>> The VCD entity network DEV01-APP does not exist.
>>>>> 
>>>>> I do not understand why it still trying to use DEV01-APP when I have
>>>>> defined DEV01-DMZ in the two variables.
>>>>> 
>>>>> This is where I am confused…
>>>>> 
>>>>> Kash.
>>>>> 
>>>>> On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> Those arguments to create_node indicate which one of the virtual
>>>>>> organisation networks (ex_network) to associate at runtime with which
>>> one
>>>>>> of the vApp template VM networks (ex_vm_network) before a running vApp
>>>>> can
>>>>>> be instantiated.
>>>>>> 
>>>>>> They will not change any of the networks currently defined within your
>>>>>> virtual organisation or within your current vApp template (image).
>>>>>> 
>>>>>> 
>>>>>> More info as to what you're trying to achieve would help.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>>>>> 
>>>>>>> Hi,
>>>>>>> 
>>>>>>> I was hoping someone could explain to me how I would go about changing
>>>>> my
>>>>>>> vAPP or VM network using lib cloud when talking to vCloud.
>>>>>>> 
>>>>>>> I tried setting the ex_network and the ex_vm_network however it seems
>>>>> that
>>>>>>> it doesn't change the VM network :(
>>>>>>> 
>>>>>>> Any advice would be appreciated.
>>>>>>> 
>>>>>>> Regards
>>>>>>> 
>>>>>>> Kash
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> sengork
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> --
>>>> sengork
>>> 
>>> 
>> 
>> 
>> -- 
>> sengork
> 


Re: Apache Libcloud Vcloud change network for VM

Posted by Kashif Ali <ka...@linuxcraft.co.uk>.
I just tested, and I confirm it worked :) thank you for clarifying.

 so just to finish off, if the default network is not defined,

Can I do:

ex_vm_network = None
ex_network = <NEW DESIRED NETWORK>

Kash



On 20 Apr 2013, at 11:54, Sengor <se...@gmail.com> wrote:

> Yes your understanding is correct and should work as expected.
> 
> 
> 
> 
> On 20 April 2013 20:52, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> 
>> Almost there, so when we are creating a vAPP - we can select the org
>> network:
>> 
>> DEV01-APP
>> DEV01-DMZ
>> DEV01-DB
>> 
>> So if I understand you correctly, because we have set the default network
>> in the template to DEV01-APP, I have to set
>> 
>> ex_vm_network=<DEFAULT in TEMPLATE>
>> ex_network=<NEW DESIRED NETWORK>
>> 
>> ill test it out now :)
>> 
>> Thanks
>> 
>> Kash
>> 
>> On 20 Apr 2013, at 11:48, Sengor <se...@gmail.com> wrote:
>> 
>>> Hi,
>>> 
>>> I know what you mean now, the GUI associates vApp template's VM network
>>> DEV01-APP to any organisational network you select from the list
>> (DEV01-DMZ
>>> or DEV01-DB). I can tell that the vApp template was created from an
>>> instantiated vApp originating on the DEV01-APP network.
>>> 
>>> If you go through the API this association does not happen automatically
>>> unless you set the following as part of create_node request:
>>> ex_vm_network="DEV01-APP"
>>> ex_network="DEV01-DMZ"
>>> 
>>> 
>>> This is exactly why those two variables exist in create_node. They will
>>> associate the VM network from vApp template (ex_vm_network="DEV01-APP")
>>> with the organisation network (ex_network="DEV01-DMZ") as part of the
>> vApp
>>> instantiation request.
>>> 
>>> For reference: http://libcloud.apache.org/docs/compute-examples.html
>>> 
>>> 
>>> Let us know how you go...
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On 20 April 2013 20:36, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>> 
>>>> Ok,
>>>> 
>>>> So we have a vAPP, which defines a virtual machine, and by default joins
>>>> it to the DEV01-APP network (ex_network and vm_network).
>>>> 
>>>> If youcreate a new instance of the vAPP using the GUI you can change the
>>>> network to DEV01-DMZ or DEV01-DB for example.
>>>> 
>>>> What I wanted to do was create an instance via lib cloud and change the
>>>> network to DEV01-DMZ, if I don't mention the network it defaults to
>>>> DEV01-APP (as defined in the template) and the instance is successfully
>>>> created, however if I define ex_network and ex_vm_network I get the
>> error:
>>>> 
>>>> The VCD entity network DEV01-APP does not exist.
>>>> 
>>>> I do not understand why it still trying to use DEV01-APP when I have
>>>> defined DEV01-DMZ in the two variables.
>>>> 
>>>> This is where I am confused…
>>>> 
>>>> Kash.
>>>> 
>>>> On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> Those arguments to create_node indicate which one of the virtual
>>>>> organisation networks (ex_network) to associate at runtime with which
>> one
>>>>> of the vApp template VM networks (ex_vm_network) before a running vApp
>>>> can
>>>>> be instantiated.
>>>>> 
>>>>> They will not change any of the networks currently defined within your
>>>>> virtual organisation or within your current vApp template (image).
>>>>> 
>>>>> 
>>>>> More info as to what you're trying to achieve would help.
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> I was hoping someone could explain to me how I would go about changing
>>>> my
>>>>>> vAPP or VM network using lib cloud when talking to vCloud.
>>>>>> 
>>>>>> I tried setting the ex_network and the ex_vm_network however it seems
>>>> that
>>>>>> it doesn't change the VM network :(
>>>>>> 
>>>>>> Any advice would be appreciated.
>>>>>> 
>>>>>> Regards
>>>>>> 
>>>>>> Kash
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> sengork
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> sengork
>> 
>> 
> 
> 
> -- 
> sengork


Re: Apache Libcloud Vcloud change network for VM

Posted by Sengor <se...@gmail.com>.
Yes your understanding is correct and should work as expected.




On 20 April 2013 20:52, Kashif Ali <ka...@linuxcraft.co.uk> wrote:

> Almost there, so when we are creating a vAPP - we can select the org
> network:
>
> DEV01-APP
> DEV01-DMZ
> DEV01-DB
>
> So if I understand you correctly, because we have set the default network
> in the template to DEV01-APP, I have to set
>
> ex_vm_network=<DEFAULT in TEMPLATE>
> ex_network=<NEW DESIRED NETWORK>
>
> ill test it out now :)
>
> Thanks
>
> Kash
>
> On 20 Apr 2013, at 11:48, Sengor <se...@gmail.com> wrote:
>
> > Hi,
> >
> > I know what you mean now, the GUI associates vApp template's VM network
> > DEV01-APP to any organisational network you select from the list
> (DEV01-DMZ
> > or DEV01-DB). I can tell that the vApp template was created from an
> > instantiated vApp originating on the DEV01-APP network.
> >
> > If you go through the API this association does not happen automatically
> > unless you set the following as part of create_node request:
> > ex_vm_network="DEV01-APP"
> > ex_network="DEV01-DMZ"
> >
> >
> > This is exactly why those two variables exist in create_node. They will
> > associate the VM network from vApp template (ex_vm_network="DEV01-APP")
> > with the organisation network (ex_network="DEV01-DMZ") as part of the
> vApp
> > instantiation request.
> >
> > For reference: http://libcloud.apache.org/docs/compute-examples.html
> >
> >
> > Let us know how you go...
> >
> >
> >
> >
> >
> > On 20 April 2013 20:36, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >
> >> Ok,
> >>
> >> So we have a vAPP, which defines a virtual machine, and by default joins
> >> it to the DEV01-APP network (ex_network and vm_network).
> >>
> >> If youcreate a new instance of the vAPP using the GUI you can change the
> >> network to DEV01-DMZ or DEV01-DB for example.
> >>
> >> What I wanted to do was create an instance via lib cloud and change the
> >> network to DEV01-DMZ, if I don't mention the network it defaults to
> >> DEV01-APP (as defined in the template) and the instance is successfully
> >> created, however if I define ex_network and ex_vm_network I get the
> error:
> >>
> >> The VCD entity network DEV01-APP does not exist.
> >>
> >> I do not understand why it still trying to use DEV01-APP when I have
> >> defined DEV01-DMZ in the two variables.
> >>
> >> This is where I am confused…
> >>
> >> Kash.
> >>
> >> On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:
> >>
> >>> Hi,
> >>>
> >>> Those arguments to create_node indicate which one of the virtual
> >>> organisation networks (ex_network) to associate at runtime with which
> one
> >>> of the vApp template VM networks (ex_vm_network) before a running vApp
> >> can
> >>> be instantiated.
> >>>
> >>> They will not change any of the networks currently defined within your
> >>> virtual organisation or within your current vApp template (image).
> >>>
> >>>
> >>> More info as to what you're trying to achieve would help.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I was hoping someone could explain to me how I would go about changing
> >> my
> >>>> vAPP or VM network using lib cloud when talking to vCloud.
> >>>>
> >>>> I tried setting the ex_network and the ex_vm_network however it seems
> >> that
> >>>> it doesn't change the VM network :(
> >>>>
> >>>> Any advice would be appreciated.
> >>>>
> >>>> Regards
> >>>>
> >>>> Kash
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> sengork
> >>
> >>
> >
> >
> > --
> > sengork
>
>


-- 
sengork

Re: Apache Libcloud Vcloud change network for VM

Posted by Kashif Ali <ka...@linuxcraft.co.uk>.
Almost there, so when we are creating a vAPP - we can select the org network:

DEV01-APP
DEV01-DMZ
DEV01-DB

So if I understand you correctly, because we have set the default network in the template to DEV01-APP, I have to set

ex_vm_network=<DEFAULT in TEMPLATE>
ex_network=<NEW DESIRED NETWORK>

ill test it out now :)

Thanks

Kash

On 20 Apr 2013, at 11:48, Sengor <se...@gmail.com> wrote:

> Hi,
> 
> I know what you mean now, the GUI associates vApp template's VM network
> DEV01-APP to any organisational network you select from the list (DEV01-DMZ
> or DEV01-DB). I can tell that the vApp template was created from an
> instantiated vApp originating on the DEV01-APP network.
> 
> If you go through the API this association does not happen automatically
> unless you set the following as part of create_node request:
> ex_vm_network="DEV01-APP"
> ex_network="DEV01-DMZ"
> 
> 
> This is exactly why those two variables exist in create_node. They will
> associate the VM network from vApp template (ex_vm_network="DEV01-APP")
> with the organisation network (ex_network="DEV01-DMZ") as part of the vApp
> instantiation request.
> 
> For reference: http://libcloud.apache.org/docs/compute-examples.html
> 
> 
> Let us know how you go...
> 
> 
> 
> 
> 
> On 20 April 2013 20:36, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> 
>> Ok,
>> 
>> So we have a vAPP, which defines a virtual machine, and by default joins
>> it to the DEV01-APP network (ex_network and vm_network).
>> 
>> If youcreate a new instance of the vAPP using the GUI you can change the
>> network to DEV01-DMZ or DEV01-DB for example.
>> 
>> What I wanted to do was create an instance via lib cloud and change the
>> network to DEV01-DMZ, if I don't mention the network it defaults to
>> DEV01-APP (as defined in the template) and the instance is successfully
>> created, however if I define ex_network and ex_vm_network I get the error:
>> 
>> The VCD entity network DEV01-APP does not exist.
>> 
>> I do not understand why it still trying to use DEV01-APP when I have
>> defined DEV01-DMZ in the two variables.
>> 
>> This is where I am confused…
>> 
>> Kash.
>> 
>> On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:
>> 
>>> Hi,
>>> 
>>> Those arguments to create_node indicate which one of the virtual
>>> organisation networks (ex_network) to associate at runtime with which one
>>> of the vApp template VM networks (ex_vm_network) before a running vApp
>> can
>>> be instantiated.
>>> 
>>> They will not change any of the networks currently defined within your
>>> virtual organisation or within your current vApp template (image).
>>> 
>>> 
>>> More info as to what you're trying to achieve would help.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I was hoping someone could explain to me how I would go about changing
>> my
>>>> vAPP or VM network using lib cloud when talking to vCloud.
>>>> 
>>>> I tried setting the ex_network and the ex_vm_network however it seems
>> that
>>>> it doesn't change the VM network :(
>>>> 
>>>> Any advice would be appreciated.
>>>> 
>>>> Regards
>>>> 
>>>> Kash
>>> 
>>> 
>>> 
>>> 
>>> --
>>> sengork
>> 
>> 
> 
> 
> -- 
> sengork


Re: Apache Libcloud Vcloud change network for VM

Posted by Sengor <se...@gmail.com>.
Hi,

I know what you mean now, the GUI associates vApp template's VM network
DEV01-APP to any organisational network you select from the list (DEV01-DMZ
or DEV01-DB). I can tell that the vApp template was created from an
instantiated vApp originating on the DEV01-APP network.

If you go through the API this association does not happen automatically
unless you set the following as part of create_node request:
ex_vm_network="DEV01-APP"
ex_network="DEV01-DMZ"


This is exactly why those two variables exist in create_node. They will
associate the VM network from vApp template (ex_vm_network="DEV01-APP")
with the organisation network (ex_network="DEV01-DMZ") as part of the vApp
instantiation request.

For reference: http://libcloud.apache.org/docs/compute-examples.html


Let us know how you go...





On 20 April 2013 20:36, Kashif Ali <ka...@linuxcraft.co.uk> wrote:

> Ok,
>
> So we have a vAPP, which defines a virtual machine, and by default joins
> it to the DEV01-APP network (ex_network and vm_network).
>
> If youcreate a new instance of the vAPP using the GUI you can change the
> network to DEV01-DMZ or DEV01-DB for example.
>
> What I wanted to do was create an instance via lib cloud and change the
> network to DEV01-DMZ, if I don't mention the network it defaults to
> DEV01-APP (as defined in the template) and the instance is successfully
> created, however if I define ex_network and ex_vm_network I get the error:
>
> The VCD entity network DEV01-APP does not exist.
>
> I do not understand why it still trying to use DEV01-APP when I have
> defined DEV01-DMZ in the two variables.
>
>  This is where I am confused…
>
> Kash.
>
> On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:
>
> > Hi,
> >
> > Those arguments to create_node indicate which one of the virtual
> > organisation networks (ex_network) to associate at runtime with which one
> > of the vApp template VM networks (ex_vm_network) before a running vApp
> can
> > be instantiated.
> >
> > They will not change any of the networks currently defined within your
> > virtual organisation or within your current vApp template (image).
> >
> >
> > More info as to what you're trying to achieve would help.
> >
> >
> >
> >
> >
> > On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> >
> >> Hi,
> >>
> >> I was hoping someone could explain to me how I would go about changing
> my
> >> vAPP or VM network using lib cloud when talking to vCloud.
> >>
> >> I tried setting the ex_network and the ex_vm_network however it seems
> that
> >> it doesn't change the VM network :(
> >>
> >> Any advice would be appreciated.
> >>
> >> Regards
> >>
> >> Kash
> >
> >
> >
> >
> > --
> > sengork
>
>


-- 
sengork

Re: Apache Libcloud Vcloud change network for VM

Posted by Kashif Ali <ka...@linuxcraft.co.uk>.
Ok,

So we have a vAPP, which defines a virtual machine, and by default joins it to the DEV01-APP network (ex_network and vm_network).

If youcreate a new instance of the vAPP using the GUI you can change the network to DEV01-DMZ or DEV01-DB for example.

What I wanted to do was create an instance via lib cloud and change the network to DEV01-DMZ, if I don't mention the network it defaults to DEV01-APP (as defined in the template) and the instance is successfully created, however if I define ex_network and ex_vm_network I get the error:

The VCD entity network DEV01-APP does not exist.

I do not understand why it still trying to use DEV01-APP when I have defined DEV01-DMZ in the two variables.

This is where I am confused…

Kash.

On 20 Apr 2013, at 11:30, Sengor <se...@gmail.com> wrote:

> Hi,
> 
> Those arguments to create_node indicate which one of the virtual
> organisation networks (ex_network) to associate at runtime with which one
> of the vApp template VM networks (ex_vm_network) before a running vApp can
> be instantiated.
> 
> They will not change any of the networks currently defined within your
> virtual organisation or within your current vApp template (image).
> 
> 
> More info as to what you're trying to achieve would help.
> 
> 
> 
> 
> 
> On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk> wrote:
> 
>> Hi,
>> 
>> I was hoping someone could explain to me how I would go about changing my
>> vAPP or VM network using lib cloud when talking to vCloud.
>> 
>> I tried setting the ex_network and the ex_vm_network however it seems that
>> it doesn't change the VM network :(
>> 
>> Any advice would be appreciated.
>> 
>> Regards
>> 
>> Kash
> 
> 
> 
> 
> -- 
> sengork


Re: Apache Libcloud Vcloud change network for VM

Posted by Sengor <se...@gmail.com>.
Hi,

Those arguments to create_node indicate which one of the virtual
organisation networks (ex_network) to associate at runtime with which one
of the vApp template VM networks (ex_vm_network) before a running vApp can
be instantiated.

They will not change any of the networks currently defined within your
virtual organisation or within your current vApp template (image).


More info as to what you're trying to achieve would help.





On 20 April 2013 19:57, Kashif Ali <ka...@linuxcraft.co.uk> wrote:

> Hi,
>
> I was hoping someone could explain to me how I would go about changing my
> vAPP or VM network using lib cloud when talking to vCloud.
>
> I tried setting the ex_network and the ex_vm_network however it seems that
> it doesn't change the VM network :(
>
> Any advice would be appreciated.
>
> Regards
>
> Kash




-- 
sengork

Apache Libcloud Vcloud change network for VM

Posted by Kashif Ali <ka...@linuxcraft.co.uk>.
Hi,

I was hoping someone could explain to me how I would go about changing my vAPP or VM network using lib cloud when talking to vCloud.

I tried setting the ex_network and the ex_vm_network however it seems that it doesn't change the VM network :(

Any advice would be appreciated.

Regards

Kash

Re: String format for Windows provisioning on IBM SCE

Posted by Sengor <se...@gmail.com>.
Greetings,


There is a way to instantiate Windows based instances on IBM SCE. The trick
is to use ex_configurationData argument. You can bypass NodeAuthSSHKey
completely. I've tried it just now and it works. Tomaz I'm happy for this
to be included in the official libcloud docs. If Jira is needed let me
know...


Example:
~~~~~~~~~~~~~~~~~~~~~~~~~

from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver

Driver = get_driver(Provider.IBM)
conn = Driver("username", "password")

images = conn.list_images()
for i in images:
   if i.id == '20014110':
     win=i

locations=conn.list_locations()
for i in locations:
  if i.id == '82':
    location=i

size=conn.list_sizes()[2]
node = conn.create_node(name="windows box", image=win, size=size,
ex_configurationData={'UserName':'someone', 'Password':'My0wnPass'},
location=location)
conn.list_nodes()

~~~~~~~~~~~~~~~~~~~~~~~~~




On 16 April 2013 06:11, Tomaz Muraus <to...@apache.org> wrote:

> I just quickly glanced over the code (
>
> https://github.com/apache/libcloud/blob/trunk/libcloud/compute/drivers/ibm_sce.py#L208
> )
> and it looks like that the driver currently only supports public key
> authentication.
>
> I'm not too familiar with the IBM SCE API myself, but if the API support
> this functionality, it should probably be relatively easy to add it and
> external contributions are always more than welcome.
>
> P.S. Please also CC mailing list (users@libcloud.apache.org) on the future
> emails.
>
> On Mon, Apr 15, 2013 at 1:05 PM, Mihai Garbia <mihai.garbia@yahoo.com
> >wrote:
>
> > Can you give me an example of how it would look like for Windows. I
> > already know how to do it to provision Linux (it is a string name
> > representing a SSH key stored in SCE), but for windows only user and
> > password is required.
> >
> > Thanks.
> >
> > Mihai
> >
> > ------------------------------
> > Blog: experimentenaturiste.blogspot.ro
> >
> >
> > --- On *Mon, 15/4/13, Tomaz Muraus <to...@apache.org>* wrote:
> >
> >
> > From: Tomaz Muraus <to...@apache.org>
> > Subject: Re: String format for Windows provisioning on IBM SCE
> > To: users@libcloud.apache.org
> > Cc: mihai.garbia@yahoo.com
> > Date: Monday, 15 April, 2013, 22:56
> >
> >
> > I'm not totally sure about the IBM SCE driver and Windows instances, but
> > usually you pass an instance of NodeAuthSSHKey or NodeAuthPassword class
> to
> > the create_node method as an "auth" argument.
> >
> > On Mon, Apr 15, 2013 at 4:59 AM, Mihai Garbia <mihai.garbia@yahoo.com<
> http://mc/compose?to=mihai.garbia@yahoo.com>
> > > wrote:
> >
> >
> > Hello,
> >
> > Can you tell me what is the string format for user and password on
> > provisioning a Windows instance in IBM SCE using libcloud?
> >
> > I'm using NodeDriver(BaseDriver) : -> create_node to create a Windows
> > instance in IBM SCE.
> >
> > I cant find in the documentation what is the string format for the
> > username and password. This is what the docs for create_node say:
> > auth:   L{NodeAuthSSHKey} or L{NodeAuthPassword}
> >
> > I tried with "user:pass" as in the official SCE API, but it does not work
> > in libcloud.
> >
> > The error I'm getting is:
> > "Exception: Error 412: The parameter (UserName) is required while
> creating
> > Windows instance."
> >
> >
> > Thanks.
> >
> >
> > Mihai
> >
> >
> >
> >
>



-- 
sengork

Re: String format for Windows provisioning on IBM SCE

Posted by Tomaz Muraus <to...@apache.org>.
I just quickly glanced over the code (
https://github.com/apache/libcloud/blob/trunk/libcloud/compute/drivers/ibm_sce.py#L208)
and it looks like that the driver currently only supports public key
authentication.

I'm not too familiar with the IBM SCE API myself, but if the API support
this functionality, it should probably be relatively easy to add it and
external contributions are always more than welcome.

P.S. Please also CC mailing list (users@libcloud.apache.org) on the future
emails.

On Mon, Apr 15, 2013 at 1:05 PM, Mihai Garbia <mi...@yahoo.com>wrote:

> Can you give me an example of how it would look like for Windows. I
> already know how to do it to provision Linux (it is a string name
> representing a SSH key stored in SCE), but for windows only user and
> password is required.
>
> Thanks.
>
> Mihai
>
> ------------------------------
> Blog: experimentenaturiste.blogspot.ro
>
>
> --- On *Mon, 15/4/13, Tomaz Muraus <to...@apache.org>* wrote:
>
>
> From: Tomaz Muraus <to...@apache.org>
> Subject: Re: String format for Windows provisioning on IBM SCE
> To: users@libcloud.apache.org
> Cc: mihai.garbia@yahoo.com
> Date: Monday, 15 April, 2013, 22:56
>
>
> I'm not totally sure about the IBM SCE driver and Windows instances, but
> usually you pass an instance of NodeAuthSSHKey or NodeAuthPassword class to
> the create_node method as an "auth" argument.
>
> On Mon, Apr 15, 2013 at 4:59 AM, Mihai Garbia <mi...@yahoo.com>
> > wrote:
>
>
> Hello,
>
> Can you tell me what is the string format for user and password on
> provisioning a Windows instance in IBM SCE using libcloud?
>
> I'm using NodeDriver(BaseDriver) : -> create_node to create a Windows
> instance in IBM SCE.
>
> I cant find in the documentation what is the string format for the
> username and password. This is what the docs for create_node say:
> auth:   L{NodeAuthSSHKey} or L{NodeAuthPassword}
>
> I tried with "user:pass" as in the official SCE API, but it does not work
> in libcloud.
>
> The error I'm getting is:
> "Exception: Error 412: The parameter (UserName) is required while creating
> Windows instance."
>
>
> Thanks.
>
>
> Mihai
>
>
>
>

Re: String format for Windows provisioning on IBM SCE

Posted by Tomaz Muraus <to...@apache.org>.
I'm not totally sure about the IBM SCE driver and Windows instances, but
usually you pass an instance of NodeAuthSSHKey or NodeAuthPassword class to
the create_node method as an "auth" argument.

On Mon, Apr 15, 2013 at 4:59 AM, Mihai Garbia <mi...@yahoo.com>wrote:

>
> Hello,
>
> Can you tell me what is the string format for user and password on
> provisioning a Windows instance in IBM SCE using libcloud?
>
> I'm using NodeDriver(BaseDriver) : -> create_node to create a Windows
> instance in IBM SCE.
>
> I cant find in the documentation what is the string format for the
> username and password. This is what the docs for create_node say:
> auth:   L{NodeAuthSSHKey} or L{NodeAuthPassword}
>
> I tried with "user:pass" as in the official SCE API, but it does not work
> in libcloud.
>
> The error I'm getting is:
> "Exception: Error 412: The parameter (UserName) is required while creating
> Windows instance."
>
>
> Thanks.
>
>
> Mihai
>
>
>