-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Implement the snapshot commands #1054
Conversation
This has similar problems to the pause commands, in that the ssh mux is not too happy about the restore ? |
This comment was marked as outdated.
This comment was marked as outdated.
pkg/qemu/qemu.go
Outdated
return err | ||
} | ||
|
||
func List(cfg Config) (string, error) { |
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.
Perhaps add a comment to clarify that the result is not machine-parsable
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.
Good idea, I think the original API just promises a list of strings (lines).
printf("Snapshot list:\n");
bdrv_snapshot_dump(NULL);
printf("\n");
for(i = 0; i < nb_sns; i++) {
sn = &sn_tab[i];
bdrv_snapshot_dump(sn);
printf("\n");
}
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.
I removed the initial heading, so now it at least looks similar to limactl ls
$ limactl snapshot create --tag snap alpine
$ limactl snapshot list alpine
ID TAG VM SIZE DATE VM CLOCK
1 snap 0 B 2022-10-16 11:37:23 00:00:00.000
Thanks, the CLI design looks good, could you update the docs and integration tests? |
Left to do is adding integration tests, for the |
Some help with the integration tests for snapshots would be appreciated. 🙏 |
Integration tests can be added like this Line 24 in 4a4cc62
Lines 240 to 267 in 4a4cc62
|
07879e8
to
55bb4c8
Compare
Snapshot worked on default (and alpine, but failed on experimental/9p ?
Need to see if there is a better way to return errors, after running HMP/QMP... |
Now it is at least logging the real problem: So this means that snapshots won't work with 9p mounts, while the instance is still running. EDIT: Disabled the online tests for 9p, still running offline tests. Trimmed off the extra whitespace, from the output. |
a6fbdb5
to
3f35ed9
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.
Thanks
Could you rebase to rerun the CI? |
00b822a
to
4b41a1f
Compare
It would be nice, if the generated command help stayed out of the README.... |
bd457e6
to
c07452a
Compare
Sorry needs rebase again |
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.
Thanks
CI failing
|
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 :)
CI for |
Looks like the net-user-v2 does not survive an "online" VM restore. So it needs to be excluded. "net-user-v2")
CHECKS["port-forwards"]=""
CHECKS["user-v2"]=1
;; It already was, for 9p. "9p")
CHECKS["snapshot-online"]=""
;; |
For handling qcow2 snapshots of the running virtual machine. It is possible to make multiple snapshots, in the diffdisk. * Use the new driver framework for snapshot * Add integration test for limactl snapshot Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
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.
thanks
For making qcow2 snapshots of the running virtual machine.
It is possible to make multiple snapshots, in the diffdisk.
Closes #1051
limactl start
limactl snapshot create default --tag snap
limactl snapshot list default
limactl snapshot apply default --tag snap
limactl stop
limactl snapshot delete default --tag snap