Skip to content

Conversation

@lindig
Copy link
Contributor

@lindig lindig commented Sep 19, 2023

QEMU has a file size limit to prevent denial of service attacks. However with the introduction of vTPM the vTPM state is now saved in the qemu device stream. If the vTPM happens to have a lot of data then the quota is hit, qemu returns an error, the migration fails and XAPI kills the original VM.
(Same bug happens if we were trying to take a checkpoint, the VM ends up dead).

Fixing that would require fast resume, which we don't have, however the file size limit needs to be updated. Don't try to be too tight on the size, the vTPM may be a max of 256KiB, so increasing this to 512KiB should work, but to be safe double that to 1MiB.

QEMU has a file size limit to prevent denial of service attacks.
However with the introduction of vTPM the vTPM state is now saved in the qemu device stream.
If the vTPM happens to have a lot of data then the quota is hit, qemu returns an error, the migration fails
and XAPI kills the original VM.
(Same bug happens if we were trying to take a checkpoint, the VM ends up dead).

Fixing that would require fast resume, which we don't have, however the file size limit needs to be updated.
Don't try to be too tight on the size, the vTPM may be a max of 256KiB, so increasing this to 512KiB should work,
but to be safe double that to 1MiB.

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
Signed-off-by: Christian Lindig <christian.lindig@cloud.com>
@rosslagerwall
Copy link
Collaborator

Does this need to be backported? Isn't this only necessary for vTPM?

@lindig
Copy link
Contributor Author

lindig commented Sep 20, 2023

I asked the same question and learned that this was not just for vTPM but also emulated network drivers.

@rosslagerwall
Copy link
Collaborator

Is there a bug ticket for the emulated network driver issue? I don't recall seeing that.

@rosslagerwall
Copy link
Collaborator

In any case, backporting this change won't harm anything.

@lindig lindig merged commit 291d3fe into xapi-project:0.150-lcm Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants