XO cant Snapshot itself ?
-
@olivierlambert maybe i missunderstood things, the RAW Disk from my XO VM is the 7TB data disk "[NOBAK] xoa_backup_hdd".
The system disk is "xoa_sda" is not RAW.So i thought excluding the disk with "[NOBAK]" would make me able to snapshot the VM (system disk). So whenever you have attached a RAW device makes you unable to snapshot the VM.
Detaching it, taking a snapshot and reattaching it would work however?
-
- On XCP-ng 8.2: [NOBAK] will be only used by Xen Orchestra to NOT export the snapshot generated by
VM.snapshot
method. - On XCP-ng 8.3: [NOBAK] will be used by XO to exclude the disk from the
VM.snaphot
call during an XO backup (since we added that feature in XAPI ourselves)
In any case, a manual snapshot will snap all the drives.
- On XCP-ng 8.2: [NOBAK] will be only used by Xen Orchestra to NOT export the snapshot generated by
-
You can do this on the cli (in 8.3) via
xe vm-snapshot new-name-label=newname uuid=vmUUID ignore-vdi-uuids=uuid1,uuid2,uuid3
It is currently not possible in Xen-Orchestra, see
https://xcp-ng.org/forum/topic/3607/snapshot-backup-exclude-additional-mounted-disk/8?_=1680267126156 -
Thanks for the heads up. A [NOSNAP] Feature sounds like a good idea though
-
We have to discuss this internally with @julien-f
-
FYI just for future things, a generally better way to make greater than 2TiB disks is to simply span them within the guest OS, so basically for 7TiB just make like 4 2TiB VHD's and then have the VM OS span those disks so they appear as a single disk within the VM.
I do this all the time, works super well and gives you the ability to still snapshot them, etc....
-
@planedrop are you using LVM for that or how are u doing that? I never bothered with the problem because i dont have enough local space for 8TB disk snapshots anyways.
-
@Meth0d Format wise I am using EXT so it's thin provisioned, and since it's all thin provisioned, snapshots only take up the space of the changes to the disk, so you don't really need enough space for 8TB snapshots.
As for LVM, you mean in the VMs to manage spanning? So far I've only really had a need to go beyond 2TiB for Windows VMs so I'm just using NTFS with Windows Disk Manager for those spans. But I imagine you could do it with LVM in Linux, not sure if there are better options for it.
-
@olivierlambert Does
[NOSNAP]
implies[NOBAK]
?If not, should we ignore
[NOSNAP]
when a snapshot is required to backup the VM? -
That's a good question and an important choice to make
IMHO, the principle of least surprise would tell to ignore
[NOSNAP]
during a backup. Because I'm afraid people would backup a VM with[NOSNAP]
and expect it to be saved. That would be a bad surprise if not. What do you think? -
@olivierlambert I think that
[NOSNAP]
means that this VDI should not be snapshotted and that ignoring it during backup would be surprising.But your point is valid too, I have no ideal solution, hence my question ^^
-
I don't see a case where one would want
[NOSNAP]
but not[NOBAK]
. Maybe we could require either none or both of them during a backup and not support one without the other? -
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.