XO cant Snapshot itself ?
-
I was trying to take a Snapshot from my XOA (Source) VM before updating it but aparently i cant:
vm.snapshot { "id": "4ac34777-312e-cb6e-67a0-ccc34a71f8e1" } { "code": "UNIMPLEMENTED_IN_SM_BACKEND", "params": [ "OpaqueRef:662bcb78-4ffa-4c26-8d82-c5197d7c7e07" ], "task": { "uuid": "a24d6e0f-04cf-039d-b0bb-6a53589f9874", "name_label": "Async.VM.snapshot", "name_description": "", "allowed_operations": [], "current_operations": {}, "created": "20230331T07:07:23Z", "finished": "20230331T07:07:24Z", "status": "failure", "resident_on": "OpaqueRef:7a2e10b8-677f-4c65-95cd-b8393884450b", "progress": 1, "type": "<none/>", "result": "", "error_info": [ "UNIMPLEMENTED_IN_SM_BACKEND", "OpaqueRef:662bcb78-4ffa-4c26-8d82-c5197d7c7e07" ], "other_config": {}, "subtask_of": "OpaqueRef:NULL", "subtasks": [ "OpaqueRef:b2436483-c1ee-447c-8016-636a52c61528" ], "backtrace": "(((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 80))((process xapi)(filename list.ml)(line 110))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 122))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 35))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 130))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 171))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 209))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 220))((process xapi)(filename list.ml)(line 121))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 222))((process xapi)(filename ocaml/xapi/xapi_vm_clone.ml)(line 442))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 35))((process xapi)(filename ocaml/xapi/xapi_vm_snapshot.ml)(line 33))((process xapi)(filename ocaml/xapi/message_forwarding.ml)(line 131))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process xapi)(filename ocaml/xapi/rbac.ml)(line 233))((process xapi)(filename ocaml/xapi/server_helpers.ml)(line 104)))" }, "message": "UNIMPLEMENTED_IN_SM_BACKEND(OpaqueRef:662bcb78-4ffa-4c26-8d82-c5197d7c7e07)", "name": "XapiError", "stack": "XapiError: UNIMPLEMENTED_IN_SM_BACKEND(OpaqueRef:662bcb78-4ffa-4c26-8d82-c5197d7c7e07) at Function.wrap (/opt/xen-orchestra/packages/xen-api/src/_XapiError.js:16:12) at _default (/opt/xen-orchestra/packages/xen-api/src/_getTaskResult.js:11:29) at Xapi._addRecordToCache (/opt/xen-orchestra/packages/xen-api/src/index.js:984:37) at forEach (/opt/xen-orchestra/packages/xen-api/src/index.js:1018:14) at Array.forEach (<anonymous>) at Xapi._processEvents (/opt/xen-orchestra/packages/xen-api/src/index.js:1008:12) at Xapi._watchEvents (/opt/xen-orchestra/packages/xen-api/src/index.js:1181:14) at runNextTicks (node:internal/process/task_queues:60:5) at processImmediate (node:internal/timers:447:9) at process.callbackTrampoline (node:internal/async_hooks:130:17)" }
Every other VM on that host i can snapshot just fine.
I even tried shutting it down and then taking a snapshot with the same result.
8.2.1 Host is Up2Date -
What kind of storage your XO VM (not XOA if it's from the source) is running?
-
@olivierlambert
Its running on a Local attached 8TB Disk thats also used to Store the Backups -
And how one would snapshot a physical disk?
-
@olivierlambert Well its virtual disk is located on a local attached 8TB Disk .....
-
I suppose the xoa backup hdd is a raw virtual drive, isn't it?
-
@olivierlambert Yes i think it is, if i remember correct that was the only way to add +4TB drives ?
I just tested to do a snapshot from another VM on that disk, that works. -
Yes, because on your other VMs, you aren't using a raw VDI RAW doesn't support snapshots, as explained in our doc: https://docs.xcp-ng.org/storage/#using-raw-format
-
@olivierlambert Okay but obviously i can create snapshots on the RAW SR (here OPensense in the screenshot above). So this is a should but bould sometiomes does work situation ?-)
-
Are you sure? It seems you did a snapshot on non-raw VM disk, which is OK. If you do a VM.snapshot, it will individually snapshot ALL the VM disk, including the raw ones. And this is when it breaks.
I would be very happy to get snapshots on raw drives, but it's not physically possible with SMAPIv1.
-
@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?