Good news, to finish this thread off.

Bascially when you create a template, the default template you assign is always there, so its just a simple matter of making sure you know what this is for each template, then you can move it around in your org's and you can just rename/change as required.

So in my case, the templates we created in DEV01 can be used in DEV02, DEV03, QA01, QA02.. and all I do is look for the default network of the template (which is always DEV01-APP) and replace with the network for the org etc..


Thanks

Kash

------ Original Message ------
From: "Kashif Ali" <kas...@linuxcraft.co.uk>
To: "Kashif Ali" <kas...@linuxcraft.co.uk>; users@libcloud.apache.org
Sent: 28/04/2013 18:23:18
Subject: Re[2]: Apache Libcloud Vcloud change network for VM
Good news, to finish this thread off.

Bascially when you create a template, the default template you assign is always there, so its just a simple matter of making sure you know what this is for each template, then you can move it around in your org's and you can just rename/change as required.

So in my case, the templates we created in DEV01 can be used in DEV02, DEV03, QA01, QA02.. and all I do is look for the default network of the template (which is always DEV01-APP) and replace with the network for the org etc..


Thanks

Kash

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

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 <kas...@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 <seng...@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 <kas...@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 <seng...@gmail.com> wrote:

 Yes your understanding is correct and should work as expected.




On 20 April 2013 20:52, Kashif Ali <kas...@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 <seng...@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 <kas...@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 <seng...@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 <kas...@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



Reply via email to