[Users] Fast way to see all snapshots on my infra?

Gianluca Cecchi gianluca.cecchi at gmail.com
Sat Mar 23 10:41:27 UTC 2013


On Fri, Mar 22, 2013 at 3:07 PM, René Koch (ovido) wrote:
> Hi Gianluca,
>
> You can try something like this (dirty) command:
>
> URL='https://localhost/api'; USER='admin at internal';
> cp /dev/null /tmp/ovirt-snapshots; echo -e "list vms\nexit"
>> /tmp/ovirt-vms; for VM in `ovirt-shell -l ${URL} -u ${USER} -c -I
> -f /tmp/ovirt-vms | grep name | tr -s ' ' ' ' | cut -d' ' -f3`; do echo
> "list snapshots --vm-identifier ${VM} --show-all"
>>> /tmp/ovirt-snapshots; done; echo "exit" >> /tmp/ovirt-snapshots;
> ovirt-shell -l ${URL} -u ${USER} -c -I -f /tmp/ovirt-snapshots
>

Ok, it works thanks.

Two questions:

1) On my all-in-one system with f18 + oVirt stable 3.2.1 I have
ovirt-engine-3.2.1-1.fc18.noarch
ovirt-engine-cli-3.2.0.11-1.fc18.noarch

when I run ovirt-shell I get

>>> connected to oVirt manager 3.2.0.0 <<<

so this banner refers to ovirt-shell itself and not the engine itself,
I presume... correct?

2) If I have one VM with one snapshot the beginning of the output is:

==========================================
 >>> connected to oVirt manager 3.2.0.0 <<<
 ==========================================


id             : f916e1a3-13bc-43e8-8187-65a1ab9163c8
description    : Active VM
date           : 2013-03-01T00:31:20.898+01:00
snapshot_status: ok
type           : active

id                           : 5a623a18-11eb-455b-9791-680795a23f8e
description                  : test
date                         : 2013-03-22T01:08:50.038+01:00
...

Then I create another snapshot and I get:

==========================================
 >>> connected to oVirt manager 3.2.0.0 <<<
 ==========================================


id             : c714182a-46e2-4a85-b7db-1b74542b202c
description    : Active VM
date           : 2013-03-01T00:31:20.898+01:00
snapshot_status: ok
type           : active

id                           : 5a623a18-11eb-455b-9791-680795a23f8e
description                  : test
date                         : 2013-03-22T01:08:50.038+01:00

...

id                           : f916e1a3-13bc-43e8-8187-65a1ab9163c8
description                  : test2
date                         : 2013-03-23T11:27:21.931+01:00
snapshot_status              : ok
...

If the first "id" value in first 5 lines refers to VM itself, why does
it change between first run with one snapshot
(value  f916e1a3-13bc-43e8-8187-65a1ab9163c8)
and the second run
(value c714182a-46e2-4a85-b7db-1b74542b202c)

btw the id of first run matches the id "assigned" to the second
snapshot in second run (test2)?????

Thanks,
Gianluca



More information about the Users mailing list