XO cant Snapshot itself ?
-
The situation I can have in mind:
- you want your VM to be backup
- when you do a manual snapshot, you don't want to snap a disk
But why doing this? I don't know, it's hard to predict the need for this⦠At least, if we choose to NOT doing a backup of this disk with NOSNAP, we MUST tell that clearly in the doc.
-
@julien-f @olivierlambert
Was there a resolution on the [NOSNAP] feature just much convenient than going to the CMD each time ?In the meantime will be using snippet below so low priority for me:
xe vm-snapshot new-name-label=newname uuid=vmUUID ignore-vdi-uuids=uuid1,uuid2,uuid3
-
You mean [NOBAK]?
-
@olivierlambert Thanks for the quick reply. [NOBAK] works for backup by ignoring VDI with [NOBAK] in its name, but when running manual snapshot like stated above the [NOBAK] still show up in the SR meaning it made a copy of the [NOBACK].
Ideally with [NOBAK] it should not take snapshot or backup right or am i understanding it incorrectly? Does this only apply to automated BACKUP & SNAPSHOT only?
-
From my point of view, it should be with "OR" and if the condition is fulfilled to execute.
E.g :- if I have "[NOSNAP] 'VM name' " not to execute snapshoot
- if I have "[NOBAK] 'Vm name' " not to execute backup
- if I have "[NOSNAP] [NOBAK] 'Vm name' " not to execute snapshot and backup
But if you make a backup, remove only what is with [NOBAK]
-
Opinion @julien-f ?
-
This is what I was thinking
- [NOSNAP] to be like SDA and disk 3
- [NOBAK] to be with SDA and disk 2
- In both cases disk 4 is excluded
-
@Gheppy Wow great illustration i think this is perfect but only if it is feasible to implement it now...
FYI as a side note I notice that when I do ignore-vdi-uuids=uuid1,uuid2,uuid3 I notice that when I reload snapshots of the VM the ignore vdi(s) disappear in the Disks section. Which makes logical sense as those ignore-vdi-uuids are not part off the list that are snapshotted. But it's a bit of an inconvenient to add VDI back in as those vdi should still be part of the disk just not part of the snapshots. But otherwise it works great.
To snapshot do the following to ignore certain vdi(s):
xe vm-snapshot new-name-label="newname_YYYY-MM-DDTHH:MM:SS.sssZ" uuid=vmUUID ignore-vdi-uuids=uuid1
where uuid1=[NOSNAP] TESTING
Once reload the [NOSNAP] disappear:
Beside that this is the best workaround for now and this little inconvenience is not a big deal. But in case someone need to understand it hopefully I added enough detail to clarify this content for future readers.
-
@olivierlambert Completely separate
[NOSNAP]
(for non-backup snapshots) and[NOBAK]
(for backups) would be fine by me. -
It's implemented: https://github.com/vatesfr/xen-orchestra/commit/dcf6885dfaec000e93e4630307fe9d2d7fd66232
Thanks everyone for your feedback.
-
@julien-f Thanks a lot Julien. So this going to be implemented in next release?
So when I run [NOSNAP] it will ignore these VDI with [NOSNAP] at the beginning of the name but just wondering when loading from the snapshot those [NOSNAP] vdi won't be loaded so i just have to add them in to the disk tab so it can be boot back up like normal correct? This is the default case currently when running snippet below.
xe vm-snapshot new-name-label="newname_YYYY-MM-DDTHH:MM:SS.sssZ" uuid=vmUUID ignore-vdi-uuids=uuid1
-
@wilsonqanda Exactly, under the hood that's precisely what XO is doing, it's calling
VM.snapshot
with theignore_vdis
param. -
@julien-f Thanks a lot for this update!
-
-