I am not taking the IPs from this API because if you have more than one IP this 
API is not good enough.
I am looping on the NICs and take it from there.
So I will need to check if it possible with open-vm-tools

From: lcheng61 [mailto:[email protected]]
Sent: Thursday, August 07, 2014 7:49 AM
To: jclouds/jclouds
Cc: Izek Greenfield (igreenfi)
Subject: Re: [jclouds] Add vSphere support (#364)

Hi,

I was able to use vijava API to access the IP address.

ipAddress = VirtualMachine.getSummary().getGuest().getIpAddress();
guestState =VirtualMachine.getGuest().guestState;

It would be nice to cover open vm tools, since its license is more liberal
than vmtools for commercial use.

How do you think about it ?

Thanks,
-Liang



On Wed, Aug 6, 2014 at 9:24 PM, igreenfield 
<[email protected]<mailto:[email protected]>>
wrote:

> I didn't test with open-vm-tools. So I don't know but from the error you
> get I think you need to replace it with vmware vmtools
>
>
>
> -------- Original message --------
> From: lcheng61 <[email protected]<mailto:[email protected]>>
> Date:
> To: jclouds/jclouds 
> <[email protected]<mailto:[email protected]>>
> Cc: "Izek Greenfield (igreenfi)" 
> <[email protected]<mailto:[email protected]>>
> Subject: Re: [jclouds] Add vSphere support (#364)
>
>
> Hi,
>
> I have open-vm-tools installed. Is it OK or I have to install vmtools ?
>
> Thanks,
> -Liang
>
>
> On Wed, Aug 6, 2014 at 8:05 PM, igreenfield 
> <[email protected]<mailto:[email protected]>>
> wrote:
>
> > Does the template has vmtools installed on it?
> >
> >
> >
> > -------- Original message --------
> > From: lcheng61 <[email protected]<mailto:[email protected]>>
> > Date:
> > To: jclouds/jclouds 
> > <[email protected]<mailto:[email protected]>>
> > Cc: "Izek Greenfield (igreenfi)" 
> > <[email protected]<mailto:[email protected]>>
> > Subject: Re: [jclouds] Add vSphere support (#364)
> >
> >
> > Hi Izek,
> >
> > Thanks for your help in the past. Now I have a question. I was trying to
> > run some script after the instance is boot up. I used the code as below,
> > as
> > you suggested before. However, I got the error that no IP address is
> > obtained. I checked the instance there's IP assigned. I wonder if the
> > vsphere plugin wait until the IP address is available and is able to get
> > it
> > from the instance ? Do you set the timeout for the waiting ? Which part
> of
> > code should I take a look ?
> >
> > TemplateOptions o = context.getComputeService().templateOptions();
> > o.tags(ImmutableSet.of("from UnitTest"))
> > .nodeNames(ImmutableSet.of("first-vm12"))
> > .runScript("cd /tmp; touch test.txt")
> > .networks("VLAN537", "VLAN537")
> >
> > ==
> > ava.lang.IllegalStateException: *node does not have IP addresses
> > configured*:
> > {id=first-vm12-from-template, providerId=first-vm12-from-template, uri=
> >
> >
> https://xxx.xxx.xxx.xxx:9443/vsphere-client/vmrc/vmrc.jsp?vm=urn:vmomi:VirtualMachine:vm-xx-xx-xxxxx,
>
> >
> > name=first-vm12-from-template, uri=
> >
> >
> https://xxx.xxx.xxx.xxx:9443/vsphere-client/vmrc/vmrc.jsp?vm=urn:vmomi:VirtualMachine:vm-xxx-xxx-xxx-xxx-xxx,
>
> >
> > location={scope=HOST, id=, description=}, group=junit-test,
> > status=RUNNING,
> > loginPort=22, hostname=first-vm12-from-template, loginUser=root,
> > tags=[from
> > UnitTest]}
> > ==
> >
> > Thanks a lot !
> > -Liang
> >
> >
> > On Sat, Jun 14, 2014 at 10:16 PM, igreenfield 
> > <[email protected]<mailto:[email protected]>>
>
> > wrote:
> >
> > > I didn’t test it with OVF. I only used templates.
> > > TemplateBuilder b = context.getComputeService().templateBuilder();
> > > TemplateOptions o = context.getComputeService().templateOptions();
> > > o.tags(ImmutableSet.of("from UnitTest")) // you don’t need this if you
> > > don’t want tags.
> > > .nodeNames(ImmutableSet.of("first-vm12")) // the new VM name
> > > .runScript("cd /tmp; touch test.txt") // Just for test that the run
> > script
> > > is working.
> > > .networks("VLAN537", "VLAN537") // Ids of the network you want to add
> to
> > > the new VM.
> > > ;
> > > // b.imageId("Cisco Centos 6.5").smallest();
> > > // b.imageId("Cisco Centos 6.5.0").smallest().options(o);
> > > b.imageId("Cisco Centos 6.5") // Template name case-sensitive
> > > .locationId("default") // if you have only one DC you should use
> > “default”
> > > if you have more than one enter here the name of the DC you want to
> use.
> > > .smallest().options(o);
> > >
> > >
> > > From: lcheng61 [mailto:[email protected]]
> > > Sent: Saturday, June 14, 2014 2:29 AM
> > > To: jclouds/jclouds
> > > Cc: Izek Greenfield (igreenfi)
> > > Subject: Re: [jclouds] Add vSphere support (#364)
> > >
> > >
> > > @igreenfield<https://github.com/igreenfield>, I would like to enable
> > the
> > > unit test at my private environment. I uncommented line 42 and
> > reconfigured
> > > line 49-50 at
> > >
> > >
> >
> https://github.com/igreenfield/jclouds-labs/blob/master/vsphere/src/test/java/org/jclouds/vsphere/ContextBuilderTest.java
> > > ?
> > >
> > > But I'm not sure how to configure line 56-63.
> > >
> > > On the other hand, how can I load an local ovf file to vsphere server
> > and
> > > power it on ?
> > >
> > > Thanks,
> > >
> > > —
> > > Reply to this email directly or view it on GitHub<
> > > https://github.com/jclouds/jclouds/pull/364#issuecomment-46070591>.
> > >
> > > —
> > > Reply to this email directly or view it on GitHub
> > > <https://github.com/jclouds/jclouds/pull/364#issuecomment-46107248>.
> > >
> >
> > —
> > Reply to this email directly or view it on GitHub<
> > https://github.com/jclouds/jclouds/pull/364#issuecomment-51415586>.
> >
> > —
> > Reply to this email directly or view it on GitHub
> > <https://github.com/jclouds/jclouds/pull/364#issuecomment-51425643>.
> >
>
> —
> Reply to this email directly or view it on GitHub<
> https://github.com/jclouds/jclouds/pull/364#issuecomment-51426732>.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jclouds/jclouds/pull/364#issuecomment-51429777>.
>

—
Reply to this email directly or view it on 
GitHub<https://github.com/jclouds/jclouds/pull/364#issuecomment-51430866>.


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/364#issuecomment-51432946

Reply via email to