Closed fenix011 closed 7 years ago
Hello,
GANDI API don't allow to rollback a disk which is still attached to a vm, so you must first detach your disk disk#17132652
before be allowed to rollback, so in your case this command should solve this
gandi disk detach sys_panoramix_20170326213724
Umh... i'm puzzled. Let me try to
explain me why i am so. In my our scenario : being
sys_panoramix_20170326213724
as the one 'snapshoted disk' from which we want to
rollback, and
sys_panoramix
the disk currently in use.
shouldn't be
$ gandi disk detach sys_panoramix
$ gandi disk rollback sys_panoramix_20170326213724
the right steps/ commands ?
You're right, I don't have IDs of your disks to know which one was disk with id #17132652 so I assumed you only had the ones listed in the issue so I took the first one.
Uops ! S.O.S.
(gandi.cli)jordi@i-ching:/DATA/gandi.cli$ gandi disk detach sys_panoramix
Are you sure you want to detach sys_panoramix? [y/N]: y
The disk is still attached to the vm 275068.
Will detach it.
Detaching your disk(s).
Progress: [#####################################################---------------------------] 66.67% 00:00:01
An error has occured during operation processing: can't detach boot disk while vm is running
(gandi.cli)jordi@i-ching:/DATA/gandi.cli$ gandi vm stop panoramix
Stopping your Virtual Machine(s) 'panoramix'.
Progress: [################################################################################] 100.00% 00:00:21
(gandi.cli)jordi@i-ching:/DATA/gandi.cli$ gandi disk detach sys_panoramix
Are you sure you want to detach sys_panoramix? [y/N]: y
The disk is still attached to the vm 275068.
Will detach it.
Detaching your disk(s).
Progress: [################################################################################] 100.00% 00:00:08
(gandi.cli)jordi@i-ching:/DATA/gandi.cli$ gandi disk rollback sys_panoramix_20170331213724
Disk rollback in progress.
Progress: [################################################################################] 100.00% 00:00:21
(gandi.cli)jordi@i-ching:/DATA/gandi.cli$ gandi vm start panoramix
Usage: gandi vm start [OPTIONS] RESOURCE...
Error: Gandi API has returned an error: <Fault 530246: 'Error on object : OBJECT_VM (CAUSE_NO_DISK) [trying to start a VM with no disk attached]'>
(gandi.cli)jordi@i-ching:/DATA/gandi.cli$ gandi disk attach sys_panoramix
Usage: gandi disk attach [OPTIONS] DISK VM
Error: Missing argument "vm".
(gandi.cli)jordi@i-ching:/DATA/gandi.cli$ gandi disk attach sys_panoramix panoramix
Are you sure you want to attach disk 'sys_panoramix' to vm 'panoramix'? [y/N]: y
Attaching your disk(s).
Progress: [################################################################################] 100.00% 00:00:16
(gandi.cli)jordi@i-ching:/DATA/gandi.cli$ gandi vm start panoramix
Starting your Virtual Machine(s) 'panoramix'.
Progress: [#####################################################---------------------------] 66.67% 00:00:09
An error has occured during operation processing: Operation failed to complete
what are we missing here ?
ah... as per @aze suggestion, i failed to set up newly attached disk as 'boot disk'. Accordingly, instead of
$ gandi disk attach sys_panoramix panoramix
command to issue may have been.. :
$ gandi disk attach sys_panoramix panoramix -p 0
...instead. Note the appended -p 0 parameters .
What am i missing ?
thanks beforehand