[ovirt-users] Get CPU and Memory Usage for VM and Host using ovirt java sdk

2015-06-05 Thread Kumar R, Prashanth (Prashanth)
Hi All,

1)I would like to know if there is a way to fetch the CPU and Memory Usage for 
VM   and CPU and Memory Usage for a Host in the RHEVM environment using ovirt 
sdk in java.
I am using ovirt-engine-sdk-java-3.5.0.5.jar.
Can you please provide me with the java example if possible.
The cpu and memory usage of the VM in the rhevm is as highlighted in the 
picture below.

[cid:image001.jpg@01D09F8D.32124E50]

2) Autostart attribute for a VM  in RHEVM.
Earlier when I was using libvirt 0.5.1 jar  in a kvm system,I found that 
autostart attribute [vm.getAutostart] is provided in the libvirt java sdk.
Autostart is a Boolean value which indicates whether the network is configured 
to
be automatically started when the host machine boots

Is there any such attribute for a VM in RHEVM,if yes is there a way to fetch 
the auto start value using ovirt java sdk.

Thanks,
Prashanth R


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Unable to Delete a VM snapshot . (Juan Hern?ndez)

2015-05-18 Thread Kumar R, Prashanth (Prashanth)
=qy3j1dASDjNv3QfyFirDEiNgyTqTDHR6lsngzMWtBUQe=




--

Message: 5
Date: Wed, 13 May 2015 04:28:43 -0400 (EDT)
From: Francesco Romani from...@redhat.com
To: Nicolas Ecarnot nico...@ecarnot.net
Cc: users@ovirt.org
Subject: Re: [ovirt-users] messages from journal in centos7 hosts
Message-ID:
1093184056.13639577.1431505723776.javamail.zim...@redhat.com
Content-Type: text/plain; charset=utf-8

Hi,

- Original Message -
 From: Nicolas Ecarnot nico...@ecarnot.net
 To: users@ovirt.org
 Sent: Wednesday, May 13, 2015 9:30:22 AM
 Subject: Re: [ovirt-users] messages from journal in centos7 hosts
 
 Hello list,
 
 Coming from : 
 https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mail-2Darchiv
 e.com_users-40ovirt.org_msg24878.htmld=AwICAgc=BFpWQw8bsuKpl1SgiZH64
 Qr=3rKe7gJAcRh5l-S9dbWM0T_MbQbahl-YIetIBtIOxuom=vJx9-3POXYltD2YEW2fW
 50XHKsdm3Gvkd_piyvR7ubUs=a7IlicoZ34v0o7DjQW14hlZ8Ku1U715kL9B_KxyfIFs
 e=
 
 I'm also being disturb by this ennoyance.
 Is there a workaround?
 
 (oVirt 3.5.1, CentOS 7 hosts, iSCSI storage)

This message should have been removed in recent VDSM versions.
Which version of VDSM and libvirt are you running?

Bests,

--
Francesco Romani
RedHat Engineering Virtualization R  D
Phone: 8261328
IRC: fromani


--

Message: 6
Date: Wed, 13 May 2015 10:35:56 +0200
From: Juan Hern?ndez jhern...@redhat.com
To: Kumar R, Prashanth (Prashanth) pkum...@avaya.com,
users@ovirt.org users@ovirt.org
Subject: Re: [ovirt-users] Unable to Delete a VM snapshot .
Message-ID: 55530cec.8080...@redhat.com
Content-Type: text/plain; charset=windows-1252

On 05/11/2015 02:12 PM, Kumar R, Prashanth (Prashanth) wrote:
 Hi All,
 
  
 
 I am facing issue in deleting a VM snapshot.
 
 I am using ovirt-engine-sdk-java-3.5.0.5.jar
 
  
 
  
 
 According to the SDK API,I can delete a VM using :
 
 api.getVMs().get(vmName).getSnapshots().getById(snapshotId).delete();
 
  
 
 But there is no way to fetch the snapshot ID of a particular snapshot.
 

Why not?

  ListVMSnapshot snapshots = vm.getSnapshots().list();
  for (VMSnapshot snapshot : snapshots) {
System.out.println(snapshot.getId());
  }

  
 
 Or
 
  
 
 ListVMSnapshot vmSnapshots =
 api.getVMs().get(vmName).getSnapshots().list();
 
  *for*(VMSnapshot vmSnapshot : vmSnapshots) {
 
   *if*(vmSnapshot.getDescription() == _snapshotdescription_){
 
  vmSnapshot.delete();
 
   }
 
  
 
 I cannot use the above snippet of code to delete a snapshot,but the
 multiple snapshots for a vm can be created with the same description.
 
  
 
  
 
 So is there a way to create a snapshot with a snapshot name assigned to it.
 
 SO that delete,restore opeartions can be performed based on the snapshot
 name .
 
  
 
 Thanks,
 
 Prashanth R
 

What you can't do, if understand correctly, is assign your own unique
symbolic name to a snapshot, like you do with the VM name attribute,
for example. That is a limitation of the engine, snapshots don't have a
name attribute.

Currently your only chance is to use the description attribute, but as
you said there is no guarantee that it will be unique.

Note that this happens with the Java SDK, with the Python SDK or with
any other client.

-- 
Direcci?n Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3?D, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid ? C.I.F. B82657941 - Red Hat S.L.


--

___
Users mailing list
Users@ovirt.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ovirt.org_mailman_listinfo_usersd=AwICAgc=BFpWQw8bsuKpl1SgiZH64Qr=3rKe7gJAcRh5l-S9dbWM0T_MbQbahl-YIetIBtIOxuom=vJx9-3POXYltD2YEW2fW50XHKsdm3Gvkd_piyvR7ubUs=qy3j1dASDjNv3QfyFirDEiNgyTqTDHR6lsngzMWtBUQe=
 


End of Users Digest, Vol 44, Issue 61
*
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Unable to Delete a VM snapshot .

2015-05-11 Thread Kumar R, Prashanth (Prashanth)
Hi All,

I am facing issue in deleting a VM snapshot.
I am using ovirt-engine-sdk-java-3.5.0.5.jar


According to the SDK API,I can delete a VM using :
api.getVMs().get(vmName).getSnapshots().getById(snapshotId).delete();

But there is no way to fetch the snapshot ID of a particular snapshot.

Or

ListVMSnapshot vmSnapshots = api.getVMs().get(vmName).getSnapshots().list();
 for (VMSnapshot vmSnapshot : vmSnapshots) {
  if(vmSnapshot.getDescription() == snapshotdescription){
 vmSnapshot.delete();
  }

I cannot use the above snippet of code to delete a snapshot,but the multiple 
snapshots for a vm can be created with the same description.


So is there a way to create a snapshot with a snapshot name assigned to it.
SO that delete,restore opeartions can be performed based on the snapshot name .

Thanks,
Prashanth R

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users