Re: [Users] Openstack Quantum , Cinder and Glance integration with oVirt.

2013-05-20 Thread Romil Gupta
Hi ,

Thanks for the help, I am able to load the ovirt-cinder driver. But , got
stuck in creating the volumes.

cinder/volume.log:

2013-05-20 14:36:48.161 6699 INFO cinder.service [-] Caught SIGTERM,
stopping children
2013-05-20 14:36:48.162 6699 INFO cinder.service [-] Waiting on 1 children
to exit
2013-05-20 14:36:48.162 6720 INFO cinder.service [-] Caught SIGTERM, exiting
2013-05-20 14:36:48.175 6699 INFO cinder.service [-] Child 6720 exited with
status 1
2013-05-20 14:36:50.572 7116 INFO cinder.volume.manager [-] volume_driver
== cinder.volume.drivers.ovirt.OVirtDriver
2013-05-20 14:36:50.573 7116 INFO cinder.service [-] Starting 1 workers
2013-05-20 14:36:50.576 7116 INFO cinder.service [-] Started child 7151
2013-05-20 14:36:50.585 7151 AUDIT cinder.service [-] Starting
cinder-volume node (version 2013.1)
2013-05-20 14:36:51.679 INFO cinder.volume.drivers.rhevm
[req-0dc7b534-0a06-4073-8769-651549730b65 None None] Connected to oVirt
Successful
2013-05-20 14:36:52.178 INFO cinder.volume.manager
[req-0dc7b534-0a06-4073-8769-651549730b65 None None] Updating volume status
2013-05-20 14:36:52.331 7151 INFO cinder.openstack.common.rpc.common [-]
Connected to AMQP server on localhost:5672
2013-05-20 14:37:37.351 INFO cinder.volume.manager
[req-3f3f037e-71aa-4bfa-b40f-1245aa52811d None None] Updating volume status


After , I tried * cinder create --display-name disk1 5 *

and got the following in scheduler log :

2013-05-20 14:56:49.499 7094 AUDIT cinder.service [-] SIGTERM received
2013-05-20 14:56:51.485 7460 AUDIT cinder.service [-] Starting
cinder-scheduler node (version 2013.1)
2013-05-20 14:56:51.548 7460 INFO cinder.openstack.common.rpc.common [-]
Connected to AMQP server on localhost:5672
2013-05-20 14:56:51.860 7460 INFO cinder.openstack.common.rpc.common [-]
Connected to AMQP server on localhost:5672
2013-05-20 14:58:11.888 WARNING cinder.scheduler.host_manager
[req-644215b3-7e4d-4761-a533-b76db6cfbcaf 724c0c1ff7774234a01d87968a7eb4bc
768105b3d64748ca8776bf8f13e8f3c9] service is down or disabled.
2013-05-20 14:58:11.890 WARNING cinder.scheduler.filters.capacity_filter
[req-644215b3-7e4d-4761-a533-b76db6cfbcaf 724c0c1ff7774234a01d87968a7eb4bc
768105b3d64748ca8776bf8f13e8f3c9] Free capacity not set;volume node info
collection broken.
2013-05-20 14:58:11.891 WARNING cinder.scheduler.manager
[req-644215b3-7e4d-4761-a533-b76db6cfbcaf 724c0c1ff7774234a01d87968a7eb4bc
768105b3d64748ca8776bf8f13e8f3c9] Failed to schedule_create_volume: No
valid host was found.

1. Do we need to implement more methods in OVirtDriver for cinder?
2. Why the request is not going to 'create_volume' method in
cinder.volume.ovirt.OVirtDriver
?

It would be great if you answer the above questions.

Thanks,
Romil


On Sun, May 19, 2013 at 10:44 AM, Oved Ourfalli ov...@redhat.com wrote:

 Hi Romil.

 Sorry for the late response.
 In order to use the cinder driver you need to set the following
 configuration items in /etc/cinder/cinder.conf

 volume_driver=cinder.volume.ovirt.OVirtDriver
 ovirt_engine_url=http://10.35.1.202:8080/api;
 ovirt_engine_username=user@domain
 ovirt_engine_password=password
 ovirt_engine_storagedomain=nfs-data1

 What did you fail on? Can you attach the cinder log for us to see?

 Also cc-ing Federico, who worked with me on the driver.

 Thank you,
 Oved



 - Original Message -
  From: Romil Gupta romilgupt...@gmail.com
  To: Oved Ourfalli ov...@redhat.com
  Cc: users users@ovirt.org
  Sent: Wednesday, May 15, 2013 5:41:42 PM
  Subject: Re: [Users] Openstack Quantum ,  Cinder and Glance
 integration with oVirt.
 
  Hi Oved ,
 
  I have gone through the code , it would be great if you let me know what
 are
  the flags we need to set in the cinder.conf to load the oVirt-cinder
 driver.
 
  Is this the correct flag volume_driver=cinder.volume.drivers.ovirt.
  OVirtDriver ?
 
  If yes , still I am not able to load it. I have also change the following
  flags based on my setup:
 
  volume_opts = [
  cfg . StrOpt ( 'ovirt_engine_url' ,
  default = ' http://localhost:8700/api ' ,
  help = '' ),
  cfg . StrOpt ( 'ovirt_engine_username' ,
  default = 'admin@internal' ,
  help = '' ),
  cfg . StrOpt ( 'ovirt_engine_password' ,
  default = 'letmein!' ,
  help = '' ),
  cfg . StrOpt ( 'ovirt_engine_storagedomain' ,
  default = 'OpenStackDomain' ,
  help = '' ),
  cfg . StrOpt ( 'ovirt_engine_sparse' ,
  default = True ,
  help = '' ),
 
  Help me out regarding the same.
 
 
 
 
  On Thu, May 9, 2013 at 7:23 PM, Romil Gupta  romilgupt...@gmail.com 
 wrote:
 
 
 
  Thanks for sharing the code and yes I had missed the mail from you
 earlier.
  I am just going through the code and would let you know if I need some
 help
  from you.
 
 
 
 
  On Thu, May 9, 2013 at 7:19 PM, Oved Ourfalli  ov...@redhat.com 
 wrote:
 
 
 
 
 
  - Original Message -
   From: Romil Gupta  romilgupt...@gmail.com 
   To: Oved Ourfalli  ov...@redhat.com 
   Cc: users  users@ovirt.org 
   Sent: Thursday, May 9, 2013 4

Re: [Users] Openstack Quantum , Cinder and Glance integration with oVirt.

2013-05-20 Thread Romil Gupta
Thanks Oved,

I am using the grizzly-3 code, and I will implement the remaining methods.


On Mon, May 20, 2013 at 3:50 PM, Oved Ourfalli ov...@redhat.com wrote:



 - Original Message -
  From: Romil Gupta romilgupt...@gmail.com
  To: Oved Ourfalli ov...@redhat.com
  Cc: users users@ovirt.org
  Sent: Monday, May 20, 2013 1:15:04 PM
  Subject: Re: [Users] Openstack Quantum ,  Cinder and Glance
 integration with oVirt.
 
  Hi ,
 
  Thanks for the help, I am able to load the ovirt-cinder driver. But , got
  stuck in creating the volumes.
 
  cinder/volume.log:
 
  2013-05-20 14:36:48.161 6699 INFO cinder.service [-] Caught SIGTERM,
 stopping
  children
  2013-05-20 14:36:48.162 6699 INFO cinder.service [-] Waiting on 1
 children to
  exit
  2013-05-20 14:36:48.162 6720 INFO cinder.service [-] Caught SIGTERM,
 exiting
  2013-05-20 14:36:48.175 6699 INFO cinder.service [-] Child 6720 exited
 with
  status 1
  2013-05-20 14:36:50.572 7116 INFO cinder.volume.manager [-] volume_driver
  == cinder.volume.drivers.ovirt.OVirtDriver
  2013-05-20 14:36:50.573 7116 INFO cinder.service [-] Starting 1 workers
  2013-05-20 14:36:50.576 7116 INFO cinder.service [-] Started child 7151
  2013-05-20 14:36:50.585 7151 AUDIT cinder.service [-] Starting
 cinder-volume
  node (version 2013.1)
  2013-05-20 14:36:51.679 INFO cinder.volume.drivers.rhevm
  [req-0dc7b534-0a06-4073-8769-651549730b65 None None] Connected to
 oVirt
  Successful
  2013-05-20 14:36:52.178 INFO cinder.volume.manager
  [req-0dc7b534-0a06-4073-8769-651549730b65 None None] Updating volume
 status
  2013-05-20 14:36:52.331 7151 INFO cinder.openstack.common.rpc.common [-]
  Connected to AMQP server on localhost:5672
  2013-05-20 14:37:37.351 INFO cinder.volume.manager
  [req-3f3f037e-71aa-4bfa-b40f-1245aa52811d None None] Updating volume
 status
 
 
  After , I tried  cinder create --display-name disk1 5 
 
  and got the following in scheduler log :
 
  2013-05-20 14:56:49.499 7094 AUDIT cinder.service [-] SIGTERM received
  2013-05-20 14:56:51.485 7460 AUDIT cinder.service [-] Starting
  cinder-scheduler node (version 2013.1)
  2013-05-20 14:56:51.548 7460 INFO cinder.openstack.common.rpc.common [-]
  Connected to AMQP server on localhost:5672
  2013-05-20 14:56:51.860 7460 INFO cinder.openstack.common.rpc.common [-]
  Connected to AMQP server on localhost:5672
  2013-05-20 14:58:11.888 WARNING cinder.scheduler.host_manager
  [req-644215b3-7e4d-4761-a533-b76db6cfbcaf
 724c0c1ff7774234a01d87968a7eb4bc
  768105b3d64748ca8776bf8f13e8f3c9] service is down or disabled.
  2013-05-20 14:58:11.890 WARNING cinder.scheduler.filters.capacity_filter
  [req-644215b3-7e4d-4761-a533-b76db6cfbcaf
 724c0c1ff7774234a01d87968a7eb4bc
  768105b3d64748ca8776bf8f13e8f3c9] Free capacity not set;volume node info
  collection broken.
  2013-05-20 14:58:11.891 WARNING cinder.scheduler.manager
  [req-644215b3-7e4d-4761-a533-b76db6cfbcaf
 724c0c1ff7774234a01d87968a7eb4bc
  768105b3d64748ca8776bf8f13e8f3c9] Failed to schedule_create_volume: No
 valid
  host was found.
 
  1. Do we need to implement more methods in OVirtDriver for cinder?
  2. Why the request is not going to 'create_volume' method in
 cinder.volume.
  ovirt.OVirtDriver ?
 
 I'm sure that you may need more methods, as this was POC code, so we only
 put the minimum required.
 It was based on FOLSOM, so if you're working with a more updated version
 then the interfaces might have changed.
 I did that a few months ago, so I currently don't have an environment in
 which I can test that. However, from the errors it looks like it is an
 environmental issue, as it didn't even get to the driver (it says it failed
 to schedule the cinder command).


 Oved
  It would be great if you answer the above questions.
 
  Thanks,
  Romil
 
 
  On Sun, May 19, 2013 at 10:44 AM, Oved Ourfalli  ov...@redhat.com 
 wrote:
 
 
  Hi Romil.
 
  Sorry for the late response.
  In order to use the cinder driver you need to set the following
 configuration
  items in /etc/cinder/cinder.conf
 
  volume_driver=cinder.volume.ovirt.OVirtDriver
  ovirt_engine_url= http://10.35.1.202:8080/api 
  ovirt_engine_username=user@domain
  ovirt_engine_password=password
  ovirt_engine_storagedomain=nfs-data1
 
  What did you fail on? Can you attach the cinder log for us to see?
 
  Also cc-ing Federico, who worked with me on the driver.
 
  Thank you,
  Oved
 
 
 
  - Original Message -
   From: Romil Gupta  romilgupt...@gmail.com 
   To: Oved Ourfalli  ov...@redhat.com 
   Cc: users  users@ovirt.org 
   Sent: Wednesday, May 15, 2013 5:41:42 PM
   Subject: Re: [Users] Openstack Quantum , Cinder and Glance integration
 with
   oVirt.
  
   Hi Oved ,
  
   I have gone through the code , it would be great if you let me know
 what
   are
   the flags we need to set in the cinder.conf to load the oVirt-cinder
   driver.
  
   Is this the correct flag volume_driver=cinder.volume.drivers.ovirt.
   OVirtDriver ?
  
   If yes , still I am not able

Re: [Users] Openstack Quantum , Cinder and Glance integration with oVirt.

2013-05-09 Thread Romil Gupta
Thanks Itamar, Yes , the intent is to consume oVirt from
the Openstack side.

Oved: thanks, I would be great if you could share the code.


On Thu, May 9, 2013 at 6:09 PM, Oved Ourfalli ov...@redhat.com wrote:



 - Original Message -
  From: Itamar Heim ih...@redhat.com
  To: Romil Gupta romilgupt...@gmail.com, Oved Ourfalli 
 oourf...@redhat.com
  Cc: Mike Kolesnik mkole...@redhat.com, users users@ovirt.org
  Sent: Thursday, May 9, 2013 3:22:45 PM
  Subject: Re: [Users] Openstack Quantum , Cinder and Glance integration
 with oVirt.
 
  On 05/09/2013 09:34 AM, Romil Gupta wrote:
   Thanks Mike , I have already gone through the links you suggested
 above.
   As of now I am more interested to know about Cinder and glance
   integration with oVirt. It would be a great help if you share some
   references over this.
 
  Hi Romil,
 
  please note the quantum, glance and cinder integration allow ovirt to
  consume these services.
  from what i understood from the blueprint approach you took, you want
  openstack to consume ovirt.
 
 
  for glance, ovirt will allow to import glance images as templates, but
  to easily launch openstack instances on ovirt, your glance-ovirt-driver
  seems a better solution.
 
  for cinder, will take more time for ovirt to support a cinder storage
  domain, but if you want to use openstack with cinder-ovirt-driver, so a
  nova-ovirt-driver will be able to use the 'cinder' volumes from ovirt, i
  think oved can share his POC code for this.
 

 Romil, if you indeed need that one, let me know.
 It has been a while since I touched it so need to track it down, and do
 some cleanups and stuff there before I send it to you,

 Oved

  HTH,
  Itamar
 
  
  
   On Thu, May 9, 2013 at 11:58 AM, Mike Kolesnik mkole...@redhat.com
   mailto:mkole...@redhat.com wrote:
  
  
 
  
  
   Hi ,
  
   Hi Romil,
  
  
   It would be great to know about the Quantum integration with
   oVirt and eagerly waiting for its release date.
  
   Quantum integration is moving along nicely, we already have a
   working POC with the Quantum Linux Bridge plugin.
   We are currently working on stabilizing the POC and making it a
 tech
   preview for the 3.3 release.
   You can see the relevant details here:
   www.ovirt.org/Features/Detailed_Quantum_Integration
   http://www.ovirt.org/Features/Detailed_Quantum_Integration
  
   Also if you're interested in the POC, you can see details (and
   videso) here:
  
 http://www.ovirt.org/Features/Detailed_Quantum_Integration#Proof_of_Concept
  
   Regards,
   Mike
  
  
   If possible, Can anyone please share the references( demo video
   , ppt ,link or git )  for Cinder and Glance integration.
  
   *
   *
   *Regards,*
   *Romil Gupta
   *
  
   ___
   Users mailing list
   Users@ovirt.org mailto:Users@ovirt.org
   http://lists.ovirt.org/mailman/listinfo/users
  
  
  
  
  
   --
   *Thanks  Regards,*
   *Romil Gupta
   *
  
  
   ___
   Users mailing list
   Users@ovirt.org
   http://lists.ovirt.org/mailman/listinfo/users
  
 
 




-- 
*Thanks  Regards,*
*Romil Gupta
*
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Openstack Quantum , Cinder and Glance integration with oVirt.

2013-05-09 Thread Romil Gupta
Thanks for sharing the code and yes I had missed the mail from you earlier.
I am just going through the code and would let you know if I need some help
from you.




On Thu, May 9, 2013 at 7:19 PM, Oved Ourfalli ov...@redhat.com wrote:



 - Original Message -
  From: Romil Gupta romilgupt...@gmail.com
  To: Oved Ourfalli ov...@redhat.com
  Cc: users users@ovirt.org
  Sent: Thursday, May 9, 2013 4:31:23 PM
  Subject: Re: [Users] Openstack Quantum ,  Cinder and Glance
 integration with oVirt.
 
  Thanks Itamar, Yes , the intent is to consume oVirt from the Openstack
 side.
 
  Oved: thanks, I would be great if you could share the code.
 
 Code was shared earlier on the thread before you got a chance to send your
 response, but in case you missed it, the code is in:
 https://github.com/oourfali/openstack-ovirt-driver

 Also, Itamar added an important note about that:
 
 Romil - the POC above expects the glance image to pre-exist as a
 template (by same name). I think your glance driver for ovirt to
 directly show the ovirt template from ovirt is a better approach.
 

 Let me know if you need more details,
 Oved
 
  On Thu, May 9, 2013 at 6:09 PM, Oved Ourfalli  ov...@redhat.com 
 wrote:
 
 
 
 
 
  - Original Message -
   From: Itamar Heim  ih...@redhat.com 
   To: Romil Gupta  romilgupt...@gmail.com , Oved Ourfalli 
   oourf...@redhat.com 
   Cc: Mike Kolesnik  mkole...@redhat.com , users  users@ovirt.org
   Sent: Thursday, May 9, 2013 3:22:45 PM
   Subject: Re: [Users] Openstack Quantum , Cinder and Glance integration
 with
   oVirt.
  
   On 05/09/2013 09:34 AM, Romil Gupta wrote:
Thanks Mike , I have already gone through the links you suggested
 above.
As of now I am more interested to know about Cinder and glance
integration with oVirt. It would be a great help if you share some
references over this.
  
   Hi Romil,
  
   please note the quantum, glance and cinder integration allow ovirt to
   consume these services.
   from what i understood from the blueprint approach you took, you want
   openstack to consume ovirt.
  
  
   for glance, ovirt will allow to import glance images as templates, but
   to easily launch openstack instances on ovirt, your glance-ovirt-driver
   seems a better solution.
  
   for cinder, will take more time for ovirt to support a cinder storage
   domain, but if you want to use openstack with cinder-ovirt-driver, so a
   nova-ovirt-driver will be able to use the 'cinder' volumes from ovirt,
 i
   think oved can share his POC code for this.
  
 
  Romil, if you indeed need that one, let me know.
  It has been a while since I touched it so need to track it down, and do
 some
  cleanups and stuff there before I send it to you,
 
  Oved
 
   HTH,
   Itamar
  
   
   
On Thu, May 9, 2013 at 11:58 AM, Mike Kolesnik  mkole...@redhat.com
mailto: mkole...@redhat.com  wrote:
   
   
 
   
   
Hi ,
   
Hi Romil,
   
   
It would be great to know about the Quantum integration with
oVirt and eagerly waiting for its release date.
   
Quantum integration is moving along nicely, we already have a
working POC with the Quantum Linux Bridge plugin.
We are currently working on stabilizing the POC and making it a tech
preview for the 3.3 release.
You can see the relevant details here:
www.ovirt.org/Features/Detailed_Quantum_Integration
 http://www.ovirt.org/Features/Detailed_Quantum_Integration 
   
Also if you're interested in the POC, you can see details (and
videso) here:
   
 http://www.ovirt.org/Features/Detailed_Quantum_Integration#Proof_of_Concept
   
Regards,
Mike
   
   
If possible, Can anyone please share the references( demo video
, ppt ,link or git ) for Cinder and Glance integration.
   
*
*
*Regards,*
*Romil Gupta
*
   
___
Users mailing list
Users@ovirt.org mailto: Users@ovirt.org 
http://lists.ovirt.org/mailman/listinfo/users
   
   
   
   
   
--
*Thanks  Regards,*
*Romil Gupta
*
   
   
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
   
  
  
 
 
 
  --
  Thanks  Regards,
  Romil Gupta
 
 
  ___
  Users mailing list
  Users@ovirt.org
  http://lists.ovirt.org/mailman/listinfo/users
 




-- 
*Thanks  Regards,*
*Romil Gupta
*
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] Query regarding storagedomins

2013-04-04 Thread Romil Gupta
Hi ,

*I want to fetch the storagedomains details based on the datacenter id
using ovirt-engine-sdk-3.2.0.2-1.*

Datacenter details:

data_centers
data_center id=e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3
href=/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3
namedatacenter1/name
description/
link rel=storagedomains
href=/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3/storagedomains/
link rel=permissions
href=/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3/permissions/
/data_center

data_center id=347748d0-b72b-439f-bb2b-bd5c82041158
href=/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158
nameDefault/name
description/
link rel=storagedomains
href=/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158/storagedomains/
link rel=permissions
href=/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158/permissions/
/data_center
/data_centers

I want to know how I could get the storagedomains details using the above
xml ?

*_session = API(url=rhevm_uri, username=rhevm_username,
password=rhevm_password, insecure=True)
*
*print Connected to RHEVM Successful*
*datacenters = _session.datacenters.list()*
*for dc in datacenters:*
*   print dc.name*
*   print dc.id*
*   links = dc.link*
*   for l in links:*
*  print l.rel*
*  print l.href*
*but this wont give any storagedomain details :(*



I tried this :
storages = _session.storagedomains.list()
for storage in storages:
print storage.name

storage_domains
storage_domain id=e3e3b0cd-48a4-4bb8-a75b-07813f2c165e
href=/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e
namerhevmiso/name
link rel=permissions
href=/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e/permissions/
link rel=files
href=/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e/files/
typeiso/type
masterfalse/master
storage
typenfs/type
address*.*.*.*/address
path/iso/rhevmisonfs/path
/storage
available767725404160/available
used94489280512/used
committed0/committed
storage_formatv1/storage_format
/storage_domain
storage_domain id=baa46f57-13e0-4159-ace1-f04e61e1e937
href=/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937
namerhevmVMdata/name
link rel=permissions
href=/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937/permissions/
link rel=files
href=/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937/files/
typedata/type
mastertrue/master
storage
typenfs/type
address*.*.*.*/address
path/iso/rhevmnfs/path
/storage
available767725404160/available
used94489280512/used
committed100931731456/committed
storage_formatv1/storage_format
/storage_domain
/storage_domains

but it wont contains datacenter ID :(

help me out !


-- 
*Thanks  Regards,*
*Romil Gupta
*
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Query regarding storagedomins

2013-04-04 Thread Romil Gupta
I solved it by myself , pls ignore this mail :)


On Thu, Apr 4, 2013 at 8:30 PM, Romil Gupta romilgupt...@gmail.com wrote:

 Hi ,

 *I want to fetch the storagedomains details based on the datacenter id
 using ovirt-engine-sdk-3.2.0.2-1.*

 Datacenter details:

 data_centers

 data_center id=e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3 
 href=/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3
 namedatacenter1/name
 description/

 link rel=storagedomains 
 href=/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3/storagedomains/

 link rel=permissions 
 href=/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3/permissions/
 /data_center


 data_center id=347748d0-b72b-439f-bb2b-bd5c82041158 
 href=/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158
 nameDefault/name
 description/

 link rel=storagedomains 
 href=/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158/storagedomains/

 link rel=permissions 
 href=/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158/permissions/
 /data_center
 /data_centers

 I want to know how I could get the storagedomains details using the above
 xml ?

 *_session = API(url=rhevm_uri, username=rhevm_username,
 password=rhevm_password, insecure=True)
 *
 *print Connected to RHEVM Successful*
 *datacenters = _session.datacenters.list()*
 *for dc in datacenters:*
 *   print dc.name*
 *   print dc.id*
 *   links = dc.link*
 *   for l in links:*
 *  print l.rel*
 *  print l.href*
 *but this wont give any storagedomain details :(*



 I tried this :
 storages = _session.storagedomains.list()
 for storage in storages:
 print storage.name

 storage_domains

 storage_domain id=e3e3b0cd-48a4-4bb8-a75b-07813f2c165e 
 href=/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e
 namerhevmiso/name

 link rel=permissions 
 href=/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e/permissions/

 link rel=files 
 href=/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e/files/
 typeiso/type
 masterfalse/master
 storage
 typenfs/type
 address*.*.*.*/address
 path/iso/rhevmisonfs/path
 /storage
 available767725404160/available
 used94489280512/used
 committed0/committed
 storage_formatv1/storage_format
 /storage_domain

 storage_domain id=baa46f57-13e0-4159-ace1-f04e61e1e937 
 href=/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937
 namerhevmVMdata/name

 link rel=permissions 
 href=/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937/permissions/

 link rel=files 
 href=/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937/files/
 typedata/type
 mastertrue/master
 storage
 typenfs/type
 address*.*.*.*/address
 path/iso/rhevmnfs/path
 /storage
 available767725404160/available
 used94489280512/used
 committed100931731456/committed
 storage_formatv1/storage_format
 /storage_domain
 /storage_domains

 but it wont contains datacenter ID :(

 help me out !


 --
 *Thanks  Regards,*
 *Romil Gupta
 *




-- 
*Thanks  Regards,*
*Romil Gupta
M.Tech (CSE), Manipal
Intern @ HP ISO,Bangalore
Contact No. : 8880414133*
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Query regarding storagedomins

2013-04-04 Thread Romil Gupta
Hi ,

Here is the sample code :

sd =api.datacenters.get(id = datacenter_id).storagedomains.list()
  for s in sd:
  if(s.get_master()):
  disk_used =s.get_used() / (1024*1024*1024)
  disk_available = s.get_available() / (1024*1024*1024)
  print disk_used
  print disk_available


On Fri, Apr 5, 2013 at 2:04 AM, Gianluca Cecchi
gianluca.cec...@gmail.comwrote:

 On Thu, Apr 4, 2013 at 9:35 PM, Romil Gupta wrote:
  I solved it by myself , pls ignore this mail :)

 Would you like to share it?
 Thanks,
 Gianluca




-- 
*Thanks  Regards,*
*Romil Gupta
M.Tech (CSE), Manipal
Intern@ HP ISO,Bangalore
Contact No. : 8880414133*
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] Query regarding Quantum integration with oVirt

2013-03-13 Thread Romil Gupta
Hi,

May I know Is there any support for Quantum in RHEVM-3.1 if not , which
oVirt version should I use so that I can use quantum feature ?

I have seen a demo of oVirt with quantum on youtube may i know which
version you used ?


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


[Users] Rest-api to fetch the hosts details ( active vm's , CPU , Physical memory etc.)

2013-01-30 Thread Romil Gupta
Hi all ,

how I can get the hosts details like Active VM's , Number of CPU's , CPU
name , CPU type , Physical Memory (used , free ) , swap size and
other parameters using ovirt-engine-sdk-3.2.0.5-1.



Regards,
Romil

-- 
I don't wish to be everything to everyone, but I would like to be something
to someone.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] Rest-Api to get the VM ip-address in oVirt /RHEV-M 3.0

2012-12-12 Thread Romil Gupta
Hi,

I am looking for a REST-API to get the IP-ADDRESS of a VM ?
At the creation time we attach a nic's to a VM , but I didn't find any API
to get the IP address.

I want to pass the VM_NAME as a parameter and get the IP-ADDRESS of a
particular VM !
is it possible ??

Thanks for all your continuous help till now.

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


Re: [Users] Rest-Api to get the VM ip-address in oVirt /RHEV-M 3.0

2012-12-12 Thread Romil Gupta
Hi Michael,

I have  'rhev-agent-2.3.16-3.el6.x86_64 '  on every VM's  and  I tired
api.vms.get(VM_NAME).guest_info.ips  but it return NONE !
I can see on UI that all VM's have some IP Address .
can you please check once ?

Thanks
Romil


On Wed, Dec 12, 2012 at 5:11 PM, Michael Pasternak mpast...@redhat.comwrote:

 On 12/12/2012 01:31 PM, Romil Gupta wrote:
 
  Hi,
 
  I am looking for a REST-API to get the IP-ADDRESS of a VM ?
  At the creation time we attach a nic's to a VM , but I didn't find any
 API to get the IP address.
 
  I want to pass the VM_NAME as a parameter and get the IP-ADDRESS of a
 particular VM !
  is it possible ??

 yes it is, ips located under guest_info in vm, but note that you
 have to have guest agent installed.

 
  Thanks for all your continuous help till now.
 
  Regards,
  Romil
 


 --

 Michael Pasternak
 RedHat, ENG-Virtualization RD




-- 
I don't wish to be everything to everyone, but I would like to be something
to someone.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Related to extend disk size of existing virtual machine !

2012-11-20 Thread Romil Gupta
I m using RHEM 3.0 as a GUI and
ovirt-engine-sdk-3.1.0.3-1.el6.noarch.rpmfor writting python script !

I have one existing VM in RHEVM3.0 that I have created using Template(
memory 2GB , virtual disk = 10 GB ) in RHEVM 3.0
Now , I want to increase the virtual disk size upto 60 GB of VM .
How I can do that ???


Regards,
Romil



On Wed, Nov 21, 2012 at 12:02 PM, Oved Ourfalli ov...@redhat.com wrote:



 - Original Message -
  From: Romil Gupta romilgupt...@gmail.com
  To: users@ovirt.org, Michael Pasternak mpast...@redhat.com, Eli
 Mesika emes...@redhat.com
  Sent: Wednesday, November 21, 2012 8:19:25 AM
  Subject: [Users] Related to extend disk size of existing virtual machine
 !
 
 
  Hello,
 
 
  To add a disk to VM we use the following :
 
 
 
 api.vms.get(VM_NAME).disks.add(params.Disk(storage_domains=params.StorageDomains(storage_domain=[api.storagedomains.get(STORAGE_NAME)]),
 size=512*MB, #
 type_='system', -
 disk type is
 deprecated
 status=None,
 interface='virtio',
 format='cow',
 sparse=True,
 bootable=True))
 
  but the type_ attribute is deprecated , so I got the following
  exception :
 
 
 
  Failed to add disk
 
 
  status: 400
  reason: Bad Request
  detail: Cannot add Virtual Machine Disk. Disk 1 already marked as
  system
 
 
  Now , if I try giving disk_type='Data' on GUI of RHEVM then it will
  be added to VM.
 
 
 
 
  I want to know from which ovirt-sdk version you have deprecated
  attribute disk_type ?
 
 According to the changelog, it was done in 3.1.0.3-1.

 * Mon Jun 25 2012 Michael Pasternak mpast...@redhat.com - 3.1.0.3-1
 ...
 - to Disk type added provisioned_size property and removed /type/ (not
 supported in 3.1)
 ...

 What's the ovirt engine version you're working with?


 
  I am currently using ovirt-engine-sdk-3.1.0.3-1.el6.noarch.rpm and I
  didn't find type_ attribute using this rpm !
 
 
  How I can extend the disk size of a existing VM in RHEVM ?
 
 There is currently no way to extend an existing disk.

 
  Help me !
 
 
 
 
 
 
 
 
  Regards ,
  Romil Gupta
 
 
 
  ___
  Users mailing list
  Users@ovirt.org
  http://lists.ovirt.org/mailman/listinfo/users
 




-- 
I don't wish to be everything to everyone, but I would like to be something
to someone.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] Related to automatic update or refresh the RHEVM ISO domain !

2012-11-05 Thread Romil Gupta
hello,

I upload ISO image using this script *upload.py*:

==
import os

os.system('mkdir mount_dir')

os.system('mount -t nfs 15.15.158.2:/iso/rhevmisonfs mount_dir')

print 'mounted'
print 'start copying'

os.system('cp -f  CentOS-6.2-x86_64-LiveDVD.iso
 
mount_dir/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e/images/----/')
print 'file copied'

os.system('umount -a nfs 15.15.158.2:/iso/rhevmisonfs mount_dir')
print 'unmounted'

os.system('rmdir mount_dir')
print 'dir removed'

==

and I created a *rhevm_test.py *

api.vms.add(params.VM(name=VM_NAME,
memory=2*GB,os=params.OperatingSystem(boot=[params.Boot(dev='cdrom'),
params.Boot(dev='hd')]),cluster=api.clusters.get(name='Default'),
template=api.templates.get('Blank')))
print 'VM created'

rhevmiso=api.storagedomains.get(name='rhevmiso').files.list()
for iso  in rhevmiso:
print ' iso -- %s \n' % iso

image =  api.storagedomains.get(name='rhevmiso').files.get(name='
CentOS-6.2-x86_64-LiveDVD.iso ')
print 'image found %s' %image

api.vms.get(VM_NAME).cdroms.add(params.CdRom(name='cdrom',file=image))
print 'image added to VM'

==

now i got the following exception :
image found none

*Note* : the reason is image is copied to rhevmiso  storage domain but it
not reflected in RHEVM user interface unless and untill I refresh it !

*Do we have any refresh or update function in ovirt sdk  so that after
coping the image  RHEVM ISO domain will get refresh automatically ?? *

With Regards,
Romil
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] Related to python script for Attach Cd (.iso) to a vm

2012-11-02 Thread Romil Gupta
Hello ,

*I want to  write a script to attach a  '.iso' image to a vm *
so ,can you please help me or tell me some api so that i can continue my
work !!!
I have some '.iso ' file in my storage .

script   *rhevm_test.py*

from ovirtsdk.api import API
from ovirtsdk.xml import params
import time

rhevm_uri = https://rhevm301.xxx.xx.com:8443/api;
rhevm_username = ad...@rhevm301.xxx.xx.com
rhevm_password = iso*help

api = API(url=rhevm_uri, username=rhevm_username, password=rhevm_password)
print Connected to RHEVM Successful

MB = 1024*1024
GB = 1024*MB
VM_NAME = 'test_vm'
DESCRIP = 'testing vm'
CLUSTER_NAME =  'Default'
STORAGE_NAME =  'rhevmVMdata'

domain_name= 'rhevmiso'
domain_type = 'ISO'


try:
api.vms.add(params.VM(name=VM_NAME,description=DESCRIP,
memory=2*GB,cluster=api.clusters.get(CLUSTER_NAME),
template=api.templates.get('Blank') , cdroms =
'CentOS-6.2-x86_64-LiveCD.iso '))

print 'VM created'

api.vms.get(VM_NAME).nics.add(params.NIC(name='nic1',
network=params.Network(name='rhevm'), interface='Red Hat VirtIO'))
print 'NIC added to VM'


api.vms.get(VM_NAME).disks.add(params.Disk(storage_domains=params.StorageDomains(storage_domain=[api.storagedomains.get(STORAGE_NAME)]),size=512*MB,status=None,interface='VirtIO',format='Preallocated',sparse=True,bootable=True))

print 'Disk added to VM'
print 'Waiting for VM to reach Down status'
while api.vms.get(VM_NAME).status.state != 'down':
time.sleep(1)
except Exception as e:
print 'Failed to create VM with disk and NIC\n%s' % str(e)

time.sleep(10)

try:
if api.vms.get(VM_NAME).status.state != 'up':
print 'Starting VM'
api.vms.get(VM_NAME).start()
print 'Waiting for VM to reach Up status'
while api.vms.get(VM_NAME).status.state != 'up':
time.sleep(1)
else:
print 'VM already up'
except Exception as e:
 print 'Failed to Start VM:\n%s' % str(e)


and got some exceptions

Connected to RHEVM Successful
Failed to create VM with disk and NIC
'str' object has no attribute 'export'
Failed to Start VM:
'NoneType' object has no attribute 'status'

if i remove this cdroms = 'CentOS-6.2-x86_64-LiveCD.iso '  the code will
works fine and it will create a vm with blank template w/o any '.iso'
attached !!


*
*
*
*
*
*
*
*
*With Regards,*
*Romil*
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] Fwd: Related to python script for Attach Cd (.iso) to a vm

2012-11-02 Thread Romil Gupta
Hello ,

*I want to  write a script to attach a  '.iso' image to a vm *
so ,can you please help me or tell me some api so that i can continue my
work !!!
I have some '.iso ' file in my storage .

script   *rhevm_test.py*

from ovirtsdk.api import API
from ovirtsdk.xml import params
import time

rhevm_uri = https://rhevm301.xxx.xx.com:8443/api;
rhevm_username = ad...@rhevm301.xxx.xx.com
rhevm_password = iso*help

api = API(url=rhevm_uri, username=rhevm_username, password=rhevm_password)
print Connected to RHEVM Successful

MB = 1024*1024
GB = 1024*MB
VM_NAME = 'test_vm'
DESCRIP = 'testing vm'
CLUSTER_NAME =  'Default'
STORAGE_NAME =  'rhevmVMdata'

domain_name= 'rhevmiso'
domain_type = 'ISO'


try:
api.vms.add(params.VM(name=VM_NAME,description=DESCRIP,
memory=2*GB,cluster=api.clusters.get(CLUSTER_NAME),
template=api.templates.get('Blank')))

print 'VM created'

api.vms.get(VM_NAME).nics.add(params.NIC(name='nic1',
network=params.Network(name='rhevm'), interface='Red Hat VirtIO'))
print 'NIC added to VM'


api.vms.get(VM_NAME).disks.add(params.Disk(storage_domains=params.StorageDomains(storage_domain=[api.storagedomains.get(STORAGE_NAME)]),size=512*MB,status=None,interface='VirtIO',format='Preallocated',sparse=True,bootable=True))

print 'Disk added to VM'
print 'Waiting for VM to reach Down status'
while api.vms.get(VM_NAME).status.state != 'down':
time.sleep(1)
except Exception as e:
print 'Failed to create VM with disk and NIC\n%s' % str(e)

time.sleep(10)

try :
api.vms.get(VM_NAME).cdroms.add(params.CdRom(name='CD-ROM' ,
file=params.File(name='CentOS-6.2-x86_64-LiveDVD.iso')))
except Exception as e:
 print 'Failed to attach disk :\n%s' % str(e)



try:
if api.vms.get(VM_NAME).status.state != 'up':
print 'Starting VM'
api.vms.get(VM_NAME).start()
print 'Waiting for VM to reach Up status'
while api.vms.get(VM_NAME).status.state != 'up':
time.sleep(1)
else:
print 'VM already up'
except Exception as e:
 print 'Failed to Start VM:\n%s' % str(e)


and got some following output :

Connected to RHEVM Successful
VM created
NIC added to VM
Disk added to VM
Waiting for VM to reach Down status
Failed to attach disk :

status: 400
reason: Bad Request
detail: CdRom [file.id] required for add
Starting VM
Failed to Start VM:

status: 400
reason: Bad Request
detail: Cannot run VM without at least one bootable disk.



if i remove this line in red color the code will works fine and it will
create a vm with blank template w/o any '.iso' attached !!


*
*
*
*
*
*
*
*
*With Regards,*
*Romil*
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] Regarding live-migration in rhevm3.0

2012-10-26 Thread Romil Gupta
Hello ,

I am using the rhevm3.0 and whenever i tried to do live-migration of vm , i
got the following error :

rhevm.log file is given below --


2012-10-26 12:06:03,619 INFO  [org.nogah.bll.VdsSelector]
(http-0.0.0.0-8443-12) Checking for a specific VDS only -
id:77dd9ebc-1529-11e2-82f4-005056a5674d, name:rhevh1.xxx.xxx.com,
host_name(ip):15.15.155.224

2012-10-26 12:06:03,620 INFO  [org.nogah.bll.MigrateVmToServerCommand]
(pool-11-thread-5252) Running command: MigrateVmToServerCommand internal:
false. Entities affected :  ID: e16f887e-194b-42d4-897a-c9fed97c8bd3 Type:
VM

2012-10-26 12:06:03,649 INFO  [org.nogah.bll.VdsSelector]
(pool-11-thread-5252) Checking for a specific VDS only -
id:77dd9ebc-1529-11e2-82f4-005056a5674d, name:rhevh1.xxx.xxx.com,
host_name(ip):15.15.155.224

2012-10-26 12:06:03,686 INFO  [org.nogah.vdsbroker.MigrateVDSCommand]
(pool-11-thread-5252) START, MigrateVDSCommand(vdsId =
ce93e164-1527-11e2-b0a9-005056a5674d,
vmId=e16f887e-194b-42d4-897a-c9fed97c8bd3, srcHost=15.15.155.182,
dstVdsId=77dd9ebc-1529-11e2-82f4-005056a5674d, dstHost=15.15.155.224:54321,
migrationMethod=ONLINE), log id: bc6506f

2012-10-26 12:06:03,712 INFO
 [org.nogah.vdsbroker.vdsbroker.MigrateBrokerVDSCommand]
(pool-11-thread-5252) VdsBroker::migrate::Entered
(vm_guid=e16f887e-194b-42d4-897a-c9fed97c8bd3, srcHost=15.15.155.182,
dstHost=15.15.155.224:54321,  method=online

2012-10-26 12:06:03,712 INFO
 [org.nogah.vdsbroker.vdsbroker.MigrateBrokerVDSCommand]
(pool-11-thread-5252) START, MigrateBrokerVDSCommand(vdsId =
ce93e164-1527-11e2-b0a9-005056a5674d,
vmId=e16f887e-194b-42d4-897a-c9fed97c8bd3, srcHost=15.15.155.182,
dstVdsId=77dd9ebc-1529-11e2-82f4-005056a5674d, dstHost=15.15.155.224:54321,
migrationMethod=ONLINE), log id: 29080aed

2012-10-26 12:06:03,748 INFO
 [org.nogah.vdsbroker.vdsbroker.MigrateBrokerVDSCommand]
(pool-11-thread-5252) FINISH, MigrateBrokerVDSCommand, log id: 29080aed

2012-10-26 12:06:03,804 INFO  [org.nogah.vdsbroker.MigrateVDSCommand]
(pool-11-thread-5252) FINISH, MigrateVDSCommand, return: MigratingFrom, log
id: bc6506f

2012-10-26 12:06:03,814 INFO  [org.nogah.vdsbroker.MigrateVDSCommand]
(QuartzScheduler_Worker-27) IncreasePendingVms::MigrateVm Increasing vds
rhevh1.xxx.xxx.com pending vcpu count, now 1. Vm: instance-015f

2012-10-26 12:06:03,814 INFO  [org.nogah.vdsbroker.MigrateVDSCommand]
(QuartzScheduler_Worker-27) IncreasePendingVms::MigrateVm Increasing vds
rhevh1.vmm.hp.com pending vmem size, now 1,024. Vm: instance-015f

2012-10-26 12:06:04,454 ERROR [org.nogah.vdsbroker.VdsUpdateRunTimeInfo]
(QuartzScheduler_Worker-91) Rerun vm e16f887e-194b-42d4-897a-c9fed97c8bd3.
Called from vds rhevh2.xxx.xxx.com

2012-10-26 12:06:04,481 INFO
 [org.nogah.vdsbroker.UpdateVdsDynamicDataVDSCommand] (pool-11-thread-5250)
START, UpdateVdsDynamicDataVDSCommand(vdsId =
77dd9ebc-1529-11e2-82f4-005056a5674d,
vdsDynamic=org.nogah.common.businessentities.VdsDynamic@c23a51c4), log id:
3e29e2d7

2012-10-26 12:06:04,504 INFO
 [org.nogah.vdsbroker.UpdateVdsDynamicDataVDSCommand] (pool-11-thread-5250)
FINISH, UpdateVdsDynamicDataVDSCommand, log id: 3e29e2d7

2012-10-26 12:06:04,504 INFO  [org.nogah.bll.RunVmCommandBase]
(pool-11-thread-5250) DecreasePendingVms::Decreasing vds
rhevh1.xxx.xxx.compending vcpu count, now 0. Vm: instance-015f

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


[Users] Regarding Python script for RHEVM

2012-10-22 Thread Romil Gupta
Hello ,

I am having a Rhel6.2 machine over tht i have installed  ovirt-sdk using
following command :

$ git clone http://gerrit.ovirt.org/ovirt-engine-sdk
$ yum install -y rpm-build python-devel python-setuptools
$ make rpm
$ yum localinstall rpmtop/RPMS/noarch/ovirt-engine-sdk-x.y-z.noarch.rpm


thn i have written python script  rhevmtest.py :


from ovirtsdk.api import API
from ovirtsdk.xml import params
import time

rhevm_uri = https://rhevm301.vmm.hp.com:8443/api;
rhevm_username = ad...@rhevm301.vmm.hp.com
rhevm_password = iso*help


rhevmAPI = API(url=rhevm_uri, username=rhevm_username,
password=rhevm_password)

print Connected to RHEVM Successful

instances  = rhevmAPI.vms.list()

cluster = rhevmAPI.clusters.get(name='Default')

template = rhevmAPI.templates.get(name='CentOS')

param = params.VM(name= 'test_vm'
,cluster=cluster,template=template,memory=2147483648)
vm6 = rhevmAPI.vms.add(param)

and its working fine :)

Now can give me some guidance to write script for following functions:

• pause (Pause a running vm)

• Unpause (UnPause a vm)

• start   (start a vm from shutdown
state)

• shutdown(shutdown a vm)

• stop  (Poweroff the vm)

*. * snapshot/ create template (take snapshot of a vm)

• live-migration  (Migrates a running vm to a new
machine)

• resize   (Resize a vm)

• resize-confirm(Confirm a previous vm)

• resize-revert   Revert a previous resize (and return
to the previousVM)



Regards,
Romil Gupta
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users