gokube icon indicating copy to clipboard operation
gokube copied to clipboard

gokube save doesn't work with -n option

Open heartofrevel opened this issue 2 years ago • 0 comments

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 <ENTER> 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.

heartofrevel avatar Dec 18 '22 09:12 heartofrevel