Re: [ovirt-users] ovirt-shell backup

2017-03-23 Thread Juan Hernández
On 03/23/2017 02:40 PM, Marcin Kruk wrote:
> Hello is it possible to execute below actions from the ovirth-shell:
> 1. Make snapshot
> ( ovirt-shell -E 'add snapshot --parent-vm-name  --description
>  )
> 2. Make clone from snaphot above
> ( ? )
> 3. Export clone
> ( ? )
> 

The ovirt-shell tools is deprecated since version 4.0 of oVirt, and will
be removed in version 4.2. I suggest that you avoid using it, and
consider using the Ansible modules:

  http://docs.ansible.com/ansible/list_of_cloud_modules.html#ovirt

Or one of the SDKs:

  Python: https://github.com/oVirt/ovirt-engine-sdk
  Ruby: https://github.com/oVirt/ovirt-engine-sdk-ruby
  Java: https://github.com/oVirt/ovirt-engine-sdk-java

In particular these SDK examples may be of interest:


https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/add_vm_snapshot.py


https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/clone_vm_from_snapshot.py

If you still want to use ovirt-shell, then it should be something like this:

  add snapshot --parent-vm-name myvm --description mysnap

That will return the snapshot data, including the id, take note of it,
and then:

  add vm --name mynewvm --snapshots-snapshot
"snapshot.id=the_id_of_the_snapshot" --cluster-name mycluster

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


Re: [ovirt-users] ovirt-shell -- cannot even get started

2017-03-16 Thread Juan Hernández
On 03/16/2017 09:48 PM, Phil Meyer wrote:
> This is either some very obscure syntax, or it may not be working.
> 
> Difficult to tell, since the error message seems to be generic:
> 
> ...
> 
>    ERROR
> =
> "https://engine-tst/ovirt-engine/api"; is invalid url format, valid
> format is http[s]://server:port/path, where path is usually
> "ovirt-engine/api" or, for older versions of the engine, just "api".
>  
> 
> ...
> 
> That error is reported no matter where it is run from, and no matter what
> 
> combination of manual or automated interaction is used.
> 
> 
> It should not be this hard.
> 
> 42 different combinations were tried.
> 
> 
> In one instance when using localhost as the hostname, it actually asked for
> 
> the certificate first, and then gave me the same error as above.
> 
> 
> Lets just say that the command line was very familiar to me when Larry Wall
> 
> wrote the Configure script (that was before the GNU configure scripts).
> 
> 
> A strait up actual example that works would be nice, or an explanation of
> 
> prerequisites, if there are any.  None are stated.
> 
> 
> There is lots of mention of port numbers, but no actual port numbers
> suggested.
> 
> Does not the ovirt-shell talk to the web server at port 443 if https is
> specified?
> 
> 
> The lsof command does not show any listeners that seem likely as a cli
> interface:
> 
> -> sudo lsof  -i | grep -i listen
> systemd   1root   42u  IPv6   9030  0t0  TCP
> *:sunrpc (LISTEN)
> systemd   1root   43u  IPv4   9031  0t0  TCP
> *:sunrpc (LISTEN)
> ovirt-ima   582root5u  IPv4   9196  0t0  TCP *:54323
> (LISTEN)
> ovirt-web   954   ovirt4u  IPv4  14915  0t0  TCP
> *:synchronet-db (LISTEN)
> httpd   959root4u  IPv6  18622  0t0  TCP *:http
> (LISTEN)
> httpd   959root6u  IPv6  18630  0t0  TCP *:https
> (LISTEN)
> sshd962 ovirt-vmconsole3u  IPv4  17902  0t0  TCP
> *:EtherNet/IP-1 (LISTEN)
> sshd962 ovirt-vmconsole4u  IPv6  17904  0t0  TCP
> *:EtherNet/IP-1 (LISTEN)
> sshd   1048root3u  IPv4  19474  0t0  TCP *:ssh
> (LISTEN)
> sshd   1048root4u  IPv6  19477  0t0  TCP *:ssh
> (LISTEN)
> postgres   1237postgres3u  IPv4  19552  0t0  TCP
> *:postgres (LISTEN)
> postgres   1237postgres4u  IPv6  19553  0t0  TCP
> *:postgres (LISTEN)
> java   3042   ovirt  371u  IPv6  20711  0t0  TCP
> localhost:8702 (LISTEN)
> java   3042   ovirt  389u  IPv6  24722  0t0  TCP
> localhost:8706 (LISTEN)
> 
> 
> And yes, the unfamiliar ones were tried. :)
> 
> 
> The last straw was when a packet sniffer failed to capture ANY traffic
> related to these
> 
> attempts.  Apparently the ovirt-shell command fails before even
> attempting a connection.
> 

This is a bug in the CLI:

  Invalid URL format when there are no dots in the host name
  https://bugzilla.redhat.com/1186365

The problem is that the CLI tries to verify the validity of the URL, and
it expects at least one dot in the host name:

  engine-tst.something

It was decided to not fix that bug because the CLI is deprecated since
version 4.0 of the engine, and will be removed in version 4.2.

As a workaround, try to use a fully qualified host name, which will most
probably include a dot anyhow. And you will need that fully qualified
host name anyhow, if you want to safely verify the certificate of the
server. See the bug for details. Alternatively you can use the IP
address directly.

As I said, the CLI is deprecated, so if you are starting from scratch,
I'd suggest you avoid it completely. Use one of the Ansible modules:

  https://docs.ansible.com/ansible/list_of_cloud_modules.html#ovirt

Or one of the SDKs:

  Python:
  https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk

  Ruby:
  https://github.com/oVirt/ovirt-engine-sdk-ruby/tree/master/sdk

  Java:
  https://github.com/oVirt/ovirt-engine-java/tree/master/sdk

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


Re: [ovirt-users] [ovirt-shell] update hostnic/nic ???

