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 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 
nico...@ecarnot.net 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-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
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 
nico...@ecarnot.net 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 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
 nico...@ecarnot.net 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 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-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 
nico...@ecarnot.net 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 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