Skip to content
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

gokube save doesn't work with -n option #25

Open
heartofrevel opened this issue Dec 18, 2022 · 0 comments
Open

gokube save doesn't work with -n option #25

heartofrevel opened this issue Dec 18, 2022 · 0 comments

Comments

@heartofrevel
Copy link

heartofrevel commented Dec 18, 2022

When I run below command.

gokube save -l -v -n base

gokube expects that a snapshot with name 'base' already exist and it tries to delete it. And if the snapshot doesn't exist it fails with below error.

$ gokube save -l -v -n base
Warning: you should not snapshot a running VM as the process can be long and take more space on disk
Press <CTRL+C> within the next 10s it you want to stop VM first or press now to continue...
Taking snapshot 'base' of minikube VM...
Error: cannot delete minikube VM snapshot base: not able to delete VM snapshot
(base)

RCA:
The problem is in line 60 of save.go.

err := virtualbox.DeleteSnapshot(savedSnapshotName)
if err != nil {
return fmt.Errorf("cannot delete minikube VM snapshot %s: %w", savedSnapshotName, err)
}

We need to see here if snapshot deletion failed because it doesn't exist or for any other reason.

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

No branches or pull requests

1 participant