2017-02-02 Thread Nathanaël Blanchet
Hi I managed to create my dhcp hostnic thanks to the python script, but 
the same with ovirt-shell:


 * [oVirt shell (connected) # add networkattachment --parent-host-name
   taal --network-name brv106 --host_nic-name enp2s0f0 => OK but I
   didn't find any way to add boot protocol to DHCP

 * [oVirt shell (connected)]# add networkattachment --parent-host-name
   taal --network-name brv106 --host_nic-name enp2s0f0
   --ip_address_assignments-ip_address_assignment dhcp

  === ERROR 
=
 "dhcp" is invalid segment at option 
"--ip_address_assignments-ip_address_assignment".


 * [oVirt shell (connected)]# update nic enp3s0f0 --parent-host-name
   zonda --network-name brv106 --boot_protocol dhcp

  === ERROR 
=

  status: 405
  reason: Method Not Allowed
  detail:


Should be much simpler via CLI to do such a thing, what's wrong there?

Le 15/01/2016 à 12:20, Juan Hernández a écrit :

On 01/14/2016 01:28 PM, Bloemen, Jurriën wrote:

On 14-01-16 12:16, Juan Hernández wrote:

On 01/14/2016 11:24 AM, Bloemen, Jurriën wrote:

Hi,

First I created a bonding interface:

# add nic --parent-host-name server01 --name bond0 --network-name
VLAN602 --bonding-slaves-host_nic host_nic.name=eno1
--bonding-slaves-host_nic host_nic.name=eno2

This works great but no IP is set on VLAN602.

Then I'm trying to add an ip address to a network with the following
command:

# update hostnic --parent-host-name server01 --network-name VLAN602
--boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

==
ERROR

   
wrong number of arguments, try 'help update' for help.



Looking at this document
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6-Beta/html/RHEVM_Shell_Guide/nic.html
I need to use "nic" instead of "hostnic" but then I don't have the
options to say this is a --parent-host-name. Only VM related command
options.

So I think the documentation is behind.

Can somebody help me with what the command is to add a IP to a
VLAN/Network for a host?



The command should be like this:

   # update nic bond0 --parent-host-name server01 --network-name VLAN602
--boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

Note that the it is "nic" instead of "hostnic" and that you need to
specify the name of that NIC, in this case "bond0".

The command will work if you type it like that, but auto-completion
won't work. This is a bug in the CLI, indirectly caused by the fact that
the name of the URL segment used in the RESTAPI is "nics" (from
/hosts/{host:id}/*nics*) but the name of the XML schema complex type is
"HostNIC".


Thanks! That works!

Another question:

Now I got the message that my network is out-of-sync. How can i force
within the ovirt-shell that it syncs the networks?

hmz pressed sent by accident

What I want to say is:

Now I got the message that my network is out-of-sync. How can i force
within the ovirt-shell that it syncs the networks?
Because when I press "Sync All Networks" the IP address disappears

But when I check the box "Sync Network" within the VLAN602 options it
gets pushed to the host.

Is there a difference between the both? And how do I run both via
ovirt-shell?


The "sync network" operation is not supported by ovirt-shell.

If you want to set the network configuration, and make it persistent,
then you will need to use one of the "setupNetworks" operations. These
aren't fully usable with ovirt-shell either, so if you want to use it
you will need to use directly the API or one of the SDKs. For example,
lets assume that you have a host with network interfaces eth0, eth1, and
eth2, and that you want to configure eth1 and eth2 as a bond, to put
your VLAN and IP address on top. You can do that with a script like this:

---8<---
#!/bin/sh -ex

url="https://engine.example.com/ovirt-engine/api";
user="admin@internal"
password="..."

curl \
--verbose \
--cacert /etc/pki/ovirt-engine/ca.pem \
--user "${user}:${password}" \
--request POST \
--header "Content-Type: application/xml" \
--header "Accept: application/xml" \
--data '

   
 
   
 VLAN602
   
   
 bond0
   
   
 static
 
   
 
   
 
   
   
 
   bo

Re: [ovirt-users] ovirt-shell show vm doesn't show all vm properties

2016-10-11 Thread Nathanaël Blanchet

It works like a charm thanks


Le 11/10/2016 à 17:58, Juan Hernández a écrit :

On 10/11/2016 03:47 PM, Nathanaël Blanchet wrote:

Hi,

since ovirt 4.0, I can't use "--all_content" combined with "show vm"
anymore. The option si still available with the key tab, but when
applying, ovirt-shell complains : option "--all_content" is not supported.

I wrote some script using the console-enabled  option, how can I
retrieve this now?


This is a bug in the CLI, I opened the following BZ to track it:

   The "--all_content true" option isn't accepted
   https://bugzilla.redhat.com/1383735

It will be fixed by this patch:

   cli: Base should be None when there is no base
   https://gerrit.ovirt.org/65371

That will hopefully be included in release 4.0.6 of the oVirt project.


Le 22/04/2016 à 11:39, Juan Hernández a écrit :

On 04/22/2016 10:14 AM, Nathanaël Blanchet wrote:

Hi all,

I'd like to find any vms with some defined properties like
(console-enabled or serial_number-policy for example) with ovirt-shell
-E "show vm name", but I can't find all information that I can get with
edit vm popupin the UI.
I belevied these kind of properties were unvailable because the flag was
by default to false, but after updating the flag to true, it is still
not visible. Does it exist an extended way to get those feature with
ovirt-shell?
Thank you.


The console information isn't reported by default because it requires an
additional query to the database, which is expensive, and not useful in
general. You can enable these expensive items using the "all_content"
parameter:

$ ovirt-shell "show vm name --all_content true"

The serial number properties are only present if there is one serial
number policy enabled.





--
Nathanaël Blanchet

Supervision réseau
Pôle Infrastrutures Informatiques
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5   
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanc...@abes.fr

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


Re: [ovirt-users] ovirt-shell show vm doesn't show all vm properties

2016-10-11 Thread Juan Hernández
On 10/11/2016 03:47 PM, Nathanaël Blanchet wrote:
> Hi,
> 
> since ovirt 4.0, I can't use "--all_content" combined with "show vm" 
> anymore. The option si still available with the key tab, but when 
> applying, ovirt-shell complains : option "--all_content" is not supported.
> 
> I wrote some script using the console-enabled  option, how can I 
> retrieve this now?
> 

This is a bug in the CLI, I opened the following BZ to track it:

  The "--all_content true" option isn't accepted
  https://bugzilla.redhat.com/1383735

It will be fixed by this patch:

  cli: Base should be None when there is no base
  https://gerrit.ovirt.org/65371

That will hopefully be included in release 4.0.6 of the oVirt project.

> 
> Le 22/04/2016 à 11:39, Juan Hernández a écrit :
>> On 04/22/2016 10:14 AM, Nathanaël Blanchet wrote:
>>> Hi all,
>>>
>>> I'd like to find any vms with some defined properties like
>>> (console-enabled or serial_number-policy for example) with ovirt-shell
>>> -E "show vm name", but I can't find all information that I can get with
>>> edit vm popupin the UI.
>>> I belevied these kind of properties were unvailable because the flag was
>>> by default to false, but after updating the flag to true, it is still
>>> not visible. Does it exist an extended way to get those feature with
>>> ovirt-shell?
>>> Thank you.
>>>
>> The console information isn't reported by default because it requires an
>> additional query to the database, which is expensive, and not useful in
>> general. You can enable these expensive items using the "all_content"
>> parameter:
>>
>>$ ovirt-shell "show vm name --all_content true"
>>
>> The serial number properties are only present if there is one serial
>> number policy enabled.
>>
> 


-- 
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] ovirt-shell show vm doesn't show all vm properties

2016-10-11 Thread Nathanaël Blanchet

Hi,

since ovirt 4.0, I can't use "--all_content" combined with "show vm" 
anymore. The option si still available with the key tab, but when 
applying, ovirt-shell complains : option "--all_content" is not supported.


I wrote some script using the console-enabled  option, how can I 
retrieve this now?



Le 22/04/2016 à 11:39, Juan Hernández a écrit :

On 04/22/2016 10:14 AM, Nathanaël Blanchet wrote:

Hi all,

I'd like to find any vms with some defined properties like
(console-enabled or serial_number-policy for example) with ovirt-shell
-E "show vm name", but I can't find all information that I can get with
edit vm popupin the UI.
I belevied these kind of properties were unvailable because the flag was
by default to false, but after updating the flag to true, it is still
not visible. Does it exist an extended way to get those feature with
ovirt-shell?
Thank you.


The console information isn't reported by default because it requires an
additional query to the database, which is expensive, and not useful in
general. You can enable these expensive items using the "all_content"
parameter:

   $ ovirt-shell "show vm name --all_content true"

The serial number properties are only present if there is one serial
number policy enabled.



--
Nathanaël Blanchet

Supervision réseau
Pôle Infrastrutures Informatiques
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5   
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanc...@abes.fr

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


Re: [ovirt-users] oVirt-shell command to move a disk

2016-08-16 Thread Jure Kranjc

Hi,
any news on the subject? How do other users move many disks between 
storage domains? I believe not many people use quotas though..


On 13. 07. 2016 13:38, Juan Hernández wrote:

On 07/13/2016 10:30 AM, Jure Kranjc wrote:

On 01. 12. 2014 14:40, Nicolas Ecarnot wrote:

Le 01/12/2014 13:23, Juan Hernández a écrit :

On 12/01/2014 12:51 PM, Michael Pasternak wrote:

not sure what sdk version 3.4.4 is, but according to log, latest
official for 3.4 is 3.4.1.1-1
(make you have it installed)


There are two issues here. First is that the "move" disk operation on
the top level collection isn't correctly documented in the RSDL
metadata. As a result the Python SDK and the CLI don't support this
operation. You can however use the same operation in the context of
the VM:

# action disk {disk:id} move --vm-identifier {vm:id}
--storage_domain-name={storagedomain:name}

Please open a bug requesting a fix for this.

Done!

https://bugzilla.redhat.com/show_bug.cgi?id=1169376


The other issue is that the 3.4 version doesn't support specifying disks
by alias, only by id. This has been fixed in 3.5.

So, all in all, at the moment you will need a command like this:

# action disk c6aab66a-b551-4cc5-8628-efe9622c0dce move
--vm-identifier myvm --storage_domain-name mysd

Your workaround is working : thank you.


Hi,

i know this is an old thread but i need to move a bunch of disks from
one storage domain to another. I am unable to move disks with
ovirt-shell as it seems it does not support moving disks when quota
enabled and enforced on datacenter. Is that correct? Any help appreciated.

ovirt shell
action disk 689ce8fe-0d40-47e1-a933-7bae5ed0812b move
--storage_domain-name NLSAS_PRIM
status: 400
reason: Bad Request
detail: Cannot move Virtual Machine Disk. Quota is not valid.

I can move disks normally via webadmin.
Using ovirt-engine-cli-3.6.2.0-1.fc23.noarch,
ovirt-engine-3.5.6.2-1.el6.noarch


Doron, Roy, internally the API uses the "MoveDisks" command to move the
disks, and that action is marked as "QuotaDependency.STORAGE". Is that
correct? Can you take a look?




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


Re: [ovirt-users] oVirt-shell command to move a disk

2016-07-13 Thread Juan Hernández
On 07/13/2016 10:30 AM, Jure Kranjc wrote:
> On 01. 12. 2014 14:40, Nicolas Ecarnot wrote:
>> Le 01/12/2014 13:23, Juan Hernández a écrit :
>>> On 12/01/2014 12:51 PM, Michael Pasternak wrote:
 not sure what sdk version 3.4.4 is, but according to log, latest
 official for 3.4 is 3.4.1.1-1
 (make you have it installed)

>>>
>>> There are two issues here. First is that the "move" disk operation on
>>> the top level collection isn't correctly documented in the RSDL
>>> metadata. As a result the Python SDK and the CLI don't support this
>>> operation. You can however use the same operation in the context of 
>>> the VM:
>>>
>>># action disk {disk:id} move --vm-identifier {vm:id}
>>> --storage_domain-name={storagedomain:name}
>>>
>>> Please open a bug requesting a fix for this.
>>
>> Done!
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=1169376
>>
>>> The other issue is that the 3.4 version doesn't support specifying disks
>>> by alias, only by id. This has been fixed in 3.5.
>>>
>>> So, all in all, at the moment you will need a command like this:
>>>
>>># action disk c6aab66a-b551-4cc5-8628-efe9622c0dce move
>>> --vm-identifier myvm --storage_domain-name mysd
>>
>> Your workaround is working : thank you.
>>
> Hi,
> 
> i know this is an old thread but i need to move a bunch of disks from 
> one storage domain to another. I am unable to move disks with 
> ovirt-shell as it seems it does not support moving disks when quota 
> enabled and enforced on datacenter. Is that correct? Any help appreciated.
> 
> ovirt shell
> action disk 689ce8fe-0d40-47e1-a933-7bae5ed0812b move 
> --storage_domain-name NLSAS_PRIM
>status: 400
>reason: Bad Request
>detail: Cannot move Virtual Machine Disk. Quota is not valid.
> 
> I can move disks normally via webadmin.
> Using ovirt-engine-cli-3.6.2.0-1.fc23.noarch, 
> ovirt-engine-3.5.6.2-1.el6.noarch
> 

Doron, Roy, internally the API uses the "MoveDisks" command to move the
disks, and that action is marked as "QuotaDependency.STORAGE". Is that
correct? Can you take a look?

-- 
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] oVirt-shell command to move a disk

2016-07-13 Thread Jure Kranjc

On 01. 12. 2014 14:40, Nicolas Ecarnot wrote:

Le 01/12/2014 13:23, Juan Hernández a écrit :

On 12/01/2014 12:51 PM, Michael Pasternak wrote:

not sure what sdk version 3.4.4 is, but according to log, latest
official for 3.4 is 3.4.1.1-1
(make you have it installed)



There are two issues here. First is that the "move" disk operation on
the top level collection isn't correctly documented in the RSDL
metadata. As a result the Python SDK and the CLI don't support this
operation. You can however use the same operation in the context of 
the VM:


   # action disk {disk:id} move --vm-identifier {vm:id}
--storage_domain-name={storagedomain:name}

Please open a bug requesting a fix for this.


Done!

https://bugzilla.redhat.com/show_bug.cgi?id=1169376


The other issue is that the 3.4 version doesn't support specifying disks
by alias, only by id. This has been fixed in 3.5.

So, all in all, at the moment you will need a command like this:

   # action disk c6aab66a-b551-4cc5-8628-efe9622c0dce move
--vm-identifier myvm --storage_domain-name mysd


Your workaround is working : thank you.


Hi,

i know this is an old thread but i need to move a bunch of disks from 
one storage domain to another. I am unable to move disks with 
ovirt-shell as it seems it does not support moving disks when quota 
enabled and enforced on datacenter. Is that correct? Any help appreciated.


ovirt shell
action disk 689ce8fe-0d40-47e1-a933-7bae5ed0812b move 
--storage_domain-name NLSAS_PRIM

  status: 400
  reason: Bad Request
  detail: Cannot move Virtual Machine Disk. Quota is not valid.

I can move disks normally via webadmin.
Using ovirt-engine-cli-3.6.2.0-1.fc23.noarch, 
ovirt-engine-3.5.6.2-1.el6.noarch


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


Re: [ovirt-users] ovirt-shell compatible with version 4?

2016-07-03 Thread Yaniv Dary
Can you file a bug on this?

Yaniv Dary
Technical Product Manager
Red Hat Israel Ltd.
34 Jerusalem Road
Building A, 4th floor
Ra'anana, Israel 4350109

Tel : +972 (9) 7692306
8272306
Email: yd...@redhat.com
IRC : ydary


On Sat, Jul 2, 2016 at 11:58 PM, Gregor Binder 
wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> UPDATE: after deleting ~/.ovirtshellrc a connection to the engine is
> possible.
>
> - --
> GPG-Key: 67F1534F
> URL: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x137FB29D67F1534
> F
>
> On 02/07/16 22:19, gregor wrote:
> > Hi,
> >
> > after upgrading to oVirt 4.* the ovirt-shell won't connect.
> >
> > That's the installed version:
> > ovirt-engine-cli-3.6.2.0-1.el7.centos.noarch
> >
> > Should this version work with the latest engine, this came from
> > repo ovirt-4.0 ? Can't find ovirt-engine-cli-4.* in the repos.
> >
> > cheers gregor ___ Users
> > mailing list Users@ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/users
> >
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2
>
> iQI2BAEBCAAgBQJXeCrWGRxncmVnb3IuYmluZGVyQHdlZml4aXQuYXQACgkQE3+y
> nWfxU08rkhAAinb4djy4lsjBaAhvZrmTyYL8TuWieNJvG1nsVoI5dBZpf0JQl7Wm
> vbQtzjDTZ8Sj9f3DM4cuiPMuAmq4WskpdvSOd1On6s90nczz5c8trPN464jTu8Mu
> qobr6oQXvTCm+Ch8YjzOiuTAXU9/CPIv3vC2bDtWbXjLH6NnwjL5ALFlhQcjmYGl
> PrjlH3VAlbb03A/WHZiWk+8vlmbzOeMjiF5ufXzUOddJPQtOxJ9g3bPEcswMTT+9
> bMXkwpG2E5OHAeDkomhkZL8AkyYXedQ1d+AUMeI2ZIY6FvcpR9vz9vX6QZXTOriZ
> haDWLm0AwRS3WsslhdnQmWbHeg13vbhzeCzH2n8kwBkET7eXALx5JsIIiEAvIW04
> MyOfQ3Zny/TwDIpIXbH+qyieWczcXQaFOAV1p/qoKkN5ibrbbuSaRPY6gqe8RKrN
> jY1M1kxfP1Iw7rV2/zzl/jkWwqTikHxiMooRjXG/zObbP5mefOCbkCU4c0/99W+p
> Po9JY7ASE/gKWaPrfAiADPQ5gs2hjFvm062yGDnJwDOXsAFsGtvglNmjtBeuq84L
> A62gZUDNSK09ngJCGYMTIorGAq8rH8tSTWKELy9pIF+Qgr3+MmLqV2C1Dd5k3f+e
> 3OzyRqmuWGU4WeLT1bNZ0MOFjwQBfwONDXh0h8Ub0dHmdUKhaA7NK4A=
> =AHZe
> -END PGP SIGNATURE-
> ___
> 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


Re: [ovirt-users] ovirt-shell compatible with version 4?

2016-07-02 Thread Gregor Binder
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

UPDATE: after deleting ~/.ovirtshellrc a connection to the engine is
possible.

- -- 
GPG-Key: 67F1534F
URL: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x137FB29D67F1534
F

On 02/07/16 22:19, gregor wrote:
> Hi,
> 
> after upgrading to oVirt 4.* the ovirt-shell won't connect.
> 
> That's the installed version: 
> ovirt-engine-cli-3.6.2.0-1.el7.centos.noarch
> 
> Should this version work with the latest engine, this came from
> repo ovirt-4.0 ? Can't find ovirt-engine-cli-4.* in the repos.
> 
> cheers gregor ___ Users
> mailing list Users@ovirt.org 
> http://lists.ovirt.org/mailman/listinfo/users
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQI2BAEBCAAgBQJXeCrWGRxncmVnb3IuYmluZGVyQHdlZml4aXQuYXQACgkQE3+y
nWfxU08rkhAAinb4djy4lsjBaAhvZrmTyYL8TuWieNJvG1nsVoI5dBZpf0JQl7Wm
vbQtzjDTZ8Sj9f3DM4cuiPMuAmq4WskpdvSOd1On6s90nczz5c8trPN464jTu8Mu
qobr6oQXvTCm+Ch8YjzOiuTAXU9/CPIv3vC2bDtWbXjLH6NnwjL5ALFlhQcjmYGl
PrjlH3VAlbb03A/WHZiWk+8vlmbzOeMjiF5ufXzUOddJPQtOxJ9g3bPEcswMTT+9
bMXkwpG2E5OHAeDkomhkZL8AkyYXedQ1d+AUMeI2ZIY6FvcpR9vz9vX6QZXTOriZ
haDWLm0AwRS3WsslhdnQmWbHeg13vbhzeCzH2n8kwBkET7eXALx5JsIIiEAvIW04
MyOfQ3Zny/TwDIpIXbH+qyieWczcXQaFOAV1p/qoKkN5ibrbbuSaRPY6gqe8RKrN
jY1M1kxfP1Iw7rV2/zzl/jkWwqTikHxiMooRjXG/zObbP5mefOCbkCU4c0/99W+p
Po9JY7ASE/gKWaPrfAiADPQ5gs2hjFvm062yGDnJwDOXsAFsGtvglNmjtBeuq84L
A62gZUDNSK09ngJCGYMTIorGAq8rH8tSTWKELy9pIF+Qgr3+MmLqV2C1Dd5k3f+e
3OzyRqmuWGU4WeLT1bNZ0MOFjwQBfwONDXh0h8Ub0dHmdUKhaA7NK4A=
=AHZe
-END PGP SIGNATURE-
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] ovirt-shell show vm doesn't show all vm properties

2016-04-22 Thread Nathanaël Blanchet

Thanks, exactly what I need!
However, I found the --all_content as an argument of "show vm" but when 
I tried it nothing more happened.
Nothing could tell me at this moment that "true" was expected. It should 
me more intuitive...


Le 22/04/2016 11:39, Juan Hernández a écrit :

On 04/22/2016 10:14 AM, Nathanaël Blanchet wrote:

Hi all,

I'd like to find any vms with some defined properties like
(console-enabled or serial_number-policy for example) with ovirt-shell
-E "show vm name", but I can't find all information that I can get with
edit vm popupin the UI.
I belevied these kind of properties were unvailable because the flag was
by default to false, but after updating the flag to true, it is still
not visible. Does it exist an extended way to get those feature with
ovirt-shell?
Thank you.


The console information isn't reported by default because it requires an
additional query to the database, which is expensive, and not useful in
general. You can enable these expensive items using the "all_content"
parameter:

   $ ovirt-shell "show vm name --all_content true"

The serial number properties are only present if there is one serial
number policy enabled.



--
Nathanaël Blanchet

Supervision réseau
Pôle Infrastrutures Informatiques
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5   
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanc...@abes.fr

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


Re: [ovirt-users] ovirt-shell show vm doesn't show all vm properties

2016-04-22 Thread Juan Hernández
On 04/22/2016 10:14 AM, Nathanaël Blanchet wrote:
> Hi all,
> 
> I'd like to find any vms with some defined properties like 
> (console-enabled or serial_number-policy for example) with ovirt-shell 
> -E "show vm name", but I can't find all information that I can get with 
> edit vm popupin the UI.
> I belevied these kind of properties were unvailable because the flag was 
> by default to false, but after updating the flag to true, it is still 
> not visible. Does it exist an extended way to get those feature with 
> ovirt-shell?
> Thank you.
> 

The console information isn't reported by default because it requires an
additional query to the database, which is expensive, and not useful in
general. You can enable these expensive items using the "all_content"
parameter:

  $ ovirt-shell "show vm name --all_content true"

The serial number properties are only present if there is one serial
number policy enabled.

-- 
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] ovirt-shell issue

2016-04-07 Thread Juan Hernández
On 04/06/2016 07:28 PM, Nathanaël Blanchet wrote:
> Hello,
> in an interactive shell, I can successfully execute such a command:
> add network --name brv13 --vlan-id 13  --datacenter-identifier Cines 
> --description A_FORM
> but the same as an argument of ovirt-shell,
> # ovirt-shell -E "add network --name brv13 --vlan-id 13 
> --datacenter-identifier Cines --description A_FORM"
> it leads me to "datacenter Cines does not exist."
> 
> of course, datacenter Cines does exist!
> 
> What's wrong there?
> 

That command should fail in both the interactive mode and with the "-E"
option. The problem is that the "--datacenter-identifier" option expects
an identifier, not a name. You should use "--datacenter-name" instaed:

  $ ovirt-shell -E "add network --name brv13 --vlan-id 13
--datacenter-name Cines --description A_FORM"

-- 
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] ovirt-shell : Smart way to run a cmd WHEN another is finished?

2016-04-01 Thread Juan Hernández
On 04/01/2016 09:40 AM, Nicolas Ecarnot wrote:
> Hello,
> 
> I'd like to night-batch series of actions through some ovirt-shell scripts.
> Amongst those actions, some are taking a very long time and are treated 
> asynchronously by oVirt. (That may be exports, imports, snapshots, boot, 
> shutdown...)
> 
> Thus, after having send that long command, I've to find a way to know 
> when to send the next one.
> 
> I could script a kind of regular status check at determined interval, 
> but I was wondering if there is a smarter way? (because my dumb way 
> would imply for each check a connection. That looks heavy.)
>

Checking at intervals is the only reliable way. I'd also suggest you to
use one of the SDKs instead of ovirt-shell for this kind of complicated
task.

-- 
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] [ovirt-shell] update hostnic/nic ???

2016-01-20 Thread Juan Hernández
On 01/20/2016 02:03 PM, Bloemen, Jurriën wrote:
> 
> On 20-01-16 12:24, Juan Hernández wrote:
>> On 01/20/2016 11:31 AM, Bloemen, Jurriën wrote:
>>> On 15-01-16 12:20, Juan Hernández wrote:
 On 01/14/2016 01:28 PM, Bloemen, Jurriën wrote:
>> On 14-01-16 12:16, Juan Hernández wrote:
>>> On 01/14/2016 11:24 AM, Bloemen, Jurriën wrote:
 Hi,

 First I created a bonding interface:

 # add nic --parent-host-name server01 --name bond0 --network-name
 VLAN602 --bonding-slaves-host_nic host_nic.name=eno1
 --bonding-slaves-host_nic host_nic.name=eno2

 This works great but no IP is set on VLAN602.

 Then I'm trying to add an ip address to a network with the following
 command:

 # update hostnic --parent-host-name server01 --network-name VLAN602
 --boot_protocol static --ip-address 10.10.10.10 --ip-netmask 
 255.255.255.0

 ==
 ERROR
 

 wrong number of arguments, try 'help update' for help.
 

 Looking at this document
 https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6-Beta/html/RHEVM_Shell_Guide/nic.html
 I need to use "nic" instead of "hostnic" but then I don't have the
 options to say this is a --parent-host-name. Only VM related command
 options.

 So I think the documentation is behind.

 Can somebody help me with what the command is to add a IP to a
 VLAN/Network for a host?


>>> The command should be like this:
>>>
>>> # update nic bond0 --parent-host-name server01 --network-name 
>>> VLAN602
>>> --boot_protocol static --ip-address 10.10.10.10 --ip-netmask 
>>> 255.255.255.0
>>>
>>> Note that the it is "nic" instead of "hostnic" and that you need to
>>> specify the name of that NIC, in this case "bond0".
>>>
>>> The command will work if you type it like that, but auto-completion
>>> won't work. This is a bug in the CLI, indirectly caused by the fact that
>>> the name of the URL segment used in the RESTAPI is "nics" (from
>>> /hosts/{host:id}/*nics*) but the name of the XML schema complex type is
>>> "HostNIC".
>>>
>> Thanks! That works!
>>
>> Another question:
>>
>> Now I got the message that my network is out-of-sync. How can i force
>> within the ovirt-shell that it syncs the networks?
> hmz pressed sent by accident
>
> What I want to say is:
>
> Now I got the message that my network is out-of-sync. How can i force
> within the ovirt-shell that it syncs the networks?
> Because when I press "Sync All Networks" the IP address disappears
>
> But when I check the box "Sync Network" within the VLAN602 options it
> gets pushed to the host.
>
> Is there a difference between the both? And how do I run both via
> ovirt-shell?
>
 The "sync network" operation is not supported by ovirt-shell.

 If you want to set the network configuration, and make it persistent,
 then you will need to use one of the "setupNetworks" operations. These
 aren't fully usable with ovirt-shell either, so if you want to use it
 you will need to use directly the API or one of the SDKs. For example,
 lets assume that you have a host with network interfaces eth0, eth1, and
 eth2, and that you want to configure eth1 and eth2 as a bond, to put
 your VLAN and IP address on top. You can do that with a script like this:

 ---8<---
 #!/bin/sh -ex

 url="https://engine.example.com/ovirt-engine/api";
 user="admin@internal"
 password="..."

 curl \
 --verbose \
 --cacert /etc/pki/ovirt-engine/ca.pem \
 --user "${user}:${password}" \
 --request POST \
 --header "Content-Type: application/xml" \
 --header "Accept: application/xml" \
 --data '
 
 
   
 
   VLAN602
 
 
   bond0
 
 
   static
   
 
   
 
   
 
 
   
 bond0
 
   
 
 
   
   
 
   eth1
 
 
   eth2
 
>>

Re: [ovirt-users] [ovirt-shell] update hostnic/nic ???

2016-01-20 Thread Bloemen , Jurriën

On 20-01-16 12:24, Juan Hernández wrote:
> On 01/20/2016 11:31 AM, Bloemen, Jurriën wrote:
>> On 15-01-16 12:20, Juan Hernández wrote:
>>> On 01/14/2016 01:28 PM, Bloemen, Jurriën wrote:
> On 14-01-16 12:16, Juan Hernández wrote:
>> On 01/14/2016 11:24 AM, Bloemen, Jurriën wrote:
>>> Hi,
>>>
>>> First I created a bonding interface:
>>>
>>> # add nic --parent-host-name server01 --name bond0 --network-name
>>> VLAN602 --bonding-slaves-host_nic host_nic.name=eno1
>>> --bonding-slaves-host_nic host_nic.name=eno2
>>>
>>> This works great but no IP is set on VLAN602.
>>>
>>> Then I'm trying to add an ip address to a network with the following
>>> command:
>>>
>>> # update hostnic --parent-host-name server01 --network-name VLAN602
>>> --boot_protocol static --ip-address 10.10.10.10 --ip-netmask 
>>> 255.255.255.0
>>>
>>> ==
>>> ERROR
>>> 
>>>
>>> wrong number of arguments, try 'help update' for help.
>>> 
>>>
>>> Looking at this document
>>> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6-Beta/html/RHEVM_Shell_Guide/nic.html
>>> I need to use "nic" instead of "hostnic" but then I don't have the
>>> options to say this is a --parent-host-name. Only VM related command
>>> options.
>>>
>>> So I think the documentation is behind.
>>>
>>> Can somebody help me with what the command is to add a IP to a
>>> VLAN/Network for a host?
>>>
>>>
>> The command should be like this:
>>
>> # update nic bond0 --parent-host-name server01 --network-name VLAN602
>> --boot_protocol static --ip-address 10.10.10.10 --ip-netmask 
>> 255.255.255.0
>>
>> Note that the it is "nic" instead of "hostnic" and that you need to
>> specify the name of that NIC, in this case "bond0".
>>
>> The command will work if you type it like that, but auto-completion
>> won't work. This is a bug in the CLI, indirectly caused by the fact that
>> the name of the URL segment used in the RESTAPI is "nics" (from
>> /hosts/{host:id}/*nics*) but the name of the XML schema complex type is
>> "HostNIC".
>>
> Thanks! That works!
>
> Another question:
>
> Now I got the message that my network is out-of-sync. How can i force
> within the ovirt-shell that it syncs the networks?
 hmz pressed sent by accident

 What I want to say is:

 Now I got the message that my network is out-of-sync. How can i force
 within the ovirt-shell that it syncs the networks?
 Because when I press "Sync All Networks" the IP address disappears

 But when I check the box "Sync Network" within the VLAN602 options it
 gets pushed to the host.

 Is there a difference between the both? And how do I run both via
 ovirt-shell?

>>> The "sync network" operation is not supported by ovirt-shell.
>>>
>>> If you want to set the network configuration, and make it persistent,
>>> then you will need to use one of the "setupNetworks" operations. These
>>> aren't fully usable with ovirt-shell either, so if you want to use it
>>> you will need to use directly the API or one of the SDKs. For example,
>>> lets assume that you have a host with network interfaces eth0, eth1, and
>>> eth2, and that you want to configure eth1 and eth2 as a bond, to put
>>> your VLAN and IP address on top. You can do that with a script like this:
>>>
>>> ---8<---
>>> #!/bin/sh -ex
>>>
>>> url="https://engine.example.com/ovirt-engine/api";
>>> user="admin@internal"
>>> password="..."
>>>
>>> curl \
>>> --verbose \
>>> --cacert /etc/pki/ovirt-engine/ca.pem \
>>> --user "${user}:${password}" \
>>> --request POST \
>>> --header "Content-Type: application/xml" \
>>> --header "Accept: application/xml" \
>>> --data '
>>> 
>>> 
>>>   
>>> 
>>>   VLAN602
>>> 
>>> 
>>>   bond0
>>> 
>>> 
>>>   static
>>>   
>>> 
>>>   
>>> 
>>>   
>>> 
>>> 
>>>   
>>> bond0
>>> 
>>>   
>>> 
>>> 
>>>   
>>>   
>>> 
>>>   eth1
>>> 
>>> 
>>>   eth2
>>> 
>>>   
>>> 
>>>   
>>>  
>>>
>>> ' \
>>> "${url}/1ff7a191-2f3b-4eff-812b-9f91a30c3acc/setupnetworks"
>>> --->8---
>>>
>>> If you prefer to use one of the SDKs, the Pyth

Re: [ovirt-users] [ovirt-shell] update hostnic/nic ???

2016-01-20 Thread Juan Hernández
On 01/20/2016 11:31 AM, Bloemen, Jurriën wrote:
> On 15-01-16 12:20, Juan Hernández wrote:
>> On 01/14/2016 01:28 PM, Bloemen, Jurriën wrote:
 On 14-01-16 12:16, Juan Hernández wrote:
> On 01/14/2016 11:24 AM, Bloemen, Jurriën wrote:
>> Hi,
>>
>> First I created a bonding interface:
>>
>> # add nic --parent-host-name server01 --name bond0 --network-name
>> VLAN602 --bonding-slaves-host_nic host_nic.name=eno1
>> --bonding-slaves-host_nic host_nic.name=eno2
>>
>> This works great but no IP is set on VLAN602.
>>
>> Then I'm trying to add an ip address to a network with the following
>> command:
>>
>> # update hostnic --parent-host-name server01 --network-name VLAN602
>> --boot_protocol static --ip-address 10.10.10.10 --ip-netmask 
>> 255.255.255.0
>>
>> ==
>> ERROR
>> 
>>
>> wrong number of arguments, try 'help update' for help.
>> 
>>
>> Looking at this document
>> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6-Beta/html/RHEVM_Shell_Guide/nic.html
>> I need to use "nic" instead of "hostnic" but then I don't have the
>> options to say this is a --parent-host-name. Only VM related command
>> options.
>>
>> So I think the documentation is behind.
>>
>> Can somebody help me with what the command is to add a IP to a
>> VLAN/Network for a host?
>>
>>
> The command should be like this:
>
># update nic bond0 --parent-host-name server01 --network-name VLAN602
> --boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0
>
> Note that the it is "nic" instead of "hostnic" and that you need to
> specify the name of that NIC, in this case "bond0".
>
> The command will work if you type it like that, but auto-completion
> won't work. This is a bug in the CLI, indirectly caused by the fact that
> the name of the URL segment used in the RESTAPI is "nics" (from
> /hosts/{host:id}/*nics*) but the name of the XML schema complex type is
> "HostNIC".
>
 Thanks! That works!

 Another question:

 Now I got the message that my network is out-of-sync. How can i force
 within the ovirt-shell that it syncs the networks?
>>> hmz pressed sent by accident
>>>
>>> What I want to say is:
>>>
>>> Now I got the message that my network is out-of-sync. How can i force
>>> within the ovirt-shell that it syncs the networks?
>>> Because when I press "Sync All Networks" the IP address disappears
>>>
>>> But when I check the box "Sync Network" within the VLAN602 options it
>>> gets pushed to the host.
>>>
>>> Is there a difference between the both? And how do I run both via
>>> ovirt-shell?
>>>
>> The "sync network" operation is not supported by ovirt-shell.
>>
>> If you want to set the network configuration, and make it persistent,
>> then you will need to use one of the "setupNetworks" operations. These
>> aren't fully usable with ovirt-shell either, so if you want to use it
>> you will need to use directly the API or one of the SDKs. For example,
>> lets assume that you have a host with network interfaces eth0, eth1, and
>> eth2, and that you want to configure eth1 and eth2 as a bond, to put
>> your VLAN and IP address on top. You can do that with a script like this:
>>
>> ---8<---
>> #!/bin/sh -ex
>>
>> url="https://engine.example.com/ovirt-engine/api";
>> user="admin@internal"
>> password="..."
>>
>> curl \
>> --verbose \
>> --cacert /etc/pki/ovirt-engine/ca.pem \
>> --user "${user}:${password}" \
>> --request POST \
>> --header "Content-Type: application/xml" \
>> --header "Accept: application/xml" \
>> --data '
>> 
>>
>>  
>>
>>  VLAN602
>>
>>
>>  bond0
>>
>>
>>  static
>>  
>>
>>  
>>
>>  
>>
>>
>>  
>>bond0
>>
>>  
>>
>>
>>  
>>  
>>
>>  eth1
>>
>>
>>  eth2
>>
>>  
>>
>>  
>> 
>>   
>> ' \
>> "${url}/1ff7a191-2f3b-4eff-812b-9f91a30c3acc/setupnetworks"
>> --->8---
>>
>> If you prefer to use one of the SDKs, the Python SDK for example, then
>> it should look like this:
>>
>> ---8<---
>> #!/usr/bin/python
>>
>> from ovirtsdk.api import API
>> from ovirtsdk.xml import params
>>
>> # Connect to the server:
>> api = API(
>>  url="https://engi

Re: [ovirt-users] [ovirt-shell] update hostnic/nic ???

2016-01-20 Thread Bloemen , Jurriën
On 15-01-16 12:20, Juan Hernández wrote:
> On 01/14/2016 01:28 PM, Bloemen, Jurriën wrote:
>>> On 14-01-16 12:16, Juan Hernández wrote:
 On 01/14/2016 11:24 AM, Bloemen, Jurriën wrote:
> Hi,
>
> First I created a bonding interface:
>
> # add nic --parent-host-name server01 --name bond0 --network-name
> VLAN602 --bonding-slaves-host_nic host_nic.name=eno1
> --bonding-slaves-host_nic host_nic.name=eno2
>
> This works great but no IP is set on VLAN602.
>
> Then I'm trying to add an ip address to a network with the following
> command:
>
> # update hostnic --parent-host-name server01 --network-name VLAN602
> --boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0
>
> ==
> ERROR
> 
>
> wrong number of arguments, try 'help update' for help.
> 
>
> Looking at this document
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6-Beta/html/RHEVM_Shell_Guide/nic.html
> I need to use "nic" instead of "hostnic" but then I don't have the
> options to say this is a --parent-host-name. Only VM related command
> options.
>
> So I think the documentation is behind.
>
> Can somebody help me with what the command is to add a IP to a
> VLAN/Network for a host?
>
>
 The command should be like this:

# update nic bond0 --parent-host-name server01 --network-name VLAN602
 --boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

 Note that the it is "nic" instead of "hostnic" and that you need to
 specify the name of that NIC, in this case "bond0".

 The command will work if you type it like that, but auto-completion
 won't work. This is a bug in the CLI, indirectly caused by the fact that
 the name of the URL segment used in the RESTAPI is "nics" (from
 /hosts/{host:id}/*nics*) but the name of the XML schema complex type is
 "HostNIC".

>>> Thanks! That works!
>>>
>>> Another question:
>>>
>>> Now I got the message that my network is out-of-sync. How can i force
>>> within the ovirt-shell that it syncs the networks?
>> hmz pressed sent by accident
>>
>> What I want to say is:
>>
>> Now I got the message that my network is out-of-sync. How can i force
>> within the ovirt-shell that it syncs the networks?
>> Because when I press "Sync All Networks" the IP address disappears
>>
>> But when I check the box "Sync Network" within the VLAN602 options it
>> gets pushed to the host.
>>
>> Is there a difference between the both? And how do I run both via
>> ovirt-shell?
>>
> The "sync network" operation is not supported by ovirt-shell.
>
> If you want to set the network configuration, and make it persistent,
> then you will need to use one of the "setupNetworks" operations. These
> aren't fully usable with ovirt-shell either, so if you want to use it
> you will need to use directly the API or one of the SDKs. For example,
> lets assume that you have a host with network interfaces eth0, eth1, and
> eth2, and that you want to configure eth1 and eth2 as a bond, to put
> your VLAN and IP address on top. You can do that with a script like this:
>
> ---8<---
> #!/bin/sh -ex
>
> url="https://engine.example.com/ovirt-engine/api";
> user="admin@internal"
> password="..."
>
> curl \
> --verbose \
> --cacert /etc/pki/ovirt-engine/ca.pem \
> --user "${user}:${password}" \
> --request POST \
> --header "Content-Type: application/xml" \
> --header "Accept: application/xml" \
> --data '
> 
>
>  
>
>  VLAN602
>
>
>  bond0
>
>
>  static
>  
>
>  
>
>  
>
>
>  
>bond0
>
>  
>
>
>  
>  
>
>  eth1
>
>
>  eth2
>
>  
>
>  
> 
>   
> ' \
> "${url}/1ff7a191-2f3b-4eff-812b-9f91a30c3acc/setupnetworks"
> --->8---
>
> If you prefer to use one of the SDKs, the Python SDK for example, then
> it should look 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=True
> )
>
> # Find the host:
> host = api.hosts.get(nam

Re: [ovirt-users] [ovirt-shell] update hostnic/nic ???

2016-01-15 Thread Bloemen , Jurriën

On 15-01-16 12:20, Juan Hernández wrote:

On 01/14/2016 01:28 PM, Bloemen, Jurriën wrote:



On 14-01-16 12:16, Juan Hernández wrote:


On 01/14/2016 11:24 AM, Bloemen, Jurriën wrote:


Hi,

First I created a bonding interface:

# add nic --parent-host-name server01 --name bond0 --network-name
VLAN602 --bonding-slaves-host_nic host_nic.name=eno1
--bonding-slaves-host_nic host_nic.name=eno2

This works great but no IP is set on VLAN602.

Then I'm trying to add an ip address to a network with the following
command:

# update hostnic --parent-host-name server01 --network-name VLAN602
--boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

==
ERROR


wrong number of arguments, try 'help update' for help.


Looking at this document
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6-Beta/html/RHEVM_Shell_Guide/nic.html
I need to use "nic" instead of "hostnic" but then I don't have the
options to say this is a --parent-host-name. Only VM related command
options.

So I think the documentation is behind.

Can somebody help me with what the command is to add a IP to a
VLAN/Network for a host?




The command should be like this:

  # update nic bond0 --parent-host-name server01 --network-name VLAN602
--boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

Note that the it is "nic" instead of "hostnic" and that you need to
specify the name of that NIC, in this case "bond0".

The command will work if you type it like that, but auto-completion
won't work. This is a bug in the CLI, indirectly caused by the fact that
the name of the URL segment used in the RESTAPI is "nics" (from
/hosts/{host:id}/*nics*) but the name of the XML schema complex type is
"HostNIC".



Thanks! That works!

Another question:

Now I got the message that my network is out-of-sync. How can i force
within the ovirt-shell that it syncs the networks?



hmz pressed sent by accident

What I want to say is:

Now I got the message that my network is out-of-sync. How can i force
within the ovirt-shell that it syncs the networks?
Because when I press "Sync All Networks" the IP address disappears

But when I check the box "Sync Network" within the VLAN602 options it
gets pushed to the host.

Is there a difference between the both? And how do I run both via
ovirt-shell?




The "sync network" operation is not supported by ovirt-shell.

If you want to set the network configuration, and make it persistent,
then you will need to use one of the "setupNetworks" operations. These
aren't fully usable with ovirt-shell either, so if you want to use it
you will need to use directly the API or one of the SDKs. For example,
lets assume that you have a host with network interfaces eth0, eth1, and
eth2, and that you want to configure eth1 and eth2 as a bond, to put
your VLAN and IP address on top. You can do that with a script like this:

---8<---
#!/bin/sh -ex

url="https://engine.example.com/ovirt-engine/api";
user="admin@internal"
password="..."

curl \
--verbose \
--cacert /etc/pki/ovirt-engine/ca.pem \
--user "${user}:${password}" \
--request POST \
--header "Content-Type: application/xml" \
--header "Accept: application/xml" \
--data '

  

  
VLAN602
  
  
bond0
  
  
static

  

  

  
  

  bond0
  

  
  


  
eth1
  
  
eth2
  

  

   
 
' \
"${url}/1ff7a191-2f3b-4eff-812b-9f91a30c3acc/setupnetworks"
--->8---

If you prefer to use one of the SDKs, the Python SDK for example, then
it should look 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=True
)

# Find the host:
host = api.hosts.get(name="myhost")

# Set up the networks:
host.setupnetworks(
  params.Action(
modified_bonds=params.HostNics(
  host_nic=[
params.HostNIC(
  name="bond0",
  bonding=params.Bonding(
options=params.Options(
  option=[
params.Option(name="mode", value="4"),
params.Option(name="miimon", value="100"),
  ],
),
slav

Re: [ovirt-users] [ovirt-shell] update hostnic/nic ???

2016-01-15 Thread Juan Hernández
On 01/14/2016 01:28 PM, Bloemen, Jurriën wrote:
>>
>> On 14-01-16 12:16, Juan Hernández wrote:
>>> On 01/14/2016 11:24 AM, Bloemen, Jurriën wrote:
 Hi,

 First I created a bonding interface:

 # add nic --parent-host-name server01 --name bond0 --network-name
 VLAN602 --bonding-slaves-host_nic host_nic.name=eno1
 --bonding-slaves-host_nic host_nic.name=eno2

 This works great but no IP is set on VLAN602.

 Then I'm trying to add an ip address to a network with the following
 command:

 # update hostnic --parent-host-name server01 --network-name VLAN602
 --boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

 ==
 ERROR
 


 wrong number of arguments, try 'help update' for help.
 

 Looking at this document
 https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6-Beta/html/RHEVM_Shell_Guide/nic.html
 I need to use "nic" instead of "hostnic" but then I don't have the
 options to say this is a --parent-host-name. Only VM related command
 options.

 So I think the documentation is behind.

 Can somebody help me with what the command is to add a IP to a
 VLAN/Network for a host?


>>> The command should be like this:
>>>
>>>   # update nic bond0 --parent-host-name server01 --network-name VLAN602
>>> --boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0
>>>
>>> Note that the it is "nic" instead of "hostnic" and that you need to
>>> specify the name of that NIC, in this case "bond0".
>>>
>>> The command will work if you type it like that, but auto-completion
>>> won't work. This is a bug in the CLI, indirectly caused by the fact that
>>> the name of the URL segment used in the RESTAPI is "nics" (from
>>> /hosts/{host:id}/*nics*) but the name of the XML schema complex type is
>>> "HostNIC".
>>>
>> Thanks! That works!
>>
>> Another question:
>>
>> Now I got the message that my network is out-of-sync. How can i force
>> within the ovirt-shell that it syncs the networks?
> 
> hmz pressed sent by accident
> 
> What I want to say is:
> 
> Now I got the message that my network is out-of-sync. How can i force
> within the ovirt-shell that it syncs the networks?
> Because when I press "Sync All Networks" the IP address disappears
> 
> But when I check the box "Sync Network" within the VLAN602 options it
> gets pushed to the host.
> 
> Is there a difference between the both? And how do I run both via
> ovirt-shell?
> 

The "sync network" operation is not supported by ovirt-shell.

If you want to set the network configuration, and make it persistent,
then you will need to use one of the "setupNetworks" operations. These
aren't fully usable with ovirt-shell either, so if you want to use it
you will need to use directly the API or one of the SDKs. For example,
lets assume that you have a host with network interfaces eth0, eth1, and
eth2, and that you want to configure eth1 and eth2 as a bond, to put
your VLAN and IP address on top. You can do that with a script like this:

---8<---
#!/bin/sh -ex

url="https://engine.example.com/ovirt-engine/api";
user="admin@internal"
password="..."

curl \
--verbose \
--cacert /etc/pki/ovirt-engine/ca.pem \
--user "${user}:${password}" \
--request POST \
--header "Content-Type: application/xml" \
--header "Accept: application/xml" \
--data '

  

  
VLAN602
  
  
bond0
  
  
static

  

  

  
  

  bond0
  

  
  


  
eth1
  
  
eth2
  

  

   
 
' \
"${url}/1ff7a191-2f3b-4eff-812b-9f91a30c3acc/setupnetworks"
--->8---

If you prefer to use one of the SDKs, the Python SDK for example, then
it should look 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=True
)

# Find the host:
host = api.hosts.get(name="myhost")

# Set up the networks:
host.setupnetworks(
  params.Action(
modified_bonds=params.HostNics(
  host_nic=[
params.HostNIC(
  name="bond0",
  bonding=params.Bonding(
  

Re: [ovirt-users] [ovirt-shell] update hostnic/nic ???

2016-01-14 Thread Bloemen , Jurriën

On 14-01-16 12:16, Juan Hernández wrote:

On 01/14/2016 11:24 AM, Bloemen, Jurriën wrote:


Hi,

First I created a bonding interface:

# add nic --parent-host-name server01 --name bond0 --network-name
VLAN602 --bonding-slaves-host_nic host_nic.name=eno1
--bonding-slaves-host_nic host_nic.name=eno2

This works great but no IP is set on VLAN602.

Then I'm trying to add an ip address to a network with the following
command:

# update hostnic --parent-host-name server01 --network-name VLAN602
--boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

==
ERROR


wrong number of arguments, try 'help update' for help.


Looking at this document
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6-Beta/html/RHEVM_Shell_Guide/nic.html
I need to use "nic" instead of "hostnic" but then I don't have the
options to say this is a --parent-host-name. Only VM related command
options.

So I think the documentation is behind.

Can somebody help me with what the command is to add a IP to a
VLAN/Network for a host?




The command should be like this:

  # update nic bond0 --parent-host-name server01 --network-name VLAN602
--boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

Note that the it is "nic" instead of "hostnic" and that you need to
specify the name of that NIC, in this case "bond0".

The command will work if you type it like that, but auto-completion
won't work. This is a bug in the CLI, indirectly caused by the fact that
the name of the URL segment used in the RESTAPI is "nics" (from
/hosts/{host:id}/*nics*) but the name of the XML schema complex type is
"HostNIC".



Thanks! That works!

Another question:

Now I got the message that my network is out-of-sync. How can i force within 
the ovirt-shell that it syncs the networks?

hmz pressed sent by accident

What I want to say is:

Now I got the message that my network is out-of-sync. How can i force within 
the ovirt-shell that it syncs the networks?
Because when I press "Sync All Networks" the IP address disappears

But when I check the box "Sync Network" within the VLAN602 options it gets 
pushed to the host.

Is there a difference between the both? And how do I run both via ovirt-shell?




This message (including any attachments) may contain information that is 
privileged or confidential. If you are not the intended recipient, please 
notify the sender and delete this email immediately from your systems and 
destroy all copies of it. You may not, directly or indirectly, use, disclose, 
distribute, print or copy this email or any part of it if you are not the 
intended recipient
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] [ovirt-shell] update hostnic/nic ???

2016-01-14 Thread Bloemen , Jurriën

On 14-01-16 12:16, Juan Hernández wrote:

On 01/14/2016 11:24 AM, Bloemen, Jurriën wrote:


Hi,

First I created a bonding interface:

# add nic --parent-host-name server01 --name bond0 --network-name
VLAN602 --bonding-slaves-host_nic host_nic.name=eno1
--bonding-slaves-host_nic host_nic.name=eno2

This works great but no IP is set on VLAN602.

Then I'm trying to add an ip address to a network with the following
command:

# update hostnic --parent-host-name server01 --network-name VLAN602
--boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

==
ERROR


wrong number of arguments, try 'help update' for help.


Looking at this document
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6-Beta/html/RHEVM_Shell_Guide/nic.html
I need to use "nic" instead of "hostnic" but then I don't have the
options to say this is a --parent-host-name. Only VM related command
options.

So I think the documentation is behind.

Can somebody help me with what the command is to add a IP to a
VLAN/Network for a host?





The command should be like this:

  # update nic bond0 --parent-host-name server01 --network-name VLAN602
--boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

Note that the it is "nic" instead of "hostnic" and that you need to
specify the name of that NIC, in this case "bond0".

The command will work if you type it like that, but auto-completion
won't work. This is a bug in the CLI, indirectly caused by the fact that
the name of the URL segment used in the RESTAPI is "nics" (from
/hosts/{host:id}/*nics*) but the name of the XML schema complex type is
"HostNIC".



Thanks! That works!

Another question:

Now I got the message that my network is out-of-sync. How can i force within 
the ovirt-shell that it syncs the networks?
This message (including any attachments) may contain information that is 
privileged or confidential. If you are not the intended recipient, please 
notify the sender and delete this email immediately from your systems and 
destroy all copies of it. You may not, directly or indirectly, use, disclose, 
distribute, print or copy this email or any part of it if you are not the 
intended recipient
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] [ovirt-shell] update hostnic/nic ???

2016-01-14 Thread Juan Hernández
On 01/14/2016 11:24 AM, Bloemen, Jurriën wrote:
> Hi,
> 
> First I created a bonding interface:
> 
> # add nic --parent-host-name server01 --name bond0 --network-name
> VLAN602 --bonding-slaves-host_nic host_nic.name=eno1
> --bonding-slaves-host_nic host_nic.name=eno2
> 
> This works great but no IP is set on VLAN602.
> 
> Then I'm trying to add an ip address to a network with the following
> command:
> 
> # update hostnic --parent-host-name server01 --network-name VLAN602
> --boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0
> 
> ==
> ERROR
> 
>   
> 
> wrong number of arguments, try 'help update' for help.
> 
> 
> Looking at this document
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6-Beta/html/RHEVM_Shell_Guide/nic.html
> I need to use "nic" instead of "hostnic" but then I don't have the
> options to say this is a --parent-host-name. Only VM related command
> options.
> 
> So I think the documentation is behind.
> 
> Can somebody help me with what the command is to add a IP to a
> VLAN/Network for a host?
> 
> 

The command should be like this:

  # update nic bond0 --parent-host-name server01 --network-name VLAN602
--boot_protocol static --ip-address 10.10.10.10 --ip-netmask 255.255.255.0

Note that the it is "nic" instead of "hostnic" and that you need to
specify the name of that NIC, in this case "bond0".

The command will work if you type it like that, but auto-completion
won't work. This is a bug in the CLI, indirectly caused by the fact that
the name of the URL segment used in the RESTAPI is "nics" (from
/hosts/{host:id}/*nics*) but the name of the XML schema complex type is
"HostNIC".

-- 
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] ovirt-shell - Polling or also events?

2015-11-10 Thread Juan Hernández
On 11/10/2015 04:22 PM, Fabian Deutsch wrote:
> On Tue, Nov 10, 2015 at 1:03 PM, Juan Hernández  wrote:
>> On 11/09/2015 08:53 AM, Fabian Deutsch wrote:
>>> Hey,
>>>
>>> does somebody know if ovirt-shell can also wait (block) for properties
>>> of an object to change, i.e.:
>>>
>>> ovirt-shell wait --query "status-state=installed"
>>>
>>> - fabian
>>>
>>
>> No, ovirt-shell can't wait, and it is very unlikely that we change it to
>> support this.
>>
>> I'd also suggest you to avoid the CLI and use the Python or Java SDKs
>> for anything that is more complicated than occasional use of the API.
> 
> Right, thanks. Good to know
> 
> But wasn't there some RFE in 3.6 to add events (somewhere)?
> 
> - fabian
>

The closest thing I know is the proposal to add "Doctor REST" to the system:

  http://www.ovirt.org/Features/Doctor_REST

As far as I know there are no plans to integrate the shell with that.

-- 
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] ovirt-shell - Polling or also events?

2015-11-10 Thread Fabian Deutsch
On Tue, Nov 10, 2015 at 1:03 PM, Juan Hernández  wrote:
> On 11/09/2015 08:53 AM, Fabian Deutsch wrote:
>> Hey,
>>
>> does somebody know if ovirt-shell can also wait (block) for properties
>> of an object to change, i.e.:
>>
>> ovirt-shell wait --query "status-state=installed"
>>
>> - fabian
>>
>
> No, ovirt-shell can't wait, and it is very unlikely that we change it to
> support this.
>
> I'd also suggest you to avoid the CLI and use the Python or Java SDKs
> for anything that is more complicated than occasional use of the API.

Right, thanks. Good to know

But wasn't there some RFE in 3.6 to add events (somewhere)?

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


Re: [ovirt-users] ovirt-shell - Polling or also events?

2015-11-10 Thread Juan Hernández
On 11/09/2015 08:53 AM, Fabian Deutsch wrote:
> Hey,
> 
> does somebody know if ovirt-shell can also wait (block) for properties
> of an object to change, i.e.:
> 
> ovirt-shell wait --query "status-state=installed"
> 
> - fabian
>

No, ovirt-shell can't wait, and it is very unlikely that we change it to
support this.

I'd also suggest you to avoid the CLI and use the Python or Java SDKs
for anything that is more complicated than occasional use of the API.

-- 
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] ovirt-shell login problems

2015-10-30 Thread Raz Tamir
Sorry, port 80 used by http
On Oct 30, 2015 19:57, "Raz Tamir"  wrote:

> You ae trying to login to https with protocol 80 which is http.
> Just try http://...
> Hope that helps
> On Oct 28, 2015 18:38, "Susinthiran Sithamparanathan" 
> wrote:
>
>> Hi,
>> i'm trying to connect to the engine using ovirt-shell, but i get  [SSL:
>> UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590).
>> Here is the command i use:
>> ovirt-shell -c --url "https://192.168.0.101:80/ovirt-engine/api"; --user
>> "admin@internal"  -A ovirt_ca.pem
>>
>> And the debugging mode with -d doesn't provide any additional output.
>> The CA cert file have i grabbed using the method mentioned at [1] using
>> wget -O ${CA_FILE} http://
>> ${OVIRT}/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA
>>
>>
>> Any idea how i can get access? Thanks!
>>
>>
>>
>> [1] http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal
>>
>> --
>> Susinthiran Sithamparanathan
>>
>> ___
>> 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


Re: [ovirt-users] ovirt-shell login problems

2015-10-30 Thread Raz Tamir
You ae trying to login to https with protocol 80 which is http.
Just try http://...
Hope that helps
On Oct 28, 2015 18:38, "Susinthiran Sithamparanathan" 
wrote:

> Hi,
> i'm trying to connect to the engine using ovirt-shell, but i get  [SSL:
> UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590).
> Here is the command i use:
> ovirt-shell -c --url "https://192.168.0.101:80/ovirt-engine/api"; --user
> "admin@internal"  -A ovirt_ca.pem
>
> And the debugging mode with -d doesn't provide any additional output.
> The CA cert file have i grabbed using the method mentioned at [1] using
> wget -O ${CA_FILE} http://
> ${OVIRT}/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA
>
>
> Any idea how i can get access? Thanks!
>
>
>
> [1] http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal
>
> --
> Susinthiran Sithamparanathan
>
> ___
> 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


Re: [ovirt-users] ovirt-shell login problems

2015-10-30 Thread Jiri Belka
> i'm trying to connect to the engine using ovirt-shell, but i get [SSL:
> UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590).
> Here is the command i use:
> ovirt-shell -c --url " https://192.168.0.101:80/ovirt-engine/api " --user
> "admin@internal" -A ovirt_ca.pem
> 
> And the debugging mode with -d doesn't provide any additional output.
> The CA cert file have i grabbed using the method mentioned at [1] using wget
> -O ${CA_FILE}
> http://${OVIRT}/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA

Try to use /etc/pki/ovirt-engine/ca.pem from engine host. Does it work?

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


Re: [ovirt-users] ovirt shell on mac OS ?

2015-08-20 Thread Juan Hernández
On 08/20/2015 04:32 PM, Fabrice Bacchella wrote:
> 
>> Le 20 août 2015 à 16:03, Juan Hernández  a écrit :
>>
> 
>>> This is related to the cli/platform/__init__.py, there we check what is
>>> the platform using the Python "sys.platform" variable. Currently we only
>>> check for "linux2" and "win32". I think that in Mac OS the value of
>>> "sys.platform" is "darwin". So, if you can, try to modify that file so
>>> that it has this content:
>>>
>>> import sys
>>>
>>> if sys.platform in ['linux2', 'darwin']:
>>>from cli.platform.posix.terminal import PosixTerminal as Terminal
>>>from cli.platform.posix.util import *
>>>
>>> elif sys.platform in ('win32',):
>>>pass
>>>
>>> Then check if it works correctly.
>>>
>>
> 
> yes !
> But now I'm getting a lot of :
> [oVirt shell ([1;31mdisconnected[1;m)]# connect --url XXX --user 
> admin@internal --password XXX --insecure
> WARNING: Couldn't write lextab module 'cli.parser_lex'. [Errno 20] Not a 
> directory: 
> '/tmp/ovirt/lib/python2.7/site-packages/ovirt_shell-3.5.0.6-py2.7.egg/cli/parser_lex.py'
> WARNING: Couldn't create 'cli.parser_tab'. [Errno 20] Not a directory: 
> '/tmp/ovirt/lib/python2.7/site-packages/ovirt_shell-3.5.0.6-py2.7.egg/cli/parser_tab.py'
> /tmp/ovirt/lib/python2.7/site-packages/pkg_resources/__init__.py:197: 
> RuntimeWarning: You have iterated over the result of 
> pkg_resources.parse_version. This is a legacy behavior which is inconsistent 
> with the new version class introduced in setuptools 8.0. In most cases, 
> conversion to a tuple is unnecessary. For comparison of versions, sort the 
> Version instances directly. If you have another use case requiring the tuple, 
> please file a bug with the setuptools project describing that need.
>   stacklevel=1,
> 

OK. The warnings happen because the parser generator that we use is
trying to write its parse tables during runtime, but it doesn't have
permission because the files are probably owned by root. You can try to
solve that running the following command as root:

  # python -c 'import cli.parser; parser = cli.parser.Parser();
parser._write_tables()'

In platforms that use the RPM packaging system we run this when the
package is installed. I need to check if we can move this to setup.py
somehow.

I'm not familiar with the pkg_resources.parse_version issue, will take a
look.

Other than those warnings, does it work?

By the way, I'd appreciate if you can add these comments to the bug:

  https://bugzilla.redhat.com/1255409

You may need to create an account if you don't have one yet.

-- 
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] ovirt shell on mac OS ?

2015-08-20 Thread Fabrice Bacchella

> Le 20 août 2015 à 16:03, Juan Hernández  a écrit :
> 

>> This is related to the cli/platform/__init__.py, there we check what is
>> the platform using the Python "sys.platform" variable. Currently we only
>> check for "linux2" and "win32". I think that in Mac OS the value of
>> "sys.platform" is "darwin". So, if you can, try to modify that file so
>> that it has this content:
>> 
>> import sys
>> 
>> if sys.platform in ['linux2', 'darwin']:
>>from cli.platform.posix.terminal import PosixTerminal as Terminal
>>from cli.platform.posix.util import *
>> 
>> elif sys.platform in ('win32',):
>>pass
>> 
>> Then check if it works correctly.
>> 
> 

yes !
But now I'm getting a lot of :
[oVirt shell ([1;31mdisconnected[1;m)]# connect --url XXX --user admin@internal 
--password XXX --insecure
WARNING: Couldn't write lextab module 'cli.parser_lex'. [Errno 20] Not a 
directory: 
'/tmp/ovirt/lib/python2.7/site-packages/ovirt_shell-3.5.0.6-py2.7.egg/cli/parser_lex.py'
WARNING: Couldn't create 'cli.parser_tab'. [Errno 20] Not a directory: 
'/tmp/ovirt/lib/python2.7/site-packages/ovirt_shell-3.5.0.6-py2.7.egg/cli/parser_tab.py'
/tmp/ovirt/lib/python2.7/site-packages/pkg_resources/__init__.py:197: 
RuntimeWarning: You have iterated over the result of 
pkg_resources.parse_version. This is a legacy behavior which is inconsistent 
with the new version class introduced in setuptools 8.0. In most cases, 
conversion to a tuple is unnecessary. For comparison of versions, sort the 
Version instances directly. If you have another use case requiring the tuple, 
please file a bug with the setuptools project describing that need.
  stacklevel=1,


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


Re: [ovirt-users] ovirt shell on mac OS ?

2015-08-20 Thread Juan Hernández
On 08/20/2015 04:01 PM, Juan Hernández wrote:
> On 08/20/2015 03:52 PM, Fabrice Bacchella wrote:
>>
>>> Le 20 août 2015 à 15:50, Juan Hernández  a écrit :
>>>
>>> On 08/20/2015 01:00 PM, Fabrice Bacchella wrote:
 I'm trying to install ovirt-shell on my mac, as explained in 
 http://www.ovirt.org/CLI#pypi , but if fails :
>>>
>>
>>> I have created the following bug to track this issue:
>>>
>>>  https://bugzilla.redhat.com/1255409
>>>
>>> Note that we (well, at least I) don't have any Mac OS environment to
>>> test this, so it is unlikely that we can add support for it. Would you
>>> be interested in working on this yourself?
>>
>> Yes, that's possible. I just need a little help about this Terminal thing. 
>> Is that a normal dependency ? Perhaps a simple modification to setup.py can 
>> help.
>>
> 
> This is related to the cli/platform/__init__.py, there we check what is
> the platform using the Python "sys.platform" variable. Currently we only
> check for "linux2" and "win32". I think that in Mac OS the value of
> "sys.platform" is "darwin". So, if you can, try to modify that file so
> that it has this content:
> 
> import sys
> 
> if sys.platform in ['linux2', 'darwin']:
> from cli.platform.posix.terminal import PosixTerminal as Terminal
> from cli.platform.posix.util import *
> 
> elif sys.platform in ('win32',):
> pass
> 
> Then check if it works correctly.
> 

The same happens in the following two files:

  src/ovirtcli/platform/__init__.py
  src/ovirtcli/platform/windows/__init__.py

Please try the same modification, add "darwin" to the list that
currently contains only "linux2" and test.

-- 
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] ovirt shell on mac OS ?

2015-08-20 Thread Juan Hernández
On 08/20/2015 03:52 PM, Fabrice Bacchella wrote:
> 
>> Le 20 août 2015 à 15:50, Juan Hernández  a écrit :
>>
>> On 08/20/2015 01:00 PM, Fabrice Bacchella wrote:
>>> I'm trying to install ovirt-shell on my mac, as explained in 
>>> http://www.ovirt.org/CLI#pypi , but if fails :
>>
> 
>> I have created the following bug to track this issue:
>>
>>  https://bugzilla.redhat.com/1255409
>>
>> Note that we (well, at least I) don't have any Mac OS environment to
>> test this, so it is unlikely that we can add support for it. Would you
>> be interested in working on this yourself?
> 
> Yes, that's possible. I just need a little help about this Terminal thing. Is 
> that a normal dependency ? Perhaps a simple modification to setup.py can help.
> 

This is related to the cli/platform/__init__.py, there we check what is
the platform using the Python "sys.platform" variable. Currently we only
check for "linux2" and "win32". I think that in Mac OS the value of
"sys.platform" is "darwin". So, if you can, try to modify that file so
that it has this content:

import sys

if sys.platform in ['linux2', 'darwin']:
from cli.platform.posix.terminal import PosixTerminal as Terminal
from cli.platform.posix.util import *

elif sys.platform in ('win32',):
pass

Then check if it works correctly.

-- 
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] ovirt shell on mac OS ?

2015-08-20 Thread Fabrice Bacchella

> Le 20 août 2015 à 15:50, Juan Hernández  a écrit :
> 
> On 08/20/2015 01:00 PM, Fabrice Bacchella wrote:
>> I'm trying to install ovirt-shell on my mac, as explained in 
>> http://www.ovirt.org/CLI#pypi , but if fails :
> 

> I have created the following bug to track this issue:
> 
>  https://bugzilla.redhat.com/1255409
> 
> Note that we (well, at least I) don't have any Mac OS environment to
> test this, so it is unlikely that we can add support for it. Would you
> be interested in working on this yourself?

Yes, that's possible. I just need a little help about this Terminal thing. Is 
that a normal dependency ? Perhaps a simple modification to setup.py can help.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] ovirt-shell and PAGER

2015-08-20 Thread Juan Hernández
On 08/20/2015 03:50 PM, Fabrice Bacchella wrote:
> The PAGER bug is not related to mac os. I had the problem on a Centos 6.
> 

I know, replied to the wrong message, sorry.

>> Le 20 août 2015 à 15:49, Juan Hernández  a écrit :
>>
>> On 08/20/2015 01:17 PM, Fabrice Bacchella wrote:
>>> ovirt shell uses PAGER for all output, even single line one. I was using 
>>> PAGER=less, it made it barely usable. That's strange any way for a 
>>> interactive shell.
>>
>> I have created the following bug to track this issue:
>>
>>  https://bugzilla.redhat.com/1255409
>>
>> Note that we (well, at least I) don't have any Mac OS environment to
>> test this, so it is unlikely that we can add support for it. Would you
>> be interested in working on this yourself?
>>

-- 
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] ovirt-shell and PAGER

2015-08-20 Thread Fabrice Bacchella
The PAGER bug is not related to mac os. I had the problem on a Centos 6.

> Le 20 août 2015 à 15:49, Juan Hernández  a écrit :
> 
> On 08/20/2015 01:17 PM, Fabrice Bacchella wrote:
>> ovirt shell uses PAGER for all output, even single line one. I was using 
>> PAGER=less, it made it barely usable. That's strange any way for a 
>> interactive shell.
> 
> I have created the following bug to track this issue:
> 
>  https://bugzilla.redhat.com/1255409
> 
> Note that we (well, at least I) don't have any Mac OS environment to
> test this, so it is unlikely that we can add support for it. Would you
> be interested in working on this yourself?
> 
> -- 
> 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] ovirt shell on mac OS ?

2015-08-20 Thread Juan Hernández
On 08/20/2015 01:00 PM, Fabrice Bacchella wrote:
> I'm trying to install ovirt-shell on my mac, as explained in 
> http://www.ovirt.org/CLI#pypi , but if fails :
> 
> $ virtualenv-2.7 ovirt
> New python executable in ovirt/bin/python
> Installing setuptools, pip, wheel...done.
> $ ./ovirt/bin/easy_install ovirt-shell
> Searching for ovirt-shell
> Reading https://pypi.python.org/simple/ovirt-shell/
> Best match: ovirt-shell 3.5.0.6
> ...
> Finished processing dependencies for ovirt-shell
> 
> $ ./ovirt/bin/ovirt-shell 
> Traceback (most recent call last):
>   File "./ovirt/bin/ovirt-shell", line 9, in 
> load_entry_point('ovirt-shell==3.5.0.6', 'console_scripts', 
> 'ovirt-shell')()
>   File 
> "/private/tmp/ovirt/lib/python2.7/site-packages/pkg_resources/__init__.py", 
> line 552, in load_entry_point
> return get_distribution(dist).load_entry_point(group, name)
>   File 
> "/private/tmp/ovirt/lib/python2.7/site-packages/pkg_resources/__init__.py", 
> line 2672, in load_entry_point
> return ep.load()
>   File 
> "/private/tmp/ovirt/lib/python2.7/site-packages/pkg_resources/__init__.py", 
> line 2345, in load
> return self.resolve()
>   File 
> "/private/tmp/ovirt/lib/python2.7/site-packages/pkg_resources/__init__.py", 
> line 2351, in resolve
> module = __import__(self.module_name, fromlist=['__name__'], level=0)
>   File "build/bdist.macosx-10.10-x86_64/egg/ovirtcli/main.py", line 19, in 
> 
>   File 
> "build/bdist.macosx-10.10-x86_64/egg/ovirtcli/infrastructure/options.py", 
> line 21, in 
>   File 
> "build/bdist.macosx-10.10-x86_64/egg/ovirtcli/infrastructure/settings.py", 
> line 18, in 
>   File "build/bdist.macosx-10.10-x86_64/egg/cli/__init__.py", line 3, in 
> 
>   File "build/bdist.macosx-10.10-x86_64/egg/cli/context.py", line 34, in 
> 
> ImportError: cannot import name Terminal
> 

I have created the following bug to track this issue:

  https://bugzilla.redhat.com/1255409

Note that we (well, at least I) don't have any Mac OS environment to
test this, so it is unlikely that we can add support for it. Would you
be interested in working on this yourself?

-- 
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] ovirt-shell and PAGER

2015-08-20 Thread Juan Hernández
On 08/20/2015 01:17 PM, Fabrice Bacchella wrote:
> ovirt shell uses PAGER for all output, even single line one. I was using 
> PAGER=less, it made it barely usable. That's strange any way for a 
> interactive shell.

I have created the following bug to track this issue:

  https://bugzilla.redhat.com/1255409

Note that we (well, at least I) don't have any Mac OS environment to
test this, so it is unlikely that we can add support for it. Would you
be interested in working on this yourself?

-- 
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] ovirt-shell and PAGER

2015-08-20 Thread Juan Hernández
On 08/20/2015 01:17 PM, Fabrice Bacchella wrote:
> ovirt shell uses PAGER for all output, even single line one. I was using 
> PAGER=less, it made it barely usable. That's strange any way for a 
> interactive shell.

I have created the following bug to track this issue:

  https://bugzilla.redhat.com/1255406

Feel free to add more details to the bug.

-- 
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] ovirt-shell : which default start mode?

2015-06-19 Thread Juan Hernández
On 06/19/2015 09:45 AM, Nicolas Ecarnot wrote:
> Hi,
> 
> Since long, I'm using some scripts to create VM, add some components and 
> start them. My script is booting them in PXE.
> 
> After an upgrade in 3.5.1, I'm witnessing that the default boot is now 
> primarily using hard disk, and not PXE.
> 
> Is there a way for the ovirt-shell to ask a boot via PXE?
> 

Try this:

  # action vm myvm start --vm-os-boot "boot.dev=network"

> In fact, I find that the embeded inline help of ovirt-shell is difficult 
> to read, and some *tree view* of all options would be much better readable.
> 

-- 
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] ovirt-shell for ubuntu

2015-04-15 Thread Sandro Bonazzola
Il 15/04/2015 11:38, Juan Hernández ha scritto:
> On 04/15/2015 11:32 AM, Nathanaël Blanchet wrote:
>> Hello,
>>
>> I tried the same for engine-iso-uploader, but pip doesn't seem to find 
>> it. Does it exist for ubuntu?

engine-iso-uploader is not released through pip so it's not out for 
debian/ubuntu.
Patches for making the deb package are welcome :-)


>>
> 
> I don't have an answer for that. Sandro?
> 
>> Le 30/03/2015 16:58, Juan Hernández a écrit :
>>> On 03/30/2015 04:50 PM, Nathanaël Blanchet wrote:
 Hi all,

 Does an ovirt-shell-cli equivalent exist for debian/ubuntu client?
 knowing it is written in python, it must be quite easy to port it...
>>> The oVirt project doesn't provide a Debian or Ubuntu package for these
>>> tools, but they are distributed using Pypi, so you should be able to
>>> install them in Debian, Ubuntu or any other distribution that provides
>>> the "pip" tool:
>>>
>>># pip install ovirt-shell
>>>
>>> Please test that, if you find any issue we will do our best to fix it.
>>>
>>
>> ___
>> Users mailing list
>> Users@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
> 
> 


-- 
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] ovirt-shell for ubuntu

2015-04-15 Thread Nathanaël Blanchet

sure, still with the good rights 36:36

Le 15/04/2015 11:43, Simone Tiraboschi a écrit :


- Original Message -

From: "Nathanaël Blanchet" 
To: "Juan Hernández" , users@ovirt.org
Sent: Wednesday, April 15, 2015 11:32:53 AM
Subject: Re: [ovirt-users] ovirt-shell for ubuntu

Hello,

I tried the same for engine-iso-uploader, but pip doesn't seem to find
it. Does it exist for ubuntu?

It's not available via pip but only via rpm.
Currently it's still not available on debian/ubuntu as a deb package, you can 
try to manually deploy it extracting from the RPM.
Otherwise you can simply upload via SSH.


Le 30/03/2015 16:58, Juan Hernández a écrit :

On 03/30/2015 04:50 PM, Nathanaël Blanchet wrote:

Hi all,

Does an ovirt-shell-cli equivalent exist for debian/ubuntu client?
knowing it is written in python, it must be quite easy to port it...

The oVirt project doesn't provide a Debian or Ubuntu package for these
tools, but they are distributed using Pypi, so you should be able to
install them in Debian, Ubuntu or any other distribution that provides
the "pip" tool:

# pip install ovirt-shell

Please test that, if you find any issue we will do our best to fix it.


___
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


Re: [ovirt-users] ovirt-shell for ubuntu

2015-04-15 Thread Simone Tiraboschi


- Original Message -
> From: "Nathanaël Blanchet" 
> To: "Juan Hernández" , users@ovirt.org
> Sent: Wednesday, April 15, 2015 11:32:53 AM
> Subject: Re: [ovirt-users] ovirt-shell for ubuntu
> 
> Hello,
> 
> I tried the same for engine-iso-uploader, but pip doesn't seem to find
> it. Does it exist for ubuntu?

It's not available via pip but only via rpm.
Currently it's still not available on debian/ubuntu as a deb package, you can 
try to manually deploy it extracting from the RPM.
Otherwise you can simply upload via SSH.

> Le 30/03/2015 16:58, Juan Hernández a écrit :
> > On 03/30/2015 04:50 PM, Nathanaël Blanchet wrote:
> >> Hi all,
> >>
> >> Does an ovirt-shell-cli equivalent exist for debian/ubuntu client?
> >> knowing it is written in python, it must be quite easy to port it...
> > The oVirt project doesn't provide a Debian or Ubuntu package for these
> > tools, but they are distributed using Pypi, so you should be able to
> > install them in Debian, Ubuntu or any other distribution that provides
> > the "pip" tool:
> >
> ># pip install ovirt-shell
> >
> > Please test that, if you find any issue we will do our best to fix it.
> >
> 
> ___
> 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


Re: [ovirt-users] ovirt-shell for ubuntu

2015-04-15 Thread Juan Hernández
On 04/15/2015 11:32 AM, Nathanaël Blanchet wrote:
> Hello,
> 
> I tried the same for engine-iso-uploader, but pip doesn't seem to find 
> it. Does it exist for ubuntu?
> 

I don't have an answer for that. Sandro?

> Le 30/03/2015 16:58, Juan Hernández a écrit :
>> On 03/30/2015 04:50 PM, Nathanaël Blanchet wrote:
>>> Hi all,
>>>
>>> Does an ovirt-shell-cli equivalent exist for debian/ubuntu client?
>>> knowing it is written in python, it must be quite easy to port it...
>> The oVirt project doesn't provide a Debian or Ubuntu package for these
>> tools, but they are distributed using Pypi, so you should be able to
>> install them in Debian, Ubuntu or any other distribution that provides
>> the "pip" tool:
>>
>># pip install ovirt-shell
>>
>> Please test that, if you find any issue we will do our best to fix it.
>>
> 
> ___
> 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


Re: [ovirt-users] ovirt-shell for ubuntu

2015-04-15 Thread Nathanaël Blanchet

Hello,

I tried the same for engine-iso-uploader, but pip doesn't seem to find 
it. Does it exist for ubuntu?


Le 30/03/2015 16:58, Juan Hernández a écrit :

On 03/30/2015 04:50 PM, Nathanaël Blanchet wrote:

Hi all,

Does an ovirt-shell-cli equivalent exist for debian/ubuntu client?
knowing it is written in python, it must be quite easy to port it...

The oVirt project doesn't provide a Debian or Ubuntu package for these
tools, but they are distributed using Pypi, so you should be able to
install them in Debian, Ubuntu or any other distribution that provides
the "pip" tool:

   # pip install ovirt-shell

Please test that, if you find any issue we will do our best to fix it.



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


Re: [ovirt-users] ovirt-shell for ubuntu

2015-03-30 Thread Nathanaël Blanchet

Sorry, rather

Le 30/03/2015 18:16, Nathanaël Blanchet a écrit :

Thank you it works like a charm!

wget https://bootstrap.pypa.io/get-pip.py
pip install get-pip.py


sudo python get-pip.py
sudo pip install ovirt-shell

Le 30/03/2015 16:58, Juan Hernández a écrit :

On 03/30/2015 04:50 PM, Nathanaël Blanchet wrote:

Hi all,

Does an ovirt-shell-cli equivalent exist for debian/ubuntu client?
knowing it is written in python, it must be quite easy to port it...

The oVirt project doesn't provide a Debian or Ubuntu package for these
tools, but they are distributed using Pypi, so you should be able to
install them in Debian, Ubuntu or any other distribution that provides
the "pip" tool:

   # pip install ovirt-shell

Please test that, if you find any issue we will do our best to fix it.



___
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


Re: [ovirt-users] ovirt-shell for ubuntu

2015-03-30 Thread Nathanaël Blanchet

Thank you it works like a charm!

wget https://bootstrap.pypa.io/get-pip.py
pip install get-pip.py

Le 30/03/2015 16:58, Juan Hernández a écrit :

On 03/30/2015 04:50 PM, Nathanaël Blanchet wrote:

Hi all,

Does an ovirt-shell-cli equivalent exist for debian/ubuntu client?
knowing it is written in python, it must be quite easy to port it...

The oVirt project doesn't provide a Debian or Ubuntu package for these
tools, but they are distributed using Pypi, so you should be able to
install them in Debian, Ubuntu or any other distribution that provides
the "pip" tool:

   # pip install ovirt-shell

Please test that, if you find any issue we will do our best to fix it.



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


Re: [ovirt-users] ovirt-shell for ubuntu

2015-03-30 Thread Juan Hernández
On 03/30/2015 04:50 PM, Nathanaël Blanchet wrote:
> Hi all,
> 
> Does an ovirt-shell-cli equivalent exist for debian/ubuntu client? 
> knowing it is written in python, it must be quite easy to port it...

The oVirt project doesn't provide a Debian or Ubuntu package for these
tools, but they are distributed using Pypi, so you should be able to
install them in Debian, Ubuntu or any other distribution that provides
the "pip" tool:

  # pip install ovirt-shell

Please test that, if you find any issue we will do our best to fix it.

-- 
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] oVirt-shell command to move a disk

2014-12-01 Thread Nicolas Ecarnot

Le 01/12/2014 13:23, Juan Hernández a écrit :

On 12/01/2014 12:51 PM, Michael Pasternak wrote:

not sure what sdk version 3.4.4 is, but according to log, latest
official for 3.4 is 3.4.1.1-1
(make you have it installed)



There are two issues here. First is that the "move" disk operation on
the top level collection isn't correctly documented in the RSDL
metadata. As a result the Python SDK and the CLI don't support this
operation. You can however use the same operation in the context of the VM:

   # action disk {disk:id} move --vm-identifier {vm:id}
--storage_domain-name={storagedomain:name}

Please open a bug requesting a fix for this.


Done!

https://bugzilla.redhat.com/show_bug.cgi?id=1169376


The other issue is that the 3.4 version doesn't support specifying disks
by alias, only by id. This has been fixed in 3.5.

So, all in all, at the moment you will need a command like this:

   # action disk c6aab66a-b551-4cc5-8628-efe9622c0dce move
--vm-identifier myvm --storage_domain-name mysd


Your workaround is working : thank you.

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


Re: [ovirt-users] oVirt-shell command to move a disk

2014-12-01 Thread Juan Hernández
On 12/01/2014 12:51 PM, Michael Pasternak wrote:
> not sure what sdk version 3.4.4 is, but according to log, latest
> official for 3.4 is 3.4.1.1-1
> (make you have it installed)
> 

There are two issues here. First is that the "move" disk operation on
the top level collection isn't correctly documented in the RSDL
metadata. As a result the Python SDK and the CLI don't support this
operation. You can however use the same operation in the context of the VM:

  # action disk {disk:id} move --vm-identifier {vm:id}
--storage_domain-name={storagedomain:name}

Please open a bug requesting a fix for this.

The other issue is that the 3.4 version doesn't support specifying disks
by alias, only by id. This has been fixed in 3.5.

So, all in all, at the moment you will need a command like this:

  # action disk c6aab66a-b551-4cc5-8628-efe9622c0dce move
--vm-identifier myvm --storage_domain-name mysd

> 
> On Monday, December 1, 2014 12:10 PM, Nicolas Ecarnot
>  wrote:
> 
> 
> Le 01/12/2014 11:07, Michael Pasternak a écrit :
>> make sure you using latest sdk & cli, what is it btw? (run 'info' command)
> 
> [oVirt shell (connected)]# info
> 
> backend version: 3.4
> sdk version: 3.4.4
> cli version: 3.4.0.5
> python version : 2.6.6.final.0
> 
> I think I run the version that is installed according to the global
> oVirt version ecosystem - quite the same packages versions around 3.4.4.
> 
> 
>> [oVirt shell (connected)]# action disk serv-fs-int1_Disk1 move
>> --storagedomain-name data-vm-adm8
>>
>>
> 
>>
>> UNKNOWN ERROR
>> =
>>get() got
>> an unexpected keyword argument 'name'
> 
> 
> -- 
> Nicolas Ecarnot
> 
> 
> 
> 
> ___
> 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


Re: [ovirt-users] oVirt-shell command to move a disk

2014-12-01 Thread Michael Pasternak
not sure what sdk version 3.4.4 is, but according to log, latest official for 
3.4 is 3.4.1.1-1(make you have it installed)
 

 On Monday, December 1, 2014 12:10 PM, Nicolas Ecarnot 
 wrote:
   

 Le 01/12/2014 11:07, Michael Pasternak a écrit :
> make sure you using latest sdk & cli, what is it btw? (run 'info' command)

[oVirt shell (connected)]# info

backend version: 3.4
sdk version    : 3.4.4
cli version    : 3.4.0.5
python version : 2.6.6.final.0

I think I run the version that is installed according to the global 
oVirt version ecosystem - quite the same packages versions around 3.4.4.

> [oVirt shell (connected)]# action disk serv-fs-int1_Disk1 move
> --storagedomain-name data-vm-adm8
>
> 
>
> UNKNOWN ERROR
> =
>                                                                get() got
> an unexpected keyword argument 'name'


-- 
Nicolas Ecarnot


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


Re: [ovirt-users] oVirt-shell command to move a disk

2014-12-01 Thread Nicolas Ecarnot

Le 01/12/2014 11:07, Michael Pasternak a écrit :

make sure you using latest sdk & cli, what is it btw? (run 'info' command)


[oVirt shell (connected)]# info

backend version: 3.4
sdk version: 3.4.4
cli version: 3.4.0.5
python version : 2.6.6.final.0

I think I run the version that is installed according to the global 
oVirt version ecosystem - quite the same packages versions around 3.4.4.



[oVirt shell (connected)]# action disk serv-fs-int1_Disk1 move
--storagedomain-name data-vm-adm8



UNKNOWN ERROR
=
   get() got
an unexpected keyword argument 'name'



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


Re: [ovirt-users] oVirt-shell command to move a disk

2014-12-01 Thread Michael Pasternak
make sure you using latest sdk & cli, what is it btw? (run 'info' command)

 

 On Sunday, November 30, 2014 7:48 PM, Nicolas Ecarnot 
 wrote:
   

 Le 30/11/2014 15:01, Michael Pasternak a écrit :
> Hi Nicolas,
>
> In oVit you can find /Disks under several locations
>
> /api/disks
> /api/vms/{vm:id}/disks
> /api/templates/{template:id}/disks
> /api/vms/{vm:id}/snapshots/{snapshot:id}/disks
>
> to move disk to a different domain, you have to use first one,
> e.g disk with no context [1], on ovirt-shell language it will look like [2].
>
> [1] /disks/{disk:id}/move
> [2] action disk {disk:id} move -- storagedomain-name|--storagedomain-id
> [--action-async true] ...
> (use help/auto-completion to see command details/verbs)

Hi Mickael,

Thank you for your reply, but here is what I get :

[oVirt shell (connected)]# action disk serv-fs-int1_Disk1 move 
--storagedomain-name data-vm-adm8
 
 
UNKNOWN ERROR 
=
                                                              get() got 
an unexpected keyword argument 'name'
 


I get the same when using the id instead of the names.

-- 
Nicolas Ecarnot


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


Re: [ovirt-users] oVirt-shell command to move a disk

2014-11-30 Thread Nicolas Ecarnot

Le 30/11/2014 15:01, Michael Pasternak a écrit :

Hi Nicolas,

In oVit you can find /Disks under several locations

/api/disks
/api/vms/{vm:id}/disks
/api/templates/{template:id}/disks
/api/vms/{vm:id}/snapshots/{snapshot:id}/disks

to move disk to a different domain, you have to use first one,
e.g disk with no context [1], on ovirt-shell language it will look like [2].

[1] /disks/{disk:id}/move
[2] action disk {disk:id} move -- storagedomain-name|--storagedomain-id
[--action-async true] ...
(use help/auto-completion to see command details/verbs)


Hi Mickael,

Thank you for your reply, but here is what I get :

[oVirt shell (connected)]# action disk serv-fs-int1_Disk1 move 
--storagedomain-name data-vm-adm8


 
UNKNOWN ERROR 
=
 get() got 
an unexpected keyword argument 'name'




I get the same when using the id instead of the names.

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


Re: [ovirt-users] oVirt-shell command to move a disk

2014-11-30 Thread Michael Pasternak
Hi Nicolas,
In oVit you can find /Disks under several locations
/api/disks/api/vms/{vm:id}/disks/api/templates/{template:id}/disks/api/vms/{vm:id}/snapshots/{snapshot:id}/disks
to move disk to a different domain, you have to use first one,e.g disk with no 
context [1], on ovirt-shell language it will look like [2].

[1] /disks/{disk:id}/move[2] action disk {disk:id} move -- 
storagedomain-name|--storagedomain-id [--action-async true] ...(use 
help/auto-completion to see command details/verbs)
 

 On Saturday, November 29, 2014 12:56 AM, Nicolas Ecarnot 
 wrote:
   

 Hello,

I'm confused because though I'm using ovirt-shell to script many actions 
every day, and even after a large bunch of reading and testing, I can 
not find the correct syntax to move (offline/available) disks between 
storage domains.

May you help me please?

(oVirt 3.4.4)

-- 
Nicolas Ecarnot
___
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


Re: [ovirt-users] ovirt-shell

2014-10-03 Thread Juan Hernandez
On 10/03/2014 02:45 PM, Koen Vanoppen wrote:
> Dear all,
> 
> I wanted to connected to the ovirt-shell; But I get following error:
> 
> The host name "ovirt.brusselsairport.aero
> " contained in the URL doesn't match
> any of the names in the server certificate.
> 

This means that there is mismatch between the host name that you use and
the name contained in the certificate used by the engine web server.
This check is a typical security measure to avoid man in the middle
attacks when using SSL. I'd suggest you check the certificate of used by
the web server. In my environment, for example:

  # grep '^SSLCertificateFile' /etc/httpd/conf.d/ssl.conf
  SSLCertificateFile /etc/pki/ovirt-engine/certs/apache.cer

  # openssl x509 -in /etc/pki/ovirt-engine/certs/apache.cer -subject
-noout
  subject= /C=US/O=Example Inc./CN=ovirt.example.com

The relevant part here is the CN, it should match the name that you put
in the "url" parameter of the ovirt-shell.

If for whatever the reason you still want to connect using an incorrect
host name you can do so setting the "insecure" parameter to True.

> My config file:
> [cli]
> autoconnect = True
> autopage = True
> [ovirt-shell]
> username = admin
> timeout = 5
> extended_prompt = True
> url = https://ovirt.brusselsairport.aero/api
> insecure = False
> renew_session = False
> filter = False
> session_timeout = None
> ca_file = /root/ca.crt
> dont_validate_cert_chain = True
> key_file = None
> password = **
> #cert_file = None
> 
> Ideas?
> 
> Kind regards,
> 
> Koen
> 

-- 
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] ovirt-shell

2014-07-10 Thread Sven Kieske
Am 10.07.2014 17:28, schrieb Juan Hernandez:
> Did you consider using templates and pools?

Actually I'm using templates, but not pools
as I don't do this VDI stuff where it applies
the most.

Setup of the vms does work via cloud-init, also
via rest.

So I can really just encourage you to automate this :)
It works, but it takes some time.

-- 
Mit freundlichen Grüßen / Regards

Sven Kieske

Systemadministrator
Mittwald CM Service GmbH & Co. KG
Königsberger Straße 6
32339 Espelkamp
T: +49-5772-293-100
F: +49-5772-293-333
https://www.mittwald.de
Geschäftsführer: Robert Meyer
St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] ovirt-shell

2014-07-10 Thread Juan Hernandez
On 07/10/2014 05:28 PM, Juan Hernandez wrote:
> On 07/10/2014 05:07 PM, Sven Kieske wrote:
>> Well there is no guide on the web which I'm aware of.
>> But to my experience, scripting the shell has it's limitations
>> you might want to try the python sdk, which is more useful
>> or if you need some webapp anyway use the rest api.
>> you could also script the rest api using e.g. curl
>> but I wouldn't recommend that.
>>
>> there is documentation on this here:
>>
>> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.3/html/Developer_Guide/index.html
>>
>> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.3/html/Command_Line_Shell_Guide/index.html
>>
>> you can basically substitute rhev with ovirt.
>>
>> there still seems to be no updated dev guides for 3.4 though.
>>
> 
> The location of that documentation has changed a bit for 3.4:
> 
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.4/html/Technical_Guide/part-The_REST_Application_Programming_Interface.html
> 
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.4/html/Technical_Guide/part-The_Command_Line_Interface.html
> 
>> I have automated everything via REST, as I have php devs
>> who did the work ;)
>>
>> There are still some things you can't do via rest, like
>> creating network qos entities (attaching them to a vm works
>> but you need to create them manually).
>>
>> But in the future everything will use rest, so I guess this
>> is the best way to go.
>>
>> HTH
>>
>> Am 10.07.2014 16:46, schrieb Steve Kilduff:
>>> Excellent, thanks for the quick reply guys.
>>>
>>> I am trying to automate 100 vm creations so... If anyone has a good guide
>>> that exists I would be very appreciative, otherwise I will keep tipping
>>> away :)
>>>
>>> Steve
>>
> 
> Did you consider using templates and pools?
> 
> 

If you have a template with all the characteristics you need, you can
easily create the 100 VMs with a Python script like this:

#!/usr/bin/python

import ovirtsdk.api
import ovirtsdk.xml

# Connect to the server:
api = ovirtsdk.api.API(
url="https://rhel.example.com/ovirt-engine/api";,
username="admin@internal",
password="**",
insecure=True,
debug=False,
)

# Locate the cluster:
cluster = api.clusters.get(name="mycluster")
cluster = ovirtsdk.xml.params.Cluster(id=cluster.get_id())

# Locate the template:
template = api.templates.get(name="mytemplate")
template = ovirtsdk.xml.params.Template(id=template.get_id())

# Create the VMs:

for i in range(0, 99):
name = "vm%d" % i
print("Creating VM %s ..." % name)
vm = ovirtsdk.xml.params.VM(name=name, cluster=cluster,
template=template)
api.vms.add(vm)

# Disconnect:
api.disconnect()

--
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] ovirt-shell

2014-07-10 Thread Juan Hernandez
On 07/10/2014 05:07 PM, Sven Kieske wrote:
> Well there is no guide on the web which I'm aware of.
> But to my experience, scripting the shell has it's limitations
> you might want to try the python sdk, which is more useful
> or if you need some webapp anyway use the rest api.
> you could also script the rest api using e.g. curl
> but I wouldn't recommend that.
> 
> there is documentation on this here:
> 
> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.3/html/Developer_Guide/index.html
> 
> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.3/html/Command_Line_Shell_Guide/index.html
> 
> you can basically substitute rhev with ovirt.
> 
> there still seems to be no updated dev guides for 3.4 though.
> 

The location of that documentation has changed a bit for 3.4:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.4/html/Technical_Guide/part-The_REST_Application_Programming_Interface.html

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.4/html/Technical_Guide/part-The_Command_Line_Interface.html

> I have automated everything via REST, as I have php devs
> who did the work ;)
> 
> There are still some things you can't do via rest, like
> creating network qos entities (attaching them to a vm works
> but you need to create them manually).
> 
> But in the future everything will use rest, so I guess this
> is the best way to go.
> 
> HTH
> 
> Am 10.07.2014 16:46, schrieb Steve Kilduff:
>> Excellent, thanks for the quick reply guys.
>>
>> I am trying to automate 100 vm creations so... If anyone has a good guide
>> that exists I would be very appreciative, otherwise I will keep tipping
>> away :)
>>
>> Steve
> 

Did you consider using templates and pools?


-- 
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] ovirt-shell

2014-07-10 Thread Sven Kieske
Well there is no guide on the web which I'm aware of.
But to my experience, scripting the shell has it's limitations
you might want to try the python sdk, which is more useful
or if you need some webapp anyway use the rest api.
you could also script the rest api using e.g. curl
but I wouldn't recommend that.

there is documentation on this here:

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.3/html/Developer_Guide/index.html

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.3/html/Command_Line_Shell_Guide/index.html

you can basically substitute rhev with ovirt.

there still seems to be no updated dev guides for 3.4 though.

I have automated everything via REST, as I have php devs
who did the work ;)

There are still some things you can't do via rest, like
creating network qos entities (attaching them to a vm works
but you need to create them manually).

But in the future everything will use rest, so I guess this
is the best way to go.

HTH

Am 10.07.2014 16:46, schrieb Steve Kilduff:
> Excellent, thanks for the quick reply guys.
> 
> I am trying to automate 100 vm creations so... If anyone has a good guide
> that exists I would be very appreciative, otherwise I will keep tipping
> away :)
> 
> Steve

-- 
Mit freundlichen Grüßen / Regards

Sven Kieske

Systemadministrator
Mittwald CM Service GmbH & Co. KG
Königsberger Straße 6
32339 Espelkamp
T: +49-5772-293-100
F: +49-5772-293-333
https://www.mittwald.de
Geschäftsführer: Robert Meyer
St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] ovirt-shell

2014-07-10 Thread Steve Kilduff
Excellent, thanks for the quick reply guys.

[oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name
backend --name eth5 --mac-address '00:1a:4a:f3:43:be'

id : 1d6f963c-3fee-48ac-88cd-963055666bb8
name   : eth5
active : True
interface  : virtio
linked : True
mac-address: 00:1a:4a:f3:43:be
network-id : 06b43265-4bfa-4a63-a9cc-3e5af9ad8493
plugged: True
vm-id  : 54d5deb2-0547-4a1e-8657-1fc8e1fe61e7
vnic_profile-id: 12b9a3fe-cad3-4ca8-8212-a936df966012

I am trying to automate 100 vm creations so... If anyone has a good guide
that exists I would be very appreciative, otherwise I will keep tipping
away :)


On Thu, Jul 10, 2014 at 4:28 PM, Sven Kieske  wrote:

>
>
> Am 10.07.2014 16:07, schrieb Steve Kilduff:
> > Hi All,
> >
> > Trying to add a nic to a vm with a specific mac address.
> >
> > [oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name
> > backend --name eth4 --mac-address HH:HH:EE:HH:HH:01
>
> afaik you just need to put "" around your mac, but I'm not 100% sure.
> I seem to have deleted the code where I stumbled across the
> same problem :(
>
> Adding Juan who should be able answer this.
>
> --
> Mit freundlichen Grüßen / Regards
>
> Sven Kieske
>
> Systemadministrator
> Mittwald CM Service GmbH & Co. KG
> Königsberger Straße 6
> 32339 Espelkamp
> T: +49-5772-293-100
> F: +49-5772-293-333
> https://www.mittwald.de
> Geschäftsführer: Robert Meyer
> St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
> Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
> ___
> 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


Re: [ovirt-users] ovirt-shell

2014-07-10 Thread Juan Hernandez
On 07/10/2014 04:07 PM, Steve Kilduff wrote:
> Hi All,
> 
> Trying to add a nic to a vm with a specific mac address.
> 
> [oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name
> backend --name eth4 --mac-address HH:HH:EE:HH:HH:01
> 
>    ERROR =
>   status: 400
>   reason: Bad Request
>   detail: MAC address must be in format "HH:HH:HH:HH:HH:HH" where H is a
> hexadecimal character (either a digit or A-F, case is insignificant).
>   =
> 
> 
> Also interesting is when I change the beginning of the mac address to 00
> instead of HH, I get :
> 
> [oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name
> backend --name eth4 --mac-address 01:HH:EE:HH:HH:01
>    ERROR
> ==
>wrong number of arguments, try 'help add' for help.
>  
> =
> 
> 
> 
> I have tried some things like enclosing in single and double quotes but
> no success.
> 
> I have also tried to read the help sections on the shell interface but I
> also could not figure it out.
> 
> Thanks in advance,
> 

There are two issues here. One is that currently the CLI doesn't work
correctly with parameters that start with a number, as the lexer splits
it into a number and a word, and then it thinks that there are two
parameters instead of one. We have a bug (a RHEV bug, it it affects
oVirt as well) for that already:

  https://bugzilla.redhat.com/show_bug.cgi?id=1110366

You can workaround this using quotes, either simple or double.

The other issue is that you are probably a *multicast* MAC address. That
is what the server is actually checking, not just that it is
syntactically correct. This basically means that the eight bit can't be
1, as that is what indicates multicast. Just make sure that you use a
MAC address whose second character isn't an odd number. For example,
this will fail:

  # add nic --vm-identifier ov31 --network-name backend --name eth4
--mac-address '01:01:01:01:01:01'

But this will succeed:

  # add nic --vm-identifier ov31 --network-name backend --name eth4
--mac-address '00:01:01:01:01:01'

The error message could be better. You may want to open a bug requesting
an improvement.

-- 
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] ovirt-shell

2014-07-10 Thread Sven Kieske


Am 10.07.2014 16:07, schrieb Steve Kilduff:
> Hi All,
> 
> Trying to add a nic to a vm with a specific mac address.
> 
> [oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name
> backend --name eth4 --mac-address HH:HH:EE:HH:HH:01

afaik you just need to put "" around your mac, but I'm not 100% sure.
I seem to have deleted the code where I stumbled across the
same problem :(

Adding Juan who should be able answer this.

-- 
Mit freundlichen Grüßen / Regards

Sven Kieske

Systemadministrator
Mittwald CM Service GmbH & Co. KG
Königsberger Straße 6
32339 Espelkamp
T: +49-5772-293-100
F: +49-5772-293-333
https://www.mittwald.de
Geschäftsführer: Robert Meyer
St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users