Skip to content

Why are CBT-enabled VDIs from VM snapshots checked during pool migration? #6627

@gthvn1

Description

@gthvn1

I created a snapshot of a VDI (with CBT enabled) using VDI.snapshot. Then I tried to migrate the VDI, but since CBT was enabled, it failed (that's fine). I disabled CBT for the current VDI (the snapshot still had CBT enabled) and was then able to perform the migration without issues. It looks ok for me.

However, if I do the same operation using VM.snapshot instead, the migration fails because the snapshot has CBT enabled. Looking into the code, the difference compared with VDI.snapshot is that during pool migration, the system checks for the presence of snapshots. In the case of VM.snapshot, snapshots exist, and all VDIs are checked—including snapshots. If a snapshot was created while CBT was enabled, that snapshot permanently retains CBT, even if CBT is later disabled on the active VDI.

My question is: it seems I can perform VDI live migration even if the VDI has snapshots with CBT enabled (it is the case with VDI.snapshot). Why, then, when the VM has snapshots, do we check the VDIs of the snapshots as well? Could we not just skip the CBT check for snapshots?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions