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 <[email protected]> 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 <[email protected]> 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 <[email protected]> wrote: >> >>> Yes your understanding is correct and should work as expected. >>> >>> >>> >>> >>> On 20 April 2013 20:52, Kashif Ali <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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
