JoaoJandre commented on PR #13020:
URL: https://github.com/apache/cloudstack/pull/13020#issuecomment-4372673196
I was able to do some tests. I'm not versed in how the UEFI handling works
and do not use UEFI in general, so my tests were focused on the VM snapshot
workflows. I'm sure there could be some UEFI related tests to be done, but I'll
leave it to someone else.
| Test | Result | Expected? |
| --- | --- | --- |
| Created a VM in a host with UEFI but withtout the patch. Tried to create a
VM snapshot | Error | Y |
| Migrated said VM to a host with the patch and created VM snapshots s1 and
s2 | Success | Y |
| Restored to snapshot s1 and checked files | Success | Y |
| Restored to snapshot s2 and checked files | Success | Y |
| Deleted snapshots s1 and s2 | Success, and nvram files deleted | Y |
I redid the tests with a stopped VM and obtained the same results.
Regarding the first test:
If you try to take a VM snapshot of a VM with UEFI in a host that does not
have the patch applied, the VM snapshot will fail (as expected), but it will be
in allocated state, meaning it is impossible to remove. You should put the
snapshot in the `Error` state.
To fix this, I think you could move the host selection and validation to
after the `transitStateWithoutThrow(vmSnapshot,
VMSnapshot.Event.CreateRequested);` line in the `takeVmSnapshotInternal`
Method. The current problem is that this exception is thrown:
```
Failed to create Instance Snapshot: [VMSnapshot
{"id":22,"name":"i-2-382-VM_VS_20260504134423","uuid":"5236dc5e-795f-4284-81a1-56b1102c1662","vmId":382}]
due to: Unable to transition to a new state from Allocated via OperationFailed
com.cloud.utils.exception.CloudRuntimeException: Unable to transition to a new
state from Allocated via OperationFailed
```
Could you check this @Kunalbehbud ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]