Re: [ovirt-users] a KVM Host has different UUIDs ?

2016-03-14 Thread Jean-Pierre Ribeauville
Hi,

To clarify what I'm doing : 

I install   a piece of code within host that collect infos from Guest , host 
itself and  datacenters and cluster  IDs to whom  this host belongs
in order to build a tree view from the host point of view.


As I'm wishing to use this code whatever in which infra is included the KVM 
Host  ( RHEV ,  Standalone , Openstatck Compute node,  ), I don't require 
any change in the UUIDs scheme but just try to use these ones in the most 
convenient way.


Thx for help.


Regards,

J.P.

-Original Message-
From: Juan Hernández [mailto:jhern...@redhat.com] 
Sent: lundi 14 mars 2016 10:01
To: Jean-Pierre Ribeauville; users@ovirt.org
Subject: Re: [ovirt-users] a KVM Host has different UUIDs ?

On 03/11/2016 11:34 AM, Jean-Pierre Ribeauville wrote:
> Hi,
> 
> When retrieving KVM Host UUID   via virsh  getcapabilities()  or via
>  ovirt Python SDK ( by using  obj.get_id() ), then both UUIDs are not 
> identical .
> 
> (FYI, Guest UUIDs retrieved via both ways , i.e.
> virDomainGetUUIDString() or python ovirt sdk ,  are identical.)
> 
> 
> Did I miss something ?
> 

This is normal, and expected. The host exists before it is added to the oVirt 
system, and already has an identifier. When it is added to the oVirt system it 
gets a new identifier assigned, for tracking it in the oVirt database. Those 
two identifiers are different.

On the other hand virtual machines are created by the oVirt system. It assign 
them an identifier for tracking in the oVirt database, and it happens to use 
the same identifier when asking libvirt to create the virtual machine.

Anyhow, you should not rely on these identifiers being the same, or different, 
as it is an implementation detail that may change in the future.

Is there any specific thing you are trying to achieve? If you share it we may 
be able to suggest a different approach.

--
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
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] a KVM Host has different UUIDs ?

2016-03-11 Thread Jean-Pierre Ribeauville
Hi,


When retrieving KVM Host UUID   via virsh  getcapabilities()  or via  ovirt 
Python SDK ( by using  obj.get_id() ), then both UUIDs are not identical .

(FYI, Guest UUIDs retrieved via both ways , i.e. virDomainGetUUIDString() or 
python ovirt sdk ,  are identical.)


Did I miss something ?

Thx for help

Regards,


Jean-Pierre RIBEAUVILLE

+33 1 4717 2049

[axway_logo_tagline_87px]

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


Re: [ovirt-users] VM migration by using the Python SDK

2016-03-08 Thread Jean-Pierre Ribeauville
Hi,

Thanks a lot.


J.P.

-Original Message-
From: Juan Hernández [mailto:jhern...@redhat.com] 
Sent: mardi 8 mars 2016 10:32
To: Jean-Pierre Ribeauville
Cc: Yaniv Kaul; users@ovirt.org
Subject: Re: [ovirt-users] VM migration by using the Python SDK

On 03/07/2016 07:59 PM, Yaniv Kaul wrote:
> 
> 
> On Mon, Mar 7, 2016 at 6:17 PM, Jean-Pierre Ribeauville 
> <jpribeauvi...@axway.com <mailto:jpribeauvi...@axway.com>> wrote:
> 
> Hi,
> 
> __ __
> 
> __ __
> 
> I'm a little bit lost by looking how to migrate a Guest between two
> nodes of a same cluster by using  ovirt  python  API .
> 
> 
> Copy-paste from oVirt system tests[1], adapt as you need:
> 
> def vm_migrate(prefix):
> api = prefix.virt_env.engine_vm().get_api()
> host_names = [h.name <http://h.name>() for h in 
> prefix.virt_env.host_vms()]
> 
> migrate_params = params.Action(
> host=params.Host(
> name=sorted(host_names)[1]
> ),
> )
> api.vms.get(VM1_NAME).migrate(migrate_params)
> testlib.assert_true_within_short(
> lambda: api.vms.get(VM1_NAME).status.state == 'up',
> )
> 
> 
> Y.
> [1] 
> https://gerrit.ovirt.org/#/c/48206/4/basic_suite_3.6/test-scenarios/00
> 4_basic_sanity.py
> 

The above is correct.

If you want a simpler complete example, it should be something like this:

---8<---
#!/usr/bin/python

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

# Connect to the server:
api = API(
url="https://engine.example.com/ovirt-engine/api;,
username="admin@internal",
password="...",
ca_file="/etc/pki/ovirt-engine/ca.pem",
debug=False,
)

# Find the VM:
vm = api.vms.get(name="myvm")

# Migrate the VM to the host:
vm.migrate(
  action=params.Action(
host=params.Host(
  name="myhost",
)
  ),
)


# Disconnect:
api.disconnect()
--->8---


--
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
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Users Digest, Vol 54, Issue 45 VM migration by using the Python SDK

2016-03-07 Thread Jean-Pierre Ribeauville
Hi,

Thx  a lot.

Regards,
J.P.

-Original Message-
From: users-boun...@ovirt.org [mailto:users-boun...@ovirt.org] On Behalf Of 
users-requ...@ovirt.org
Sent: lundi 7 mars 2016 20:00
To: users@ovirt.org
Subject: Users Digest, Vol 54, Issue 45

Send Users mailing list submissions to
users@ovirt.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ovirt.org/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
users-requ...@ovirt.org

You can reach the person managing the list at
users-ow...@ovirt.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Users digest..."


Today's Topics:

   1. Re:  restore-nets failing (was: Fresh install failing (Hosted
  Engine)) (Jonathan Sherman)
   2. Re:  regenerate libvirt-spice keys after libvirtd restart?
  (Bill James)
   3. Re:  VM migration by using the Python SDK (Yaniv Kaul)


--

Message: 1
Date: Mon, 7 Mar 2016 12:49:56 -0500
From: Jonathan Sherman 
To: Dan Kenigsberg 
Cc: Martin Polednik , users 
Subject: Re: [ovirt-users] restore-nets failing (was: Fresh install
failing (Hosted Engine))
Message-ID:

[ovirt-users] VM migration by using the Python SDK

2016-03-07 Thread Jean-Pierre Ribeauville
Hi,


I'm a little bit lost by looking how to migrate a Guest between two nodes of a 
same cluster by using  ovirt  python  API .

Is it the good way  to start for ovirt engine sources ?

Thx for help.

Regards,

Jean-Pierre RIBEAUVILLE

+33 1 4717 2049

[axway_logo_tagline_87px]

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


Re: [ovirt-users] migration failed no available host found ....

2016-02-15 Thread Jean-Pierre Ribeauville
Hi,

You hit the target !!!

I enable overcommitting on the destination , then  I’m able to migrate towards 
it.

Now I’ve to clarify my  Guests  memory requirements.

Thx for your help.

Regards,

J.P.

_
De : Jean-Pierre Ribeauville
Envoyé : lundi 15 février 2016 11:03
À : 'ILanit Stein'
Cc : users@ovirt.org
Objet : RE: [ovirt-users] migration failed no available host found 


Hi,

Within the ovirt GUI , I got this :

Max free Memory for scheduling new VMs : 0 Mb

It seems to be the root cause of my issue .

Vmstat -s ran on the destination host returns :

[root@ldc01omv01 vdsm]# vmstat -s
 49182684 K total memory
  4921536 K used memory
  5999188 K active memory
  1131436 K inactive memory
 39891992 K free memory
 2344 K buffer memory
  4366812 K swap cache
 24707068 K total swap
0 K used swap
 24707068 K free swap
  3090822 non-nice user cpu ticks
 8068 nice user cpu ticks
  2637035 system cpu ticks
804915819 idle cpu ticks
   298074 IO-wait cpu ticks
6 IRQ cpu ticks
 5229 softirq cpu ticks
0 stolen cpu ticks
 58678411 pages paged in
 78586581 pages paged out
0 pages swapped in
0 pages swapped out
541412845 interrupts
   1224374736 CPU context switches
   1455276687 boot time
   476762 forks
[root@ldc01omv01 vdsm]#


Is it vdsm that returns this info to ovirt ?

I tried a migration this morning at 10/04.

I attached  vdsm destination log .

 << Fichier: vdsm.log >>

Is it worth to increase of level of destination log ?


Thx for help.

Regards,

J.P.

-Message d'origine-
De : ILanit Stein [mailto:ist...@redhat.com]
Envoyé : dimanche 14 février 2016 10:05
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org
Objet : Re: [ovirt-users] migration failed no available host found 

Hi Jean-Pierre,

Seems by the log you've sent that the destination host, ldc01omv01, is filtered 
out, cause of lake of memory.
Is there enough memory on the destination, to run this VM?

Would you please send the source/destination hosts /var/log/vdsm/vdsm.log, 
/var/log/libvirt/qemu/VM_RHEL7-2, and /var/log/vdsm/libvirt.log, to provide 
more details.

Thanks,
Ilanit.

- Original Message -
From: "Jean-Pierre Ribeauville" 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>>
To: users@ovirt.org<mailto:users@ovirt.org>
Sent: Friday, February 12, 2016 4:59:20 PM
Subject: [ovirt-users] migration failed no available host found 



Hi,



When trying to migrate a Guest between two nodes of a cluster (from node1 to 
ldc01omv01) , I got this error ( in ovirt/engine.log file) :



2016-02-12 15:05:31,485 INFO 
[org.ovirt.engine.core.bll.scheduling.SchedulingManager] 
(ajp-/127.0.0.1:8702-4) [ff31b86] Candidate host ldc01omv01 
(09bb3024-170f-48a1-a78a-951a2c61c680) was filtered out by 
VAR__FILTERTYPE__INTERNAL filter Memory

2016-02-12 15:05:31,495 DEBUG 
[org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil] 
(org.ovirt.thread.pool-7-thread-34) About to run task 
java.util.concurrent.FutureTask from : java.lang.Exception

at 
org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalThreadExecutor.beforeExecute(ThreadPoolUtil.java:52)
 [utils.jar:]

at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[rt.jar:1.7.0_85]

at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[rt.jar:1.7.0_85]

at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_85]



2016-02-12 15:05:31,502 INFO 
[org.ovirt.engine.core.bll.MigrateVmToServerCommand] 
(org.ovirt.thread.pool-7-thread-34) [ff31b86] Running command: 
MigrateVmToServerCommand internal: false. Entities affected : ID: 
b77e6171-cbdf-44cb-b851-1b776a3fb616 Type: VMAction group MIGRATE_VM with role 
type USER

2016-02-12 15:05:31,505 INFO 
[org.ovirt.engine.core.bll.scheduling.SchedulingManager] 
(org.ovirt.thread.pool-7-thread-34) [ff31b86] Candidate host ldc01omv01 
(09bb3024-170f-48a1-a78a-951a2c61c680) was filtered out by 
VAR__FILTERTYPE__INTERNAL filter Memory (correlation id: ff31b86)

2016-02-12 15:05:31,509 WARN 
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] 
(org.ovirt.thread.pool-7-thread-34) [ff31b86] Correlation ID: ff31b86, Job ID: 
7b917604-f487-43a3-9cd2-4e7f95e545cc, Call Stack: null, Custom Event ID: -1, 
Message: Migration failed, No available host found (VM: VM_RHEL7-2, Source: 
node1).





In ovirt GUI nothing strange .



How may I go further to investigate this issue ?





Thx for help.



Regards,






J.P. Ribeauville




P: +33.(0).1.47.17.20.49

.

Puteaux 3 Etage 5 Bureau 4



jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>
http://www.axway.com






P Pensez à l’environnement avant d’imprimer.





___
Users mailing list
Users@ovirt.org<mailto:Users@ovirt.o

[ovirt-users] migration failed no available host found ....

2016-02-12 Thread Jean-Pierre Ribeauville
Hi,

When trying  to migrate a Guest between two nodes of a cluster  (from node1 to 
ldc01omv01),  I got this error ( in ovirt/engine.log file) :

2016-02-12 15:05:31,485 INFO  
[org.ovirt.engine.core.bll.scheduling.SchedulingManager] 
(ajp-/127.0.0.1:8702-4) [ff31b86] Candidate host ldc01omv01 
(09bb3024-170f-48a1-a78a-951a2c61c680) was filtered out by 
VAR__FILTERTYPE__INTERNAL filter Memory
2016-02-12 15:05:31,495 DEBUG 
[org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil] 
(org.ovirt.thread.pool-7-thread-34) About to run task 
java.util.concurrent.FutureTask from : java.lang.Exception
at 
org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalThreadExecutor.beforeExecute(ThreadPoolUtil.java:52)
 [utils.jar:]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[rt.jar:1.7.0_85]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[rt.jar:1.7.0_85]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_85]

2016-02-12 15:05:31,502 INFO  
[org.ovirt.engine.core.bll.MigrateVmToServerCommand] 
(org.ovirt.thread.pool-7-thread-34) [ff31b86] Running command: 
MigrateVmToServerCommand internal: false. Entities affected :  ID: 
b77e6171-cbdf-44cb-b851-1b776a3fb616 Type: VMAction group MIGRATE_VM with role 
type USER
2016-02-12 15:05:31,505 INFO  
[org.ovirt.engine.core.bll.scheduling.SchedulingManager] 
(org.ovirt.thread.pool-7-thread-34) [ff31b86] Candidate host ldc01omv01 
(09bb3024-170f-48a1-a78a-951a2c61c680) was filtered out by 
VAR__FILTERTYPE__INTERNAL filter Memory (correlation id: ff31b86)
2016-02-12 15:05:31,509 WARN  
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] 
(org.ovirt.thread.pool-7-thread-34) [ff31b86] Correlation ID: ff31b86, Job ID: 
7b917604-f487-43a3-9cd2-4e7f95e545cc, Call Stack: null, Custom Event ID: -1, 
Message: Migration failed, No available host found (VM: VM_RHEL7-2, Source: 
node1).


In ovirt GUI nothing strange .

How may I go further to investigate this issue ?


Thx for help.

Regards,


J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


[ovirt-users] Unit vdsmd.service has failed.

2016-02-12 Thread Jean-Pierre Ribeauville
Hi,

After rebooting my host , I got following error :

-- Unit vdsmd.service has failed.
--
-- The result is dependency.
Feb 12 10:27:05 ldc01omv01 systemd[1]: Job vdsmd.service/start failed with 
result 'dependency'.
Feb 12 10:27:05 ldc01omv01 systemd[1]: Job vdsm-network.service/start failed 
with result 'dependency'.
Feb 12 10:27:05 ldc01omv01 systemd[1]: Unit libvirtd.service entered failed 
state.
Feb 12 10:27:05 ldc01omv01 systemd[1]: libvirtd.service failed.
Feb 12 10:27:05 ldc01omv01 systemd[1]: Stopping "Auxiliary vdsm service for 
running helper functions as root"...
-- Subject: Unit supervdsmd.service has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit supervdsmd.service has begun shutting down.
Feb 12 10:27:05 ldc01omv01 daemonAdapter[5752]: Traceback (most recent call 
last):
Feb 12 10:27:05 ldc01omv01 daemonAdapter[5752]: File 
"/usr/lib64/python2.7/multiprocessing/util.py", line 268, in _run_finalizers
Feb 12 10:27:05 ldc01omv01 daemonAdapter[5752]: finalizer()
Feb 12 10:27:05 ldc01omv01 daemonAdapter[5752]: File 
"/usr/lib64/python2.7/multiprocessing/util.py", line 201, in __call__
Feb 12 10:27:05 ldc01omv01 daemonAdapter[5752]: res = 
self._callback(*self._args, **self._kwargs)
Feb 12 10:27:05 ldc01omv01 daemonAdapter[5752]: OSError: [Errno 2] No such file 
or directory: '/var/run/vdsm/svdsm.sock'


It seems that is  svdsm.sock exists :

[root@ldc01omv01 ~]# ls -l /var/run/vdsm/svdsm.sock
srwxr-xr-x. 1 vdsm kvm 0 Feb 12 10:27 /var/run/vdsm/svdsm.sock
[root@ldc01omv01 ~]#


Did I miss something ?

Thx for help.

J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


[ovirt-users] ovirt-guest-agent DBUS exception

2016-02-12 Thread Jean-Pierre Ribeauville
Hi,

When trying  to run this command : /usr/bin/python 
/usr/share/ovirt-guest-agent/ovirt-guest-agent.py

I got this error :

Exception in thread CredServer:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
self.run()
  File "/usr/share/ovirt-guest-agent/CredServer.py", line 253, in run
self._dbus = CredDBusObject()
  File "/usr/share/ovirt-guest-agent/CredServer.py", line 127, in __init__
self._name = dbus.service.BusName('org.ovirt.vdsm.Credentials', bus)
  File "/usr/lib64/python2.7/site-packages/dbus/service.py", line 131, in 
__new__
retval = bus.request_name(name, name_flags)
  File "/usr/lib64/python2.7/site-packages/dbus/bus.py", line 303, in 
request_name
'su', (name, flags))
  File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line 651, in 
call_blocking
message, timeout)
DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.128" is 
not allowed to own the service "org.ovirt.vdsm.Credentials" due to security 
policies in the configuration file

Any hint to go further in investigation  ?

Thx
Regards,

J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


[ovirt-users] Concerning CPU and Memory columns of VM screen

2016-02-05 Thread Jean-Pierre Ribeauville
Hi,


I'm trying to find a thread to retrieve ( within sources) what are the metrics 
counters used within ovirt-engine GUI displayed in CPU and Memory columns of VM 
screen.

Any idea or help is welcome.


Thx.

Regards,


J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


Re: [ovirt-users] Users Digest, Vol 52, Issue 106 " Gracefully GUEST shutown via ovirt"

2016-01-20 Thread Jean-Pierre Ribeauville
Hi, 

I install acpid on this Guest , then  vm.shutdown() leads to a graceful 
shutdown.

Thx a lot.

Regards,

J.P.

-Message d'origine-
De : users-boun...@ovirt.org [mailto:users-boun...@ovirt.org] De la part de 
users-requ...@ovirt.org
Envoyé : mardi 19 janvier 2016 18:00
À : users@ovirt.org
Objet : Users Digest, Vol 52, Issue 106

Send Users mailing list submissions to
users@ovirt.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ovirt.org/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
users-requ...@ovirt.org

You can reach the person managing the list at
users-ow...@ovirt.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Users digest..."


Today's Topics:

   1. Re:  ovirt appliance for he on master? (Yedidyah Bar David)
   2.  Sysprep and Ovirt Python SDK (Robert Parker)
   3. Re:  Gracefully GUEST shutown via ovirt Python-SDK
  (Juan Hern?ndez)


--

Message: 1
Date: Tue, 19 Jan 2016 17:59:50 +0200
From: Yedidyah Bar David 
To: Gianluca Cecchi 
Cc: users 
Subject: Re: [ovirt-users] ovirt appliance for he on master?
Message-ID:

[ovirt-users] Gracefully GUEST shutown via ovirt Python-SDK

2016-01-19 Thread Jean-Pierre Ribeauville
Hi,

When using shutdown from ovirt manager GUI  , then  on a Linux Guest , I get 
this massage :

System Administrator has initiated shutdown of this Virtual Machine. Virtual 
Machine is shutting down."
The system is going down for power-off at Tue 2016-01-19 10:32:19 CET!

When , via ovirt Python SDK , I use this  :

api = API(url=URL, username=USERNAME, password=PASSWORD, ca_file=CA_FILE)
   vm = api.vms.get(name=VM_NAME)
  print 'Stopping this VM'
  vm.stop()

Then the Guest is stopped in a 'non -gracefully » way.
Is it a way to achieve same behavior as via GUI shutdown ?

Thx for help.

Regards,



J.P. Ribeauville

P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com


* Pensez à l'environnement avant d'imprimer.



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


Re: [ovirt-users] Gracefully GUEST shutown via ovirt Python-SDK

2016-01-19 Thread Jean-Pierre Ribeauville
Hi,

By using vm.shutdown()  instead of vm.stop() , for a Windows guest then I got a 
graceful shutdown but not on my Linux Guest .

Strange isn't ?

Regards,

J.P.

De : Simon Hallam [mailto:s...@pml.ac.uk]
Envoyé : mardi 19 janvier 2016 11:38
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org
Objet : RE: [ovirt-users] Gracefully GUEST shutown via ovirt Python-SDK

Try using vm.shutdown()

From: users-boun...@ovirt.org<mailto:users-boun...@ovirt.org> 
[mailto:users-boun...@ovirt.org] On Behalf Of Jean-Pierre Ribeauville
Sent: 19 January 2016 10:30
To: users@ovirt.org<mailto:users@ovirt.org>
Subject: [ovirt-users] Gracefully GUEST shutown via ovirt Python-SDK

Hi,

When using shutdown from ovirt manager GUI  , then  on a Linux Guest , I get 
this massage :

System Administrator has initiated shutdown of this Virtual Machine. Virtual 
Machine is shutting down."
The system is going down for power-off at Tue 2016-01-19 10:32:19 CET!

When , via ovirt Python SDK , I use this  :

api = API(url=URL, username=USERNAME, password=PASSWORD, ca_file=CA_FILE)
   vm = api.vms.get(name=VM_NAME)
  print 'Stopping this VM'
  vm.stop()

Then the Guest is stopped in a 'non -gracefully » way.
Is it a way to achieve same behavior as via GUI shutdown ?

Thx for help.

Regards,



J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>
http://www.axway.com<http://www.axway.com/>



P Pensez à l'environnement avant d'imprimer.







Please visit our new website at www.pml.ac.uk<http://www.pml.ac.uk> and follow 
us on Twitter  @PlymouthMarine



Winner of the Environment & Conservation category, the Charity Awards 2014.



Plymouth Marine Laboratory (PML) is a company limited by guarantee registered 
in England & Wales, company number 4178503. Registered Charity No. 1091222. 
Registered Office: Prospect Place, The Hoe, Plymouth  PL1 3DH, UK.



This message is private and confidential. If you have received this message in 
error, please notify the sender and remove it from your system. You are 
reminded that e-mail communications are not secure and may contain viruses; PML 
accepts no liability for any loss or damage which may be caused by viruses.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Users Digest, Vol 52, Issue 87 What's going on open channel devices when migrating ...

2016-01-15 Thread Jean-Pierre Ribeauville
Hi,

Do you mean  this sleep :

 # read() returns immediately (non-blocking) if no one is
# listening on the other side of the virtio-serial port.
# So in order not to be in a tight-loop and waste CPU
# time, we just sleep for a while and hope someone will
# be there when we will awake from our nap.
time.sleep(1)


Thx.

Regards,

J..P
-Message d'origine-
De : users-boun...@ovirt.org [mailto:users-boun...@ovirt.org] De la part de 
users-requ...@ovirt.org
Envoyé : vendredi 15 janvier 2016 10:54
À : users@ovirt.org
Objet : Users Digest, Vol 52, Issue 87

Send Users mailing list submissions to
users@ovirt.org<mailto:users@ovirt.org>

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ovirt.org/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
users-requ...@ovirt.org<mailto:users-requ...@ovirt.org>

You can reach the person managing the list at
users-ow...@ovirt.org<mailto:users-ow...@ovirt.org>

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Users digest..."


Today's Topics:

   1. Re:  What's going on open channel devices whenmigrating the
  Guest ? (Vinzenz Feenstra)
   2. Re:  Scripting Guests migration , shutdown and reboot  ( from
  ovirt)  ? (Vinzenz Feenstra)


--

Message: 1
Date: Fri, 15 Jan 2016 10:51:50 +0100
From: Vinzenz Feenstra <vfeen...@redhat.com<mailto:vfeen...@redhat.com>>
To: Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>>
Cc: "users@ovirt.org<mailto:users@ovirt.org>" 
<users@ovirt.org<mailto:users@ovirt.org>>
Subject: Re: [ovirt-users] What's going on open channel devices when
migrating the Guest ?
Message-ID: 
<90f5ce30-927a-48a3-ac82-97118a132...@redhat.com<mailto:90f5ce30-927a-48a3-ac82-97118a132...@redhat.com>>
Content-Type: text/plain; charset="utf-8"


> On Jan 15, 2016, at 10:08 AM, Jean-Pierre Ribeauville 
> <jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:
>
> Hi,
>
> I?m using a channel device between host and guest to exchange datas every 20 
> seconds.
>
> On the Guest size , there is an open /dev/virtio file on which we read
> continuously what?s sent by the host.
>
> My question is the following :
> When migrating the Guest to another host ,  and the migrating back to
> the first one , the Guest software doesn?t receive anymore datas from the 
> host unless I restart the Guest software to re-open the /dev/virtio file.
>
> Is there any way to detect in the Guest that migration has been done so we 
> have to reopen  the file ?

Well you can look how we do it in the ovirt-guest-agent. But we?re not 
reopening the unix domain socket - We?re basically on read failure just 
rescheduling the read - That causes no problems after migrations - it just 
continues

Our python code for that is here: 
https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-guest-agent/VirtIoChannel.py

HTH

>
> Any hint is welcome .
>
> Thanks for help.
>
>
> J.P. Ribeauville
>
> P: +33.(0).1.47.17.20.49
> .
> Puteaux 3 Etage 5  Bureau 4
>
> jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com> 
> <mailto:jpribeauvi...@axway.com>
> http://www.axway.com <http://www.axway.com/>
>
> P Pensez ? l?environnement avant d?imprimer.
>
>
> ___
> Users mailing list
> Users@ovirt.org<mailto:Users@ovirt.org> <mailto:Users@ovirt.org>
> http://lists.ovirt.org/mailman/listinfo/users
> <http://lists.ovirt.org/mailman/listinfo/users>
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.ovirt.org/pipermail/users/attachments/20160115/6d80a2e0/attachment-0001.html>

--

Message: 2
Date: Fri, 15 Jan 2016 10:53:31 +0100
From: Vinzenz Feenstra <vfeen...@redhat.com<mailto:vfeen...@redhat.com>>
To: Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>>
Cc: "users@ovirt.org<mailto:users@ovirt.org>" 
<users@ovirt.org<mailto:users@ovirt.org>>
Subject: Re: [ovirt-users] Scripting Guests migration , shutdown and
reboot  ( from ovirt)  ?
Message-ID: 
<2fabd1e6-4148-452a-b854-7cbd84cf7...@redhat.com<mailto:2fabd1e6-4148-452a-b854-7cbd84cf7...@redhat.com>>
Content-Type: text/plain; charset="utf-8"


> On Jan 15, 2016, at 9:53 AM, Jean-Pierre Ribeauville 
> <jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:
>
> Hi,
>
> In order to test reliabilit

[ovirt-users] Scripting Guests migration , shutdown and reboot ( from ovirt) ?

2016-01-15 Thread Jean-Pierre Ribeauville
Hi,

In order to test reliability   of some of my softwares running on Guest and 
Hosts, I would like to script
from RHEV-M manager host , via command line interface, sequences for rebooting 
, migrate and shutdown/run KVM Guests.

What's your hint to achieve this ?


I cannot use virsh on the host cos theses domains are transient ones , so they 
disappear from the host  virsh list as soon as they are off.


Thx for your help.

Regards,

J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


[ovirt-users] What's going on open channel devices when migrating the Guest ?

2016-01-15 Thread Jean-Pierre Ribeauville
Hi,

I'm using a channel device between host and guest to exchange datas every 20 
seconds.

On the Guest size , there is an open /dev/virtio file on which we read 
continuously what's
sent by the host.

My question is the following :
When migrating the Guest to another host ,  and the migrating back to the first 
one ,
the Guest software doesn't receive anymore datas from the host unless I restart 
the Guest software to re-open the /dev/virtio file.

Is there any way to detect in the Guest that migration has been done so we have 
to reopen  the file ?

Any hint is welcome .

Thanks for help.


J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


Re: [ovirt-users] Users Digest, Vol 52, Issue 72 vdsm hook issues

2016-01-12 Thread Jean-Pierre Ribeauville
Hi,

What I did from the beginning of this affair :


1)  Chown and chmod of  myhook.py


2)  Don’t try to run it from shell


3)  Up to now,  I may avoid to play with custom properties.
( BTW,  do you know how , within myhook.py , one may retrieve this custom 
property
   that will indicate if the hook has to be go further or must exist without 
doing anything ?)

What’s remaining :

1) debug the .py
2) check wether, by migrating the Guest , the hook is also called on the target 
host  ( maybe you know the answer ?)

That’s all.

Regards,

J.P.

De : Gianluca Cecchi [mailto:gianluca.cec...@gmail.com]
Envoyé : mardi 12 janvier 2016 19:42
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org
Objet : Re: [ovirt-users] Users Digest, Vol 52, Issue 72 vdsm hook issues

On Tue, Jan 12, 2016 at 5:32 PM, Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:
Hi,

My vdsm hook is now invoked.

Up to me to debug it.

Thanks a lot.

J.P.


I don't understand at the end what you had to change: from your previous 
messages it resulted that all things requested were in place already
Thanks,
Gianluca
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Users Digest, Vol 52, Issue 72 vdsm hook issues

2016-01-12 Thread Jean-Pierre Ribeauville
Perfect.

Thanks.

De : Dan Yasny [mailto:dya...@gmail.com]
Envoyé : mardi 12 janvier 2016 20:51
À : Jean-Pierre Ribeauville
Cc : Gianluca Cecchi; users@ovirt.org
Objet : Re: [ovirt-users] Users Digest, Vol 52, Issue 72 vdsm hook issues



On Tue, Jan 12, 2016 at 2:35 PM, Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:
Hi,

What I did from the beginning of this affair :


1)  Chown and chmod of  myhook.py

2)  Don’t try to run it from shell

3)  Up to now,  I may avoid to play with custom properties.
( BTW,  do you know how , within myhook.py , one may retrieve this custom 
property
   that will indicate if the hook has to be go further or must exist without 
doing anything ?)


This is documented on the hooks wiki page and in github. The basic idea is to 
add a custom property to a VM with specific text, and check for it in the hook. 
If you detect it, apply hook to VM, if not - pass

What’s remaining :

1) debug the .py
2) check wether, by migrating the Guest , the hook is also called on the target 
host  ( maybe you know the answer ?)

before_vm_migrate_source and before_vm_migrate_destination - also documented in 
the wiki.

Generally, just follow an existing hook, it should have everything


That’s all.

Regards,

J.P.

De : Gianluca Cecchi 
[mailto:gianluca.cec...@gmail.com<mailto:gianluca.cec...@gmail.com>]
Envoyé : mardi 12 janvier 2016 19:42
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org<mailto:users@ovirt.org>
Objet : Re: [ovirt-users] Users Digest, Vol 52, Issue 72 vdsm hook issues

On Tue, Jan 12, 2016 at 5:32 PM, Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:
Hi,

My vdsm hook is now invoked.

Up to me to debug it.

Thanks a lot.

J.P.

I don't understand at the end what you had to change: from your previous 
messages it resulted that all things requested were in place already
Thanks,
Gianluca

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

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


[ovirt-users] vdsm hook issues

2016-01-12 Thread Jean-Pierre Ribeauville

Hi,

1)  is it enough to add a hook.py in  /usr/libexec/vdsm/hooks/before_vm_start 
directory , and then shut down and reboot a guest to
see this hook.py invoked ?

2) when running manually my hook.py, I got following error :
 ImportError: No module named hooking

Do I have to install anything to solve this issue ?

Thanks for help.


Regards,



J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


Re: [ovirt-users] vdsm hook issues

2016-01-12 Thread Jean-Pierre Ribeauville
Hi,


1°  It’s a full RHEL7 OS.
2°
vdsm-python-zombiereaper-4.16.27-0.el7.centos.noarch

vdsm-python-4.16.27-0.el7.centos.noarch

vdsm-yajsonrpc-4.16.27-0.el7.centos.noarch

vdsm-xmlrpc-4.16.27-0.el7.centos.noarch

vdsm-cli-4.16.27-0.el7.centos.noarch

vdsm-jsonrpc-java-1.0.15-1.el7.noarch

vdsm-jsonrpc-4.16.27-0.el7.centos.noarch

vdsm-4.16.27-0.el7.centos.x86_64
3°
#!/usr/bin/python

1)

2)  import os

3)  import sys

4)  import grp

5)  import pwd

6)  import traceback

7)

8)  import hooking

9)

10)   def createChannelElement(domxml):

11)   '''

12)   

13) 

14) 

15)   

16)   '''

17)

18)   channel = domxml.createElement('channel')

19)   disk.setAttribute('type', 'unix')

20)

21)   source = domxml.createElement('source')

22)   source.setAttribute('mode', 'bind')

23)

24)   # find  domain name

25)   domainame = domxml.getElementsByTagName('name')

26)

27)   source.setAttribute('path', '//var/lib/libvirt/qemu/' + domainame + 
'_omnivision_1.agent')

28)   disk.appendChild(source)

29)

30)   target = domxml.createElement('target')

31)   target.setAttribute('type', 'virtio')

32)   target.setAttribute('name', 'omnivision_1.agent')

33)   disk.appendChild(target)

34)

35)   return channel

36)

37)   try:

38)  domxml = hooking.read_domxml()

39)  devices = domxml.getElementsByTagName('devices')[0]

40)  channeldev = createChannelElement(domxml)

41)  sys.stderr.write('createChannel: adding xml: %s\n' % 
channeldev.toxml())

42)  devices.appendChild(channeldev)

43)

44)  hooking.write_domxml(domxml)

45)   except:

46)  sys.stderr.write('createChannel: [unexpected error]: %s\n' %

47)  traceback.format_exc())

48)  sys.exit(2)



Thx for help.

Regards,

J.P.


De : Dan Yasny [mailto:dya...@gmail.com]
Envoyé : mardi 12 janvier 2016 16:23
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org
Objet : Re: [ovirt-users] vdsm hook issues

1. Are you using a full OS or a node?
2. rpm -qa |grep vdsm
3. if possible, post the hook code

Thanks

On Tue, Jan 12, 2016 at 10:17 AM, Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:

Hi,

1)  is it enough to add a hook.py in  /usr/libexec/vdsm/hooks/before_vm_start 
directory , and then shut down and reboot a guest to
see this hook.py invoked ?

2) when running manually my hook.py, I got following error :
 ImportError: No module named hooking

Do I have to install anything to solve this issue ?

Thanks for help.


Regards,



J.P. Ribeauville


P: +33.(0).1.47.17.20.49<tel:%2B33.%280%29.1.47.17.20.49>
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>
http://www.axway.com<http://www.axway.com/>



P Pensez à l’environnement avant d’imprimer.




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

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


Re: [ovirt-users] vdsm hook issues

2016-01-12 Thread Jean-Pierre Ribeauville
Hi,

173078 4 -rwxrwxrwx. 1 vdsm kvm 1292 Jan 12 15:51 test_hook.py


Looks fine , isn’t ?

J.P.

De : Dan Yasny [mailto:dya...@gmail.com]
Envoyé : mardi 12 janvier 2016 17:00
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org
Objet : Re: [ovirt-users] vdsm hook issues

So, to make is work, you need to chown 36:36 and chmod +x for 36:36 of course.

As for logging, since the hook is run under the vdsm context, you can tap right 
into the logging of vdsm, or you can write your own log file, whatever you 
prefer to code.

See 
https://github.com/oVirt/vdsm/blob/master/vdsm_hooks/vmfex/before_vm_start.py 
line 197 - sys.stderr.write will actually dump into the vdsm log.

On Tue, Jan 12, 2016 at 10:55 AM, Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:
Hi,

/usr/share/vdsm/hooking.py  is present on my host.

I placed my test_hook.py  in /usr/libexec/vdsm/hooks/before_vm_start

As I want to have it invoked for every started VM ,  I don’t need custom 
property ; Am I right ?

Remains the point “make it accessible to vdsm:kvm”  what do you mean ?

BTW , are vdsm hooks log infos located in /var/log/vdsm/vdsm.log  ?

Thx for help.

J.P.

De : Dan Yasny [mailto:dya...@gmail.com<mailto:dya...@gmail.com>]
Envoyé : mardi 12 janvier 2016 16:48

À : Jean-Pierre Ribeauville
Cc : users@ovirt.org<mailto:users@ovirt.org>
Objet : Re: [ovirt-users] vdsm hook issues

OK, so the hooking module is included in the vdsm package itself. Please make 
sure you have /usr/share/vdsm/hooking.py on the host.

The manual run fails, because it is not running in the vdsm context, and so the 
modules imported are the python site-packages and not the submodules under vdsm.

To make a hook work, you need to place it on the host, make it accessible to 
vdsm:kvm, and maybe define a custom property, if you don't want the hook to 
just run on every started VM.

On Tue, Jan 12, 2016 at 10:35 AM, Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:
Hi,


1°  It’s a full RHEL7 OS.
2°
vdsm-python-zombiereaper-4.16.27-0.el7.centos.noarch

vdsm-python-4.16.27-0.el7.centos.noarch

vdsm-yajsonrpc-4.16.27-0.el7.centos.noarch

vdsm-xmlrpc-4.16.27-0.el7.centos.noarch

vdsm-cli-4.16.27-0.el7.centos.noarch

vdsm-jsonrpc-java-1.0.15-1.el7.noarch

vdsm-jsonrpc-4.16.27-0.el7.centos.noarch

vdsm-4.16.27-0.el7.centos.x86_64
3°
#!/usr/bin/python

1)

2)  import os

3)  import sys

4)  import grp

5)  import pwd

6)  import traceback

7)

8)  import hooking

9)

10)   def createChannelElement(domxml):

11)   '''

12)   

13) 

14) 

15)   

16)   '''

17)

18)   channel = domxml.createElement('channel')

19)   disk.setAttribute('type', 'unix')

20)

21)   source = domxml.createElement('source')

22)   source.setAttribute('mode', 'bind')

23)

24)   # find  domain name

25)   domainame = domxml.getElementsByTagName('name')

26)

27)   source.setAttribute('path', '//var/lib/libvirt/qemu/' + domainame + 
'_omnivision_1.agent')

28)   disk.appendChild(source)

29)

30)   target = domxml.createElement('target')

31)   target.setAttribute('type', 'virtio')

32)   target.setAttribute('name', 'omnivision_1.agent')

33)   disk.appendChild(target)

34)

35)   return channel

36)

37)   try:

38)  domxml = hooking.read_domxml()

39)  devices = domxml.getElementsByTagName('devices')[0]

40)  channeldev = createChannelElement(domxml)

41)  sys.stderr.write('createChannel: adding xml: %s\n' % 
channeldev.toxml())

42)  devices.appendChild(channeldev)

43)

44)  hooking.write_domxml(domxml)

45)   except:

46)  sys.stderr.write('createChannel: [unexpected error]: %s\n' %

47)  traceback.format_exc())

48)  sys.exit(2)



Thx for help.

Regards,

J.P.


De : Dan Yasny [mailto:dya...@gmail.com<mailto:dya...@gmail.com>]
Envoyé : mardi 12 janvier 2016 16:23
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org<mailto:users@ovirt.org>
Objet : Re: [ovirt-users] vdsm hook issues

1. Are you using a full OS or a node?
2. rpm -qa |grep vdsm
3. if possible, post the hook code

Thanks

On Tue, Jan 12, 2016 at 10:17 AM, Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:

Hi,

1)  is it enough to add a hook.py in  /usr/libexec/vdsm/hooks/before_vm_start 
directory , and then shut down and reboot a guest to
see this hook.py invoked ?

2) when running manually my hook.py, I got following error :
 ImportError: No module named hooking

Do I have to install anything to solve this issue ?

Thanks for help.


Regards,



J.P. Ribeauville


P: +33.(0).1.47.17.20.49<tel:%2B33.%280%29.1.47.17.20.49>
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>
http://www.axway.com<http://www.axway.com/>



P Pensez à l’environneme

Re: [ovirt-users] vdsm hook issues

2016-01-12 Thread Jean-Pierre Ribeauville
Hi,

/usr/share/vdsm/hooking.py  is present on my host.

I placed my test_hook.py  in /usr/libexec/vdsm/hooks/before_vm_start

As I want to have it invoked for every started VM ,  I don’t need custom 
property ; Am I right ?

Remains the point “make it accessible to vdsm:kvm”  what do you mean ?

BTW , are vdsm hooks log infos located in /var/log/vdsm/vdsm.log  ?

Thx for help.

J.P.

De : Dan Yasny [mailto:dya...@gmail.com]
Envoyé : mardi 12 janvier 2016 16:48
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org
Objet : Re: [ovirt-users] vdsm hook issues

OK, so the hooking module is included in the vdsm package itself. Please make 
sure you have /usr/share/vdsm/hooking.py on the host.

The manual run fails, because it is not running in the vdsm context, and so the 
modules imported are the python site-packages and not the submodules under vdsm.

To make a hook work, you need to place it on the host, make it accessible to 
vdsm:kvm, and maybe define a custom property, if you don't want the hook to 
just run on every started VM.

On Tue, Jan 12, 2016 at 10:35 AM, Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:
Hi,


1°  It’s a full RHEL7 OS.
2°
vdsm-python-zombiereaper-4.16.27-0.el7.centos.noarch

vdsm-python-4.16.27-0.el7.centos.noarch

vdsm-yajsonrpc-4.16.27-0.el7.centos.noarch

vdsm-xmlrpc-4.16.27-0.el7.centos.noarch

vdsm-cli-4.16.27-0.el7.centos.noarch

vdsm-jsonrpc-java-1.0.15-1.el7.noarch

vdsm-jsonrpc-4.16.27-0.el7.centos.noarch

vdsm-4.16.27-0.el7.centos.x86_64
3°
#!/usr/bin/python

1)

2)  import os

3)  import sys

4)  import grp

5)  import pwd

6)  import traceback

7)

8)  import hooking

9)

10)   def createChannelElement(domxml):

11)   '''

12)   

13) 

14) 

15)   

16)   '''

17)

18)   channel = domxml.createElement('channel')

19)   disk.setAttribute('type', 'unix')

20)

21)   source = domxml.createElement('source')

22)   source.setAttribute('mode', 'bind')

23)

24)   # find  domain name

25)   domainame = domxml.getElementsByTagName('name')

26)

27)   source.setAttribute('path', '//var/lib/libvirt/qemu/' + domainame + 
'_omnivision_1.agent')

28)   disk.appendChild(source)

29)

30)   target = domxml.createElement('target')

31)   target.setAttribute('type', 'virtio')

32)   target.setAttribute('name', 'omnivision_1.agent')

33)   disk.appendChild(target)

34)

35)   return channel

36)

37)   try:

38)  domxml = hooking.read_domxml()

39)  devices = domxml.getElementsByTagName('devices')[0]

40)  channeldev = createChannelElement(domxml)

41)  sys.stderr.write('createChannel: adding xml: %s\n' % 
channeldev.toxml())

42)  devices.appendChild(channeldev)

43)

44)  hooking.write_domxml(domxml)

45)   except:

46)  sys.stderr.write('createChannel: [unexpected error]: %s\n' %

47)  traceback.format_exc())

48)  sys.exit(2)



Thx for help.

Regards,

J.P.


De : Dan Yasny [mailto:dya...@gmail.com<mailto:dya...@gmail.com>]
Envoyé : mardi 12 janvier 2016 16:23
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org<mailto:users@ovirt.org>
Objet : Re: [ovirt-users] vdsm hook issues

1. Are you using a full OS or a node?
2. rpm -qa |grep vdsm
3. if possible, post the hook code

Thanks

On Tue, Jan 12, 2016 at 10:17 AM, Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:

Hi,

1)  is it enough to add a hook.py in  /usr/libexec/vdsm/hooks/before_vm_start 
directory , and then shut down and reboot a guest to
see this hook.py invoked ?

2) when running manually my hook.py, I got following error :
 ImportError: No module named hooking

Do I have to install anything to solve this issue ?

Thanks for help.


Regards,



J.P. Ribeauville


P: +33.(0).1.47.17.20.49<tel:%2B33.%280%29.1.47.17.20.49>
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>
http://www.axway.com<http://www.axway.com/>



P Pensez à l’environnement avant d’imprimer.




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


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


Re: [ovirt-users] Users Digest, Vol 52, Issue 72 vdsm hook issues

2016-01-12 Thread Jean-Pierre Ribeauville
Hi,

My vdsm hook is now invoked.

Up to me to debug it.

Thanks a lot.

J.P.



-Message d'origine-
De : users-boun...@ovirt.org [mailto:users-boun...@ovirt.org] De la part de 
users-requ...@ovirt.org
Envoyé : mardi 12 janvier 2016 17:04
À : users@ovirt.org
Objet : Users Digest, Vol 52, Issue 72

Send Users mailing list submissions to
users@ovirt.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ovirt.org/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
users-requ...@ovirt.org

You can reach the person managing the list at
users-ow...@ovirt.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Users digest..."


Today's Topics:

   1. Re:  vdsm hook issues (Dan Yasny)


--

Message: 1
Date: Tue, 12 Jan 2016 11:03:34 -0500
From: Dan Yasny <dya...@gmail.com>
To: Jean-Pierre Ribeauville <jpribeauvi...@axway.com>
Cc: "users@ovirt.org" <users@ovirt.org>
Subject: Re: [ovirt-users] vdsm hook issues
Message-ID:
<callxwb4_hxrq8ziqfh+mu8cdwr6enjxbr7egmdfw0pihak3...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

yup. Now add the sys.stderr.write line somewhere, with a marker you can grep 
for, and try, then check the vdsm.log file for the marker. I'd also add an 
external log dump for the development testing, and comment it out before going 
into production

On Tue, Jan 12, 2016 at 11:02 AM, Jean-Pierre Ribeauville < 
jpribeauvi...@axway.com> wrote:

> Hi,
>
>
>
> 173078 4 -rwxrwxrwx. 1 vdsm kvm 1292 Jan 12 15:51 test_hook.py
>
>
>
>
>
> Looks fine , isn?t ?
>
>
>
> J.P.
>
>
>
> *De :* Dan Yasny [mailto:dya...@gmail.com] *Envoy? :* mardi 12 janvier 
> 2016 17:00
>
> *? :* Jean-Pierre Ribeauville
> *Cc :* users@ovirt.org
> *Objet :* Re: [ovirt-users] vdsm hook issues
>
>
>
> So, to make is work, you need to chown 36:36 and chmod +x for 36:36 of 
> course.
>
>
>
> As for logging, since the hook is run under the vdsm context, you can 
> tap right into the logging of vdsm, or you can write your own log 
> file, whatever you prefer to code.
>
>
>
> See
> https://github.com/oVirt/vdsm/blob/master/vdsm_hooks/vmfex/before_vm_s
> tart.py line 197 - sys.stderr.write will actually dump into the vdsm 
> log.
>
>
>
> On Tue, Jan 12, 2016 at 10:55 AM, Jean-Pierre Ribeauville < 
> jpribeauvi...@axway.com> wrote:
>
> Hi,
>
>
>
> /usr/share/vdsm/hooking.py  is present on my host.
>
>
>
> I placed my test_hook.py  in /usr/libexec/vdsm/hooks/before_vm_start
>
>
>
> As I want to have it invoked for every started VM ,  I don?t need 
> custom property ; Am I right ?
>
>
>
> Remains the point ?make it accessible to vdsm:kvm?  what do you mean ?
>
>
>
> BTW , are vdsm hooks log infos located in /var/log/vdsm/vdsm.log  ?
>
>
>
> Thx for help.
>
>
>
> J.P.
>
>
>
> *De :* Dan Yasny [mailto:dya...@gmail.com] *Envoy? :* mardi 12 janvier 
> 2016 16:48
>
>
> *? :* Jean-Pierre Ribeauville
> *Cc :* users@ovirt.org
> *Objet :* Re: [ovirt-users] vdsm hook issues
>
>
>
> OK, so the hooking module is included in the vdsm package itself. 
> Please make sure you have /usr/share/vdsm/hooking.py on the host.
>
>
>
> The manual run fails, because it is not running in the vdsm context, 
> and so the modules imported are the python site-packages and not the 
> submodules under vdsm.
>
>
>
> To make a hook work, you need to place it on the host, make it 
> accessible to vdsm:kvm, and maybe define a custom property, if you 
> don't want the hook to just run on every started VM.
>
>
>
> On Tue, Jan 12, 2016 at 10:35 AM, Jean-Pierre Ribeauville < 
> jpribeauvi...@axway.com> wrote:
>
> Hi,
>
>
>
> 1?  It?s a full RHEL7 OS.
> 2?
> vdsm-python-zombiereaper-4.16.27-0.el7.centos.noarch
>
> vdsm-python-4.16.27-0.el7.centos.noarch
>
> vdsm-yajsonrpc-4.16.27-0.el7.centos.noarch
>
> vdsm-xmlrpc-4.16.27-0.el7.centos.noarch
>
> vdsm-cli-4.16.27-0.el7.centos.noarch
>
> vdsm-jsonrpc-java-1.0.15-1.el7.noarch
>
> vdsm-jsonrpc-4.16.27-0.el7.centos.noarch
>
> vdsm-4.16.27-0.el7.centos.x86_64
>
> 3?
>
> #!/usr/bin/python
>
> 1)
>
> 2)  import os
>
> 3)  import sys
>
> 4)  import grp
>
> 5)  import pwd
>
> 6)  import traceback
>
> 7)
>
> 8)  import hooking
>
> 9)
>
> 10)   def createChannelElement(domxml):
>
> 11)   '''
>
> 12)   
>
> 13)  pat

[ovirt-users] Retrieving KVM Guest IP adresses

2016-01-08 Thread Jean-Pierre Ribeauville
Hi,



By using libvirt API  or virsh  domifaddr, I'm not able to retrieve Guest IP 
addresses.

But , ovirt GUI   shows these addresses correctly.
I would need some hint to understand how ovirt manages to retrieve it.

Is there any interaction with Guest agent (qemu , vdsm ) ?

If I have to dive in source code , which tail's cat I have to pull  ?

Thx for help.

Regards,


J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


Re: [ovirt-users] Retrieving KVM Guest IP adresses

2016-01-08 Thread Jean-Pierre Ribeauville
Thx.

J.P.

-Message d'origine-
De : Marcin Mirecki [mailto:mmire...@redhat.com] 
Envoyé : vendredi 8 janvier 2016 13:38
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org
Objet : Re: [ovirt-users] Retrieving KVM Guest IP adresses

You might want to take a look at guestagent.py located on vdsm in:
/usr/share/vdsm/virt/guestagent.py

This handles the guestagents on the vdsm side.

Regards,
Marcin

- Original Message -
From: "Jean-Pierre Ribeauville" <jpribeauvi...@axway.com>
To: users@ovirt.org
Sent: Friday, January 8, 2016 10:53:23 AM
Subject: [ovirt-users] Retrieving KVM Guest IP adresses



Hi, 



By using libvirt API or virsh domifaddr, I’m not able to retrieve Guest IP 
addresses. 

But , ovirt GUI shows these addresses correctly. 

I would need some hint to understand how ovirt manages to retrieve it. 



Is there any interaction with Guest agent (qemu , vdsm ) ? 



If I have to dive in source code , which tail’s cat I have to pull ? 



Thx for help. 



Regards, 






J.P. Ribeauville 




P: +33.(0).1.47.17.20.49 

. 

Puteaux 3 Etage 5 Bureau 4 



jpribeauvi...@axway.com 
http://www.axway.com 






P Pensez à l’environnement avant d’imprimer. 





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


[ovirt-users] vdsm or qemu guest agent (Windows) sources

2015-12-16 Thread Jean-Pierre Ribeauville
Hi,

Where may I find  vdsm or qemu guest agent Windows sources since I want to 
check how they retrieve and open their relevant channel devices ?


Thx for help.

Regards,


J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


Re: [ovirt-users] vdsm or qemu guest agent (Windows) sources

2015-12-16 Thread Jean-Pierre Ribeauville
Hi,

It helps a lot.

Thx.

Regards,

J.P.

De : Vinzenz Feenstra [mailto:vfeen...@redhat.com]
Envoyé : mercredi 16 décembre 2015 15:24
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org
Objet : Re: [ovirt-users] vdsm or qemu guest agent (Windows) sources


On Dec 16, 2015, at 2:04 PM, Jean-Pierre Ribeauville 
<jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>> wrote:

Hi,

Where may I find  vdsm or qemu guest agent Windows sources since I want to 
check how they retrieve and open their relevant channel devices ?


The complete source code is here:

https://github.com/oVirt/ovirt-guest-agent/

This is the relevant code for opening the channel. The name of the target it 
gets from the configuration file which is for the oVirt Guest Agent 
\\.\Global\com.redhat.rhevm.vdsm
https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-guest-agent/WinFile.py

HTH




Thx for help.

Regards,


J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>
http://www.axway.com<http://www.axway.com/>



P Pensez à l’environnement avant d’imprimer.



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

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


[ovirt-users] Adding (silently) a channel device to my Guests

2015-12-09 Thread Jean-Pierre Ribeauville
HI,

I'm investigating  how to add "automatically" a channel to my Guests , in order 
to establish datas exchanges
 between a piece of code running in the host and its companion running in 
Guests.

My wish is to do that via a script without user action ( as installation 
process is doing to add qemu and vdsm channels).

May I find , within the sources ,  some scripts examples ?


BTW , is it possible to add a channel   via ovirt GUI ( as it's possible via VM 
manager GUI within host) ?

Thx for help.

Regards,


J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


Re: [ovirt-users] Failing to add NFS storage domain

2015-12-04 Thread Jean-Pierre Ribeauville
Hi,

Thx for your useful hint.

I'll go back to our sysadmin.

J.P.

De : Roel de Rooy [mailto:rder...@motto.nl]
Envoyé : mercredi 2 décembre 2015 15:41
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org
Objet : RE: Failing to add NFS storage domain

Hi,

When looking inside the mounted NFS share, can you see if the needed folders 
are created (dom_md, etc.)?
We also had a same sort of error after trying to add a new NFS share to our 
development environment.

Adding the NFS storage would fail, but when looking at the host itself, the 
share would be connected.

In our case, we did see that the folders were created with permissions set as 
the root group, instead of the kvm group.
After changing permission settings on the NFS server, the share connected 
perfectly.

Kind regards,
Roel de Rooy


Van: users-boun...@ovirt.org<mailto:users-boun...@ovirt.org> 
[mailto:users-boun...@ovirt.org] Namens Jean-Pierre Ribeauville
Verzonden: 02 December 2015 11:51
Aan: users@ovirt.org<mailto:users@ovirt.org>
Onderwerp: [ovirt-users] Failing to add NFS storage domain


Hi,



By using 3.5 ovirt , I'm trying to add  an NFS  storage domain to my datacenter.





Then  I  got following error :


Error while executing action New NFS Storage Domain: Error creating a storage 
domain





I restart sanlock service on the host ( it's a RHEL 7)  ; no positive effect.



In engine.log  found this  :


2015-12-02 11:42:17,767 INFO  
[org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] 
(ajp-/127.0.0.1:8702-8) [47ec013e] Lock Acquired to object EngineLock 
[exclusiveLocks= key: omniserv.lab.dc01.axway.int:/nfs/omnicol value: 
STORAGE_CONNECTION
, sharedLocks= ]
2015-12-02 11:42:17,771 INFO  
[org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] 
(ajp-/127.0.0.1:8702-8) [47ec013e] Running command: 
AddStorageServerConnectionCommand internal: false. Entities affected :  ID: 
aaa0----123456789aaa Type: SystemAction group 
CREATE_STORAGE_DOMAIN with role type ADMIN
2015-12-02 11:42:17,771 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] 
(ajp-/127.0.0.1:8702-8) [47ec013e] START, 
ConnectStorageServerVDSCommand(HostName = ldc01omv01, HostId = 
09bb3024-170f-48a1-a78a-951a2c61c680, storagePoolId = 
----, storageType = NFS, connectionList = [{ 
id: null, connection: omniserv.lab.dc01.axway.int:/nfs/omnicol, iqn: null, 
vfsType: null, mountOptions: null, nfsVersion: null, nfsRetrans: null, 
nfsTimeo: null };]), log id: 7651babb
2015-12-02 11:42:17,790 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] 
(ajp-/127.0.0.1:8702-8) [47ec013e] FINISH, ConnectStorageServerVDSCommand, 
return: {----=0}, log id: 7651babb
2015-12-02 11:42:17,793 INFO  
[org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] 
(ajp-/127.0.0.1:8702-8) [47ec013e] Lock freed to object EngineLock 
[exclusiveLocks= key: omniserv.lab.dc01.axway.int:/nfs/omnicol value: 
STORAGE_CONNECTION
, sharedLocks= ]
2015-12-02 11:42:17,810 INFO  
[org.ovirt.engine.core.bll.storage.AddNFSStorageDomainCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] Running command: AddNFSStorageDomainCommand 
internal: false. Entities affected :  ID: aaa0----123456789aaa 
Type: SystemAction group CREATE_STORAGE_DOMAIN with role type ADMIN
2015-12-02 11:42:17,813 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] START, 
ConnectStorageServerVDSCommand(HostName = ldc01omv01, HostId = 
09bb3024-170f-48a1-a78a-951a2c61c680, storagePoolId = 
----, storageType = NFS, connectionList = [{ 
id: ce05a2b0-cee9-44a9-845e-8a35349c7195, connection: 
omniserv.lab.dc01.axway.int:/nfs/omnicol, iqn: null, vfsType: null, 
mountOptions: null, nfsVersion: null, nfsRetrans: null, nfsTimeo: null };]), 
log id: 7c9bb0db
2015-12-02 11:42:17,828 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] FINISH, ConnectStorageServerVDSCommand, 
return: {ce05a2b0-cee9-44a9-845e-8a35349c7195=0}, log id: 7c9bb0db
2015-12-02 11:42:17,828 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStorageDomainVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] START, 
CreateStorageDomainVDSCommand(HostName = ldc01omv01, HostId = 
09bb3024-170f-48a1-a78a-951a2c61c680, 
storageDomain=StorageDomainStatic[test_nfs, 
5c4b7602-47de-47a7-a278-95b1ac7b1f8d], 
args=omniserv.lab.dc01.axway.int:/nfs/omnicol), log id: 62401241
2015-12-02 11:42:17,986 ERROR 
[org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStorageDomainVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] Failed in CreateStorageDomainVDS method
2015-12-02 11:42:17,986 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStorageDomainVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393

[ovirt-users] RE : virsh athentification failure Users Digest, Vol 51, Issue 34

2015-12-04 Thread Jean-Pierre Ribeauville
Hi,

AFA IUnderstand , 
/var/lib/libvirt/qemu/channels/ad1a8b0e-f8b6-4038-be3d-275f38e66eb3.org.qemu.guest_agent.0
  is a 
 channel used for QEMU agent , so no way to use it for private purpose.

J.P.

-Message d'origine-
De : users-boun...@ovirt.org [mailto:users-boun...@ovirt.org] De la part de 
users-requ...@ovirt.org
Envoyé : vendredi 4 décembre 2015 16:24
À : users@ovirt.org
Objet : Users Digest, Vol 51, Issue 34

Send Users mailing list submissions to
users@ovirt.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ovirt.org/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
users-requ...@ovirt.org

You can reach the person managing the list at
users-ow...@ovirt.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Users digest..."


Today's Topics:

   1.  virsh athentification failure (Jean-Pierre Ribeauville)
   2. Re:  virsh athentification failure (Nathana?l Blanchet)
   3. Re:  virsh athentification failure (Nathana?l Blanchet)


--

Message: 1
Date: Fri, 4 Dec 2015 15:18:19 +0000
From: Jean-Pierre Ribeauville <jpribeauvi...@axway.com>
To: "users@ovirt.org" <users@ovirt.org>
Cc: "libvirt-us...@redhat.com" <libvirt-us...@redhat.com>
Subject: [ovirt-users] virsh athentification failure
Message-ID:
<1051efb4d3a1704680c38ccaac5836d2929dc...@wptxmail2.ptx.axway.int>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I wrote a C program running in a KVM host.
Part of it adds a Unix Channel device in all Guests in order to  have a dialog 
from Host to Guest.
As long as my host wasn't part of an Ovirt cluster , all was running fine.


I added my host in a ovirt cluster , and then , when running the script 
creating the channel device  ( by  using  "virsh attach-device  --persistent 
-live ." ) , I got following error :

Please enter your authentication name:
Please enter your password:
error: failed to connect to the hypervisor
error: no valid connection
error: authentication failed: Failed to step SASL negotiation: -1 (SASL(-1): 
generic failure: All-whitespace username.)


What's the user/password I've to use then ?


BTW , I've seen that following channel device was  added to the Guest at its 
creation :

/var/lib/libvirt/qemu/channels/ad1a8b0e-f8b6-4038-be3d-275f38e66eb3.org.qemu.guest_agent.0

What's used for ?
I presume I cannot use for my private purpose ?

I sent this topic to ovirt  and libvirt mailing lists , cos I don't know which 
forum is the right one for this kind of subject.


Thanks for help.

Regards,


J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com<mailto:jpribeauvi...@axway.com>
http://www.axway.com<http://www.axway.com/>



P Pensez ? l'environnement avant d'imprimer.



-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.ovirt.org/pipermail/users/attachments/20151204/fc15458a/attachment-0001.html>

--

Message: 2
Date: Fri, 4 Dec 2015 16:22:31 +0100
From: Nathana?l Blanchet <blanc...@abes.fr>
Cc: "users@ovirt.org" <users@ovirt.org>
Subject: Re: [ovirt-users] virsh athentification failure
Message-ID: <5661afb7@abes.fr>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"



Le 04/12/2015 16:21, Nathana?l Blanchet a ?crit :
> user:vdsm@ovirt
> pass:shibboleth
>
> Le 04/12/2015 16:18, Jean-Pierre Ribeauville a ?crit :
>>
>> Hi,
>>
>> I wrote a C program running in a KVM host.
>>
>> Part of it adds a Unix Channel device in all Guests in order to  have 
>> a dialog from Host to Guest.
>>
>> As long as my host wasn?t part of an Ovirt cluster , all was running 
>> fine.
>>
>> I added my host in a ovirt cluster , and then , when running the 
>> script creating the channel device  ( by  using  ?virsh attach-device  
>> --persistent ?live ?..? ) , I got following error :
>>
>> /Please enter your authentication name:/
>>
>> /Please enter your password:/
>>
>> /error: failed to connect to the hypervisor/
>>
>> /error: no valid connection/
>>
>> /error: authentication failed: Failed to step SASL negotiation: -1
>> (SASL(-1): generic failure: All-whitespace username.)/
>>
>> //
>>
>> //
>>
>> What?s the user/password I?ve to use then ?
>>
>> //
>>
>> //
>>
>> BTW , I?ve seen that following channel device was  added to the Guest 
>> at its creation :
>>
>> //var/lib/libvirt/qemu/channels/ad1a8b0e-f8b6-4038-be3d-275f38e66eb3.
>> org.qemu.guest_agent.0

[ovirt-users] virsh athentification failure

2015-12-04 Thread Jean-Pierre Ribeauville
Hi,

I wrote a C program running in a KVM host.
Part of it adds a Unix Channel device in all Guests in order to  have a dialog 
from Host to Guest.
As long as my host wasn't part of an Ovirt cluster , all was running fine.


I added my host in a ovirt cluster , and then , when running the script 
creating the channel device  ( by  using  "virsh attach-device  --persistent 
-live ." ) , I got following error :

Please enter your authentication name:
Please enter your password:
error: failed to connect to the hypervisor
error: no valid connection
error: authentication failed: Failed to step SASL negotiation: -1 (SASL(-1): 
generic failure: All-whitespace username.)


What's the user/password I've to use then ?


BTW , I've seen that following channel device was  added to the Guest at its 
creation :

/var/lib/libvirt/qemu/channels/ad1a8b0e-f8b6-4038-be3d-275f38e66eb3.org.qemu.guest_agent.0

What's used for ?
I presume I cannot use for my private purpose ?

I sent this topic to ovirt  and libvirt mailing lists , cos I don't know which 
forum is the right one for this kind of subject.


Thanks for help.

Regards,


J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


Re: [ovirt-users] virsh athentification failure Users Digest Users Digest, Vol 51, Issue 35

2015-12-04 Thread Jean-Pierre Ribeauville
Hi,

I got a lot of good advices to fix my issue.

Thanks to all .


Regards,

J.P.

-Message d'origine-
De : users-boun...@ovirt.org [mailto:users-boun...@ovirt.org] De la part de 
users-requ...@ovirt.org
Envoyé : vendredi 4 décembre 2015 17:11
À : users@ovirt.org
Objet : Users Digest, Vol 51, Issue 35

Send Users mailing list submissions to
users@ovirt.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ovirt.org/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
users-requ...@ovirt.org

You can reach the person managing the list at
users-ow...@ovirt.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Users digest..."


Today's Topics:

   1. Re:  [libvirt-users] virsh athentification failure
  (Daniel P. Berrange)
   2.  RE : virsh athentification failure   Users Digest,   Vol 51,
  Issue 34 (Jean-Pierre Ribeauville)
   3. Re:  Virt-v2v import issue (Michal Skrivanek)
   4. Re:  Migration from VirtualBox to oVirt (do's and don'ts)
  (Michal Skrivanek)
   5. Re:  Virt-v2v import issue (Budur Nagaraju)
   6. Re:  [libvirt-users] virsh athentification failure
  (Michal Skrivanek)
   7. Re:  virsh athentification failure   Users Digest,Vol 51,
  Issue 34 (Michal Skrivanek)


--

Message: 1
Date: Fri, 4 Dec 2015 15:26:04 +
From: "Daniel P. Berrange" <berra...@redhat.com>
To: Jean-Pierre Ribeauville <jpribeauvi...@axway.com>
Cc: "libvirt-us...@redhat.com" <libvirt-us...@redhat.com>,
"users@ovirt.org" <users@ovirt.org>
Subject: Re: [ovirt-users] [libvirt-users] virsh athentification
failure
Message-ID: <20151204152604.ge18...@redhat.com>
Content-Type: text/plain; charset=utf-8

On Fri, Dec 04, 2015 at 03:18:19PM +, Jean-Pierre Ribeauville wrote:
> Hi,
> 
> I wrote a C program running in a KVM host.
> Part of it adds a Unix Channel device in all Guests in order to  have a 
> dialog from Host to Guest.
> As long as my host wasn't part of an Ovirt cluster , all was running fine.
> 
> 
> I added my host in a ovirt cluster , and then , when running the script 
> creating the channel device  ( by  using  "virsh attach-device  --persistent 
> -live ." ) , I got following error :
> 
> Please enter your authentication name:
> Please enter your password:
> error: failed to connect to the hypervisor
> error: no valid connection
> error: authentication failed: Failed to step SASL negotiation: -1 
> (SASL(-1): generic failure: All-whitespace username.)
> 
> 
> What's the user/password I've to use then ?

When you attach a compute node to oVirt, it sets up auth with libvirt to 
prevent admins from connecting to libvirt. If you want to oiverride that you 
need to create yourself a SASL user + password using the
saslpasswd2 command eg see

http://libvirt.org/auth.html#ACL_server_username

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|


--

Message: 2
Date: Fri, 4 Dec 2015 15:42:20 +
From: Jean-Pierre Ribeauville <jpribeauvi...@axway.com>
To: "users@ovirt.org" <users@ovirt.org>
Subject: [ovirt-users] RE : virsh athentification failure   Users
Digest, Vol 51, Issue 34
Message-ID:
<1051efb4d3a1704680c38ccaac5836d2929dc...@wptxmail2.ptx.axway.int>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

AFA IUnderstand , 
/var/lib/libvirt/qemu/channels/ad1a8b0e-f8b6-4038-be3d-275f38e66eb3.org.qemu.guest_agent.0
  is a  channel used for QEMU agent , so no way to use it for private purpose.

J.P.

-Message d'origine-
De?: users-boun...@ovirt.org [mailto:users-boun...@ovirt.org] De la part de 
users-requ...@ovirt.org
Envoy??: vendredi 4 d?cembre 2015 16:24
??: users@ovirt.org
Objet?: Users Digest, Vol 51, Issue 34

Send Users mailing list submissions to
users@ovirt.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ovirt.org/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
users-requ...@ovirt.org

You can reach the person managing the list at
users-ow...@ovirt.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Users digest..."


Today's Topics:

   1.  virsh athentification failure (Jean-Pierre Ribeauville)
   2. Re:  virsh athentification failure (Nathana?l Blanchet)
   3. Re:  virsh athentification failure (Natha

[ovirt-users] Failing to add iSCSI storage domain

2015-12-02 Thread Jean-Pierre Ribeauville
Hi,

By using 3.5 ovirt , I'm trying to add  a iSCSI storage domain to my datacenter.


When clicking on discover button , I  got following error :

No new devices were found. This may be due to either: incorrect multipath 
configuration on the Host or wrong address of the iscsi target or a failure to 
authenticate on the target device. Please consult your Storage Administrator.

I restart sanlock service on the host ( it's a RHEL 7)  ; no positive effect.

In engine.log  found this  :

...
IQNListReturnForXmlRpc [mStatus=StatusForXmlRpc [mCode=475, mMessage=Failed 
discovery of iSCSI targets: "portal=IscsiPortal(hostname=u'10.147.60.90', 
port=3260), err=(21, [], ['iscsiadm: No portals found'])"]]
2015-12-02 11:28:31,468 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand] 
(ajp-/127.0.0.1:8702-5) HostName = ldc01omv01
2015-12-02 11:28:31,468 ERROR 
[org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand] 
(ajp-/127.0.0.1:8702-5) Command DiscoverSendTargetsVDSCommand(HostName = 
ldc01omv01, HostId = 09bb3024-170f-48a1-a78a-951a2c61c680, connection={ id: 
null, connection: 10.147.60.90, iqn: null, vfsType: null, mountOptions: null, 
nfsVersion: null, nfsRetrans: null, nfsTimeo: null };) execution failed. 
Exception: VDSErrorException: VDSGenericException: VDSErrorException: Failed in 
vdscommand to DiscoverSendTargetsVDS, error = Failed discovery of iSCSI 
targets: "portal=IscsiPortal(hostname=u'10.147.60.90', port=3260), err=(21, [], 
['iscsiadm: No portals found'])"
2015-12-02 11:28:31,468 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand] 
(ajp-/127.0.0.1:8702-5) FINISH, DiscoverSendTargetsVDSCommand, log id: 3023392e
2015-12-02 11:28:31,468 ERROR 
[org.ovirt.engine.core.bll.storage.DiscoverSendTargetsQuery] 
(ajp-/127.0.0.1:8702-5) Query DiscoverSendTargetsQuery failed. Exception 
message is VdcBLLException: 
org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: 
VDSGenericException: VDSErrorException: Failed in vdscommand to 
DiscoverSendTargetsVDS, error = Failed discovery of iSCSI targets: 
"portal=IscsiPortal(hostname=u'10.147.60.90', port=3260), err=(21, [], 
['iscsiadm: No portals found'])" (Failed with error iSCSIDiscoveryError and 
code 475) : org.ovirt.engine.core.common.errors.VdcBLLException: 
VdcBLLException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: 
VDSGenericException: VDSErrorException: Failed in vdscommand to 
DiscoverSendTargetsVDS, error = Failed discovery of iSCSI targets: 
"portal=IscsiPortal(hostname=u'10.147.60.90', port=3260), err=(21, [], 
['iscsiadm: No portals found'])" (Failed with error iSCSIDiscoveryError and 
code 475): org.ovirt.engine.core.common.errors.VdcBLLException: 
VdcBLLException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: 
VDSGenericException: VDSErrorException: Failed in vdscommand to 
DiscoverSendTargetsVDS, error = Failed discovery of iSCSI targets: 
"portal=IscsiPortal(hostname=u'10.147.60.90', port=3260), err=(21, [], 
['iscsiadm: No portals found'])" (Failed with error iSCSIDiscoveryError and 
code 475)
at 
org.ovirt.engine.core.bll.VdsHandler.handleVdsResult(VdsHandler.java:117) 
[bll.jar:]
at 
org.ovirt.engine.core.bll.VDSBrokerFrontendImpl.RunVdsCommand(VDSBrokerFrontendImpl.java:33)
 [bll.jar:]
at 
org.ovirt.engine.core.bll.storage.DiscoverSendTargetsQuery.executeQueryCommand(DiscoverSendTargetsQuery.java:16)
 [bll.jar:]
at 
org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:73)
 [bll.jar:]

...



In order to check iSCSI discovering via another way, I run this command from  
ovirt manager system command prompt :

iscsiadm -m discovery -t st -p 

I got  a correct  device lists.

Thanks for help.



J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


[ovirt-users] Failing to add NFS storage domain

2015-12-02 Thread Jean-Pierre Ribeauville
Hi,



By using 3.5 ovirt , I'm trying to add  an NFS  storage domain to my datacenter.





Then  I  got following error :


Error while executing action New NFS Storage Domain: Error creating a storage 
domain





I restart sanlock service on the host ( it's a RHEL 7)  ; no positive effect.



In engine.log  found this  :


2015-12-02 11:42:17,767 INFO  
[org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] 
(ajp-/127.0.0.1:8702-8) [47ec013e] Lock Acquired to object EngineLock 
[exclusiveLocks= key: omniserv.lab.dc01.axway.int:/nfs/omnicol value: 
STORAGE_CONNECTION
, sharedLocks= ]
2015-12-02 11:42:17,771 INFO  
[org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] 
(ajp-/127.0.0.1:8702-8) [47ec013e] Running command: 
AddStorageServerConnectionCommand internal: false. Entities affected :  ID: 
aaa0----123456789aaa Type: SystemAction group 
CREATE_STORAGE_DOMAIN with role type ADMIN
2015-12-02 11:42:17,771 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] 
(ajp-/127.0.0.1:8702-8) [47ec013e] START, 
ConnectStorageServerVDSCommand(HostName = ldc01omv01, HostId = 
09bb3024-170f-48a1-a78a-951a2c61c680, storagePoolId = 
----, storageType = NFS, connectionList = [{ 
id: null, connection: omniserv.lab.dc01.axway.int:/nfs/omnicol, iqn: null, 
vfsType: null, mountOptions: null, nfsVersion: null, nfsRetrans: null, 
nfsTimeo: null };]), log id: 7651babb
2015-12-02 11:42:17,790 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] 
(ajp-/127.0.0.1:8702-8) [47ec013e] FINISH, ConnectStorageServerVDSCommand, 
return: {----=0}, log id: 7651babb
2015-12-02 11:42:17,793 INFO  
[org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand] 
(ajp-/127.0.0.1:8702-8) [47ec013e] Lock freed to object EngineLock 
[exclusiveLocks= key: omniserv.lab.dc01.axway.int:/nfs/omnicol value: 
STORAGE_CONNECTION
, sharedLocks= ]
2015-12-02 11:42:17,810 INFO  
[org.ovirt.engine.core.bll.storage.AddNFSStorageDomainCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] Running command: AddNFSStorageDomainCommand 
internal: false. Entities affected :  ID: aaa0----123456789aaa 
Type: SystemAction group CREATE_STORAGE_DOMAIN with role type ADMIN
2015-12-02 11:42:17,813 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] START, 
ConnectStorageServerVDSCommand(HostName = ldc01omv01, HostId = 
09bb3024-170f-48a1-a78a-951a2c61c680, storagePoolId = 
----, storageType = NFS, connectionList = [{ 
id: ce05a2b0-cee9-44a9-845e-8a35349c7195, connection: 
omniserv.lab.dc01.axway.int:/nfs/omnicol, iqn: null, vfsType: null, 
mountOptions: null, nfsVersion: null, nfsRetrans: null, nfsTimeo: null };]), 
log id: 7c9bb0db
2015-12-02 11:42:17,828 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] FINISH, ConnectStorageServerVDSCommand, 
return: {ce05a2b0-cee9-44a9-845e-8a35349c7195=0}, log id: 7c9bb0db
2015-12-02 11:42:17,828 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStorageDomainVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] START, 
CreateStorageDomainVDSCommand(HostName = ldc01omv01, HostId = 
09bb3024-170f-48a1-a78a-951a2c61c680, 
storageDomain=StorageDomainStatic[test_nfs, 
5c4b7602-47de-47a7-a278-95b1ac7b1f8d], 
args=omniserv.lab.dc01.axway.int:/nfs/omnicol), log id: 62401241
2015-12-02 11:42:17,986 ERROR 
[org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStorageDomainVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] Failed in CreateStorageDomainVDS method
2015-12-02 11:42:17,986 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStorageDomainVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] Command 
org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStorageDomainVDSCommand return 
value
StatusOnlyReturnForXmlRpc [mStatus=StatusForXmlRpc [mCode=351, mMessage=Error 
creating a storage domain: (u'storageType=1, 
sdUUID=5c4b7602-47de-47a7-a278-95b1ac7b1f8d, domainName=test_nfs, domClass=1, 
typeSpecificArg=omniserv.lab.dc01.axway.int:/nfs/omnicol domVersion=3',)]]
2015-12-02 11:42:17,986 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStorageDomainVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] HostName = ldc01omv01
2015-12-02 11:42:17,986 ERROR 
[org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStorageDomainVDSCommand] 
(ajp-/127.0.0.1:8702-6) [66393037] Command 
CreateStorageDomainVDSCommand(HostName = ldc01omv01, HostId = 
09bb3024-170f-48a1-a78a-951a2c61c680, 
storageDomain=StorageDomainStatic[test_nfs, 
5c4b7602-47de-47a7-a278-95b1ac7b1f8d], 
args=omniserv.lab.dc01.axway.int:/nfs/omnicol) execution failed. Exception: 
VDSErrorException: VDSGenericException: VDSErrorException: Failed to 
CreateStorageDomainVDS, error = Error creating a storage domain: 
(u'storageType=1, 

Re: [ovirt-users] . Failing to add iSCSI storage domain Users Digest, Vol 51, Issue 16

2015-12-02 Thread Jean-Pierre Ribeauville
Hi,

Failure reason was the following : the initiator IQN wasn't declared on the 
iSCSI server.

Sorry for disturbing for nothing.

Regards,

J.P.

-Message d'origine-
De : users-boun...@ovirt.org [mailto:users-boun...@ovirt.org] De la part de 
users-requ...@ovirt.org
Envoyé : mercredi 2 décembre 2015 11:42
À : users@ovirt.org
Objet : Users Digest, Vol 51, Issue 16

Send Users mailing list submissions to
users@ovirt.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ovirt.org/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
users-requ...@ovirt.org

You can reach the person managing the list at
users-ow...@ovirt.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Users digest..."


Today's Topics:

   1.  Failing to add iSCSI storage domain (Jean-Pierre Ribeauville)
   2. Re:  HA cluster (Simone Tiraboschi)


--

Message: 1
Date: Wed, 2 Dec 2015 10:41:11 +0000
From: Jean-Pierre Ribeauville <jpribeauvi...@axway.com>
To: "users@ovirt.org" <users@ovirt.org>
Subject: [ovirt-users] Failing to add iSCSI storage domain
Message-ID:
<1051efb4d3a1704680c38ccaac5836d2929dc...@wptxmail2.ptx.axway.int>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

By using 3.5 ovirt , I'm trying to add  a iSCSI storage domain to my datacenter.


When clicking on discover button , I  got following error :

No new devices were found. This may be due to either: incorrect multipath 
configuration on the Host or wrong address of the iscsi target or a failure to 
authenticate on the target device. Please consult your Storage Administrator.

I restart sanlock service on the host ( it's a RHEL 7)  ; no positive effect.

In engine.log  found this  :

...
IQNListReturnForXmlRpc [mStatus=StatusForXmlRpc [mCode=475, mMessage=Failed 
discovery of iSCSI targets: "portal=IscsiPortal(hostname=u'10.147.60.90', 
port=3260), err=(21, [], ['iscsiadm: No portals found'])"]]
2015-12-02 11:28:31,468 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand] 
(ajp-/127.0.0.1:8702-5) HostName = ldc01omv01
2015-12-02 11:28:31,468 ERROR 
[org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand] 
(ajp-/127.0.0.1:8702-5) Command DiscoverSendTargetsVDSCommand(HostName = 
ldc01omv01, HostId = 09bb3024-170f-48a1-a78a-951a2c61c680, connection={ id: 
null, connection: 10.147.60.90, iqn: null, vfsType: null, mountOptions: null, 
nfsVersion: null, nfsRetrans: null, nfsTimeo: null };) execution failed. 
Exception: VDSErrorException: VDSGenericException: VDSErrorException: Failed in 
vdscommand to DiscoverSendTargetsVDS, error = Failed discovery of iSCSI 
targets: "portal=IscsiPortal(hostname=u'10.147.60.90', port=3260), err=(21, [], 
['iscsiadm: No portals found'])"
2015-12-02 11:28:31,468 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand] 
(ajp-/127.0.0.1:8702-5) FINISH, DiscoverSendTargetsVDSCommand, log id: 3023392e
2015-12-02 11:28:31,468 ERROR 
[org.ovirt.engine.core.bll.storage.DiscoverSendTargetsQuery] 
(ajp-/127.0.0.1:8702-5) Query DiscoverSendTargetsQuery failed. Exception 
message is VdcBLLException: 
org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: 
VDSGenericException: VDSErrorException: Failed in vdscommand to 
DiscoverSendTargetsVDS, error = Failed discovery of iSCSI targets: 
"portal=IscsiPortal(hostname=u'10.147.60.90', port=3260), err=(21, [], 
['iscsiadm: No portals found'])" (Failed with error iSCSIDiscoveryError and 
code 475) : org.ovirt.engine.core.common.errors.VdcBLLException: 
VdcBLLException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: 
VDSGenericException: VDSErrorException: Failed in vdscommand to 
DiscoverSendTargetsVDS, error = Failed discovery of iSCSI targets: 
"portal=IscsiPortal(hostname=u'10.147.60.90', port=3260), err=(21, [], 
['iscsiadm: No portals found'])" (Failed with error iSCSIDiscoveryError and 
code 475): org.ovirt.engine.core.commo
 n.errors.VdcBLLException: VdcBLLException: 
org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: 
VDSGenericException: VDSErrorException: Failed in vdscommand to 
DiscoverSendTargetsVDS, error = Failed discovery of iSCSI targets: 
"portal=IscsiPortal(hostname=u'10.147.60.90', port=3260), err=(21, [], 
['iscsiadm: No portals found'])" (Failed with error iSCSIDiscoveryError and 
code 475)
at 
org.ovirt.engine.core.bll.VdsHandler.handleVdsResult(VdsHandler.java:117) 
[bll.jar:]
at 
org.ovirt.engine.core.bll.VDSBrokerFrontendImpl.RunVdsCommand(VDSBrokerFrontendImpl.java:33)
 [bll.jar:]
at 
org.ovirt.engine.core.bll.storage.DiscoverSendTargetsQuery.executeQueryCommand(DiscoverSendTargetsQuery.java:16)
 [bll.jar:]
at 
org.ovirt.engine.core.bll.Queries

Re: [ovirt-users] Error when trying to retrieve cluster, hosts via ovirt API

2015-11-26 Thread Jean-Pierre Ribeauville
Hi,

I'll  follow your hint.

Thx a lot.

J.P.

-Message d'origine-
De : Juan Hernández [mailto:jhern...@redhat.com] 
Envoyé : jeudi 26 novembre 2015 15:26
À : Jean-Pierre Ribeauville; Karli Sjöberg
Cc : users@ovirt.org
Objet : Re: [ovirt-users] Error when trying to retrieve cluster, hosts via 
ovirt API

On 11/25/2015 11:13 AM, Jean-Pierre Ribeauville wrote:
> H,
> 
> Thanks for infos.
> 
> BTW,  as I need to retrieve cluster and datacenter to which my host belongs   
> within a software running on the host , I use a Python script 
> interacting with the ovirt-engine ; is there another way to get these  infos 
> "locally" on the host itself ?
> 

I'm not aware of any way to do that, I'd suggest that you stick to
interacting with the engine for that.

> 
> -Message d'origine-
> De : Juan Hernández [mailto:jhern...@redhat.com] 
> Envoyé : mercredi 18 novembre 2015 19:10
> À : Jean-Pierre Ribeauville; Karli Sjöberg
> Cc : users@ovirt.org
> Objet : Re: [ovirt-users] Error when trying to retrieve cluster, hosts via 
> ovirt API
> 
> On 11/18/2015 12:22 PM, Jean-Pierre Ribeauville wrote:
>> Hi,
>>
>> You were right .
>>
>> By setting correct URL and correct certificate file location , it's working.
>>
>> If I well understand , as this certificate file has to be on the 
>> client side , isn't a point if failure ?
>>
> 
> The certificate is needed to secure the SSL communication. You can do without 
> it, adding "insecure=True" to the constructor of the API object, but then the 
> identity of the server could be forged and you won't notice.
> 
>>
>> For example , for a cluster , it's possible to retrieve hosts 
>> belonging to the cluster via this call:
>>
>> hostoncluster = api.clusters.get(id=api.hosts.get(obj.name
>> <http://obj.name>).get_cluster().get_id()).get_name()
>>
> 
> That should work, but when you are doing this kind of query it is usually 
> better to let the server do the search. You can achieve that using the same 
> query language that is used in the GUI search bar. For example, in the GUI 
> search bar you can type "Hosts: cluster=mycluster".
> With the SDK you can do the same, using the "list" method and the "query" 
> parameter:
> 
>   hosts = api.hosts.list(query="cluster=mycluster")
>   for host in hosts:
> print(host.get_name())
> 
>>
>> How may I know list of available "fields"  for  host, cluster, 
>> datacenters and so on .. .
>>
> 
> You can open the "params.py" file
> (/usr/lib/python2.7/site-packages/ovirtsdk/xml/params.py if you are using the 
> RPM packags) and look for the corrsponding class: Host, Cluster, DataCenter 
> etc. There you will see all the available "get_..."
> methods.
> 
>>
>> Thanks for help.
>>
>>  
>>
>> J.P.
>>
>>  
>>
>> *De :*Karli Sjöberg [mailto:karli.sjob...@slu.se] *Envoyé :* mardi 17 
>> novembre 2015 17:52 *À :* Jean-Pierre Ribeauville *Cc :* 
>> users@ovirt.org *Objet :* Re: [ovirt-users] Error when trying to 
>> retrieve cluster, hosts via ovirt API
>>
>>  
>>
>>
>> Den 17 nov. 2015 5:30 em skrev Jean-Pierre Ribeauville 
>> <jpribeauvi...@axway.com <mailto:jpribeauvi...@axway.com>>:
>>>
>>> Hi,
>>>
>>>  
>>>
>>> By running python example got here ( :
>> http://website-humblec.rhcloud.com/ovirt-find-hosts-clusters-vm-runnin
>> g-status-ids-storage-domain-details-ovirt-dc-pythonovirt-sdk-part-3)
>>
>>> and modified with my connection  parameters, I got following error :
>>>
>>>  
>>>
>>>  
>>>
>>> Unexpected error: [ERROR]::oVirt API connection failure, (77, '')
>>>
>>>  
>>>
>>> How may I get error  codes meanings ?
>>
>> I don't know the meaning but I saw that APIURL was wrong, it should be:
>>
>> APIURL = "https://${ENGINE_ADDRESS}/ovirt-engine/api
>> <https://$%7bENGINE_ADDRESS%7d/ovirt-engine/api>"
>>
>> Could you correct that and try again?
>>
>> /K
>>
>>>
>>>  
>>>
>>> Thanks for help.
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>> J.P. Ribeauville
>>>
>>>  
>>>
>>> P: +33.(0).1.47.17.20.49
>>>
>>> .
>>>
>>> Puteaux 3 Etage 5  Bureau 4
>>>
>>>  
>>>
>>> jpribeauvi...@axway.com <mailto:jpribeauvi...@axway.com> 
>>> http://www.axway.com
>>>
>>>  
>>>
>>>  
>>>
>>> P Pensez à l'environnement avant d'imprimer.
>>>
>>>  
>>>
>>>  
>>
>>
>>
>> ___
>> Users mailing list
>> Users@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
> 
> 
> --
> 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
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 
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
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Error when trying to retrieve cluster, hosts via ovirt API

2015-11-17 Thread Jean-Pierre Ribeauville
Hi,

By running python example got here ( : 
http://website-humblec.rhcloud.com/ovirt-find-hosts-clusters-vm-running-status-ids-storage-domain-details-ovirt-dc-pythonovirt-sdk-part-3)
and modified with my connection  parameters, I got following error :


Unexpected error: [ERROR]::oVirt API connection failure, (77, '')

How may I get error  codes meanings ?

Thanks for help.



J.P. Ribeauville


P: +33.(0).1.47.17.20.49
.
Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


[ovirt-users] Running an ovirt phyton scrit on a newly RHEL7 installed system

2015-09-15 Thread Jean-Pierre Ribeauville
Hi,

I'm trying to retrieve datacenters clusters hosts and vms  by using ovirt 
python script needing some imports :

import sys
from ovirtsdk.api import API
from ovirtsdk.xml import params
from threading import Thread
import time
import logging


Then I  got following error :


Ø  python test2.py
Traceback (most recent call last):
  File "test2.py", line 32, in 
from ovirtsdk.api import API
ImportError: No module named ovirtsdk.api

As I run it on a "fresh install" rhel7 server ( python has been added), I'm 
wondering what's the minimum packages list I've to install
on this machine to be able to run this script ?  ( I run it correctly on the 
system where the ovirt engine is installed)

Thanks.

Regards,



J.P. Ribeauville


P: +33.(0).1.47.17.27.87


Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


Re: [ovirt-users] Running an ovirt phyton scrit on a newly RHEL7 installed system

2015-09-15 Thread Jean-Pierre Ribeauville
Hi,

You are totally right.

It's O.K. now.

Thanks for help.

J.P. Ribeauville

-Message d'origine-
De : Juan Hernández [mailto:jhern...@redhat.com] 
Envoyé : mardi 15 septembre 2015 14:04
À : Jean-Pierre Ribeauville; users@ovirt.org
Objet : Re: [ovirt-users] Running an ovirt phyton scrit on a newly RHEL7 
installed system

On 09/15/2015 11:02 AM, Jean-Pierre Ribeauville wrote:
> Hi,
> 
>  
> 
> I'm trying to retrieve datacenters clusters hosts and vms  by using 
> ovirt python script needing some imports :
> 
>  
> 
> /import sys/
> 
> /from ovirtsdk.api import API/
> 
> /from ovirtsdk.xml import params/
> 
> /from threading import Thread/
> 
> /import time/
> 
> /import logging/
> 
>  
> 
>  
> 
> Then I  got following error :
> 
>  
> 
> Ø  python test2.py
> 
> /Traceback (most recent call last):/
> 
> /  File "test2.py", line 32, in /
> 
> /from ovirtsdk.api import API/
> 
> /ImportError: No module named ovirtsdk.api/
> 
>  
> 
> As I run it on a "fresh install" rhel7 server ( python has been 
> added), I'm wondering what's the minimum packages list I've to install 
> on this machine to be able to run this script ?  ( I run it correctly 
> on the system where the ovirt engine is installed)
> 

As you are using a fresh install of RHEL 7 you won't probably have the oVirt 
repositories configured yet, so you will need to configure them:

  # yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release35.rpm

The you need to install the ovirt-engine-sdk-python package:

  # yum install ovirt-engine-sdk-python

--
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
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] using RHEL6/7 server as host ?

2015-09-10 Thread Jean-Pierre Ribeauville
Hi,

Ovirt quick start guide mentions this :

Install Hosts
After you have installed the oVirt Engine, install the hosts to run your 
virtual machines. In oVirt, you can use either oVirt Node, Fedora or CentOS as 
hosts.

Is it O.K. to use a RHEL6 or 7 server as  host to run Guest VMs  ?

I assume that's ovirt engine is not installed on one of these hosts  ( it's 
better to use a dedicated machine) ?

Thx


J.P. Ribeauville


P: +33.(0).1.47.17.27.87


Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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


Re: [ovirt-users] datacenter and cluster UUID retrieving .....

2015-09-10 Thread Jean-Pierre Ribeauville
Hi,

Thanks .
I'll have a look to that.

Regards,

J.P.

-Message d'origine-
De : Adam Litke [mailto:ali...@redhat.com] 
Envoyé : mercredi 9 septembre 2015 17:16
À : Jean-Pierre Ribeauville
Cc : users@ovirt.org
Objet : Re: [ovirt-users] datacenter and cluster UUID retrieving .

On 08/09/15 10:45 +, Jean-Pierre Ribeauville wrote:
>Hi,
>
>I'm not sure it's the right place to post following question :
>
>By using a RHEV Cluster , how may I , programmatically within a node of the 
>cluster , retrieve relevant Datacenter and Cluster UUID ?

I think the only way would be to write a script using the oVirt SDK.
See http://www.ovirt.org/Python-sdk for some examples.

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


[ovirt-users] datacenter and cluster UUID retrieving .....

2015-09-08 Thread Jean-Pierre Ribeauville
Hi,

I'm not sure it's the right place to post following question :

By using a RHEV Cluster , how may I , programmatically within a node of the 
cluster , retrieve relevant Datacenter and Cluster UUID ?


Thanks for help.

Regards,

J.P. Ribeauville


P: +33.(0).1.47.17.27.87


Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



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