-
Notifications
You must be signed in to change notification settings - Fork 565
hypervisor: kvm: Save KVM HyperV SynIC emulation state #7492
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
hypervisor: kvm: Save KVM HyperV SynIC emulation state #7492
Conversation
phip1611
left a comment
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.
LGTM.
2f2dcab to
0abfabd
Compare
As well as saving the MSRs as it is currently does ensure that the KVM capability is enabled along with keeping the internal state updated. Signed-off-by: Rob Bradford <[email protected]> Co-authored-by: Chengyu Fu <[email protected]>
0abfabd to
3442153
Compare
|
Just FYI, I am not sure if this is really related: I just tested snapshot/restore with my WindowsPE installer setup. When restoring the snapshot, I am no longer able to connect to the windows VM via network. I only see the following: |
Are you saying that somehow not restoring the state makes this work? Did you have |
I never tested snapshot/restore with Windows before I saw this PR. I just have a WindowsPE installer setup here which works great when I boot it normally, but I am unable to do a snapshot/restore cycle with this image. Once restored, the ip of the guest is no longer reachable. SynIC was enabled when I bootet the VM initially. |
Okay, then we cannot say for sure if this issue is caused by this change or not. |
Only for x86-64 for now as it's still failing on ARM64. See: cloud-hypervisor#4327 Signed-off-by: Rob Bradford <[email protected]>
3442153 to
f6e2a8d
Compare
4d79709
@tpressure OS: Windows 11 IoT Enterprise LTSC 2024 #!/bin/bash
FW=CLOUDHV.fd
DISK0=disk0-os.raw
rm -f api.sock
sudo cloud-hypervisor \
--api-socket api.sock \
--kernel $FW \
--disk path=$DISK0 \
--cpus boot=4,kvm_hyperv=on \
--memory size=8G \
--serial tty \
--console off \
--seccomp false \
--net tap=,ip=192.168.249.1,mask=255.255.255.0#!/bin/bash
snapshot=$(pwd)/snapshot_$(date +"%Y%m%d_%H%M%S")
echo "$snapshot" > latest_snapshot
mkdir -p "$snapshot"
sudo ch-remote --api-socket ./api.sock pause
sudo ch-remote --api-socket ./api.sock snapshot file://$snapshot
sudo ch-remote --api-socket ./api.sock shutdown-vmm#!/bin/bash
rm -f api.sock
sudo cloud-hypervisor --api-socket ./api.sock --seccomp false#!/bin/bash
snapshot=$(cat latest_snapshot)
sudo ch-remote --api-socket ./api.sock restore source_url=file://$snapshot
sudo ch-remote --api-socket ./api.sock resume |
Thanks for the pointers. I will give this a spin later this week. |
As well as saving the MSRs as it is curretly does ensure ensure that the
KVM capabability is enabled along with ensuring that the internal state
is updated.
Signed-off-by: Rob Bradford [email protected]
Co-authored-by: Chengyu Fu [email protected]