-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CA-392836,CA-392847: Lost the power state on suspended VM import #5632
CA-392836,CA-392847: Lost the power state on suspended VM import #5632
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks correct but the commit message could be improved. Specifically: on import maintain the power state and don't set it to Halted.
b5a26ae
to
3fdf083
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I'm wondering how the previous code with the license feature actually worked
Those two lines were added a few weeks ago in ebb58a8 when replacing the function
where I think the problem is that the import code still needs the I think we need to use something like
within the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above.
Hi @robhoes thanks. I see it now.
Otherwise, a |
The VM power state should be preserved on a suspended VM import. In commit ebb58a8, the power state and suspend VDI in `vm_record` were reset on importing a suspended VM. This meant to facilitate the following `Client.VM.create_from_record`. But this gets the restore of power state and suspend VDI broken as it requires the data in `vm_record`. This commit preserves the data in `vm_record` and reset it just before it being passed to `Client.VM.create_from_record`. Signed-off-by: Ming Lu <ming.lu@cloud.com>
3fdf083
to
db31267
Compare
The VM power state should be preserved on a suspended VM import.
In commit ebb58a8, the power state and suspend VDI in
vm_record
werereset on importing a suspended VM. This meant to facilitate the
following
Client.VM.create_from_record
. But this gets the restore ofpower state and suspend VDI broken as it requires the data in
vm_record
.This commit preserves the data in
vm_record
and reset it just beforeit being passed to
Client.VM.create_from_record
.