Skip to content

Commit 65176ca

Browse files
committed
Use propolis cleanup for VM stop
1 parent 53697dd commit 65176ca

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

internal/infra/vm/runner.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ func (r *PropolisRunner) Start(ctx context.Context, cfg domvm.VMConfig) (domvm.V
9191
opts := []propolis.Option{
9292
propolis.WithName(cfg.Name),
9393
propolis.WithDataDir(dataDir),
94+
propolis.WithCleanDataDir(),
9495
propolis.WithCPUs(cfg.CPUs),
9596
propolis.WithMemory(cfg.Memory),
9697
propolis.WithPorts(propolis.PortForward{Host: sshPort, Guest: 22}),
@@ -194,7 +195,7 @@ type propolisVM struct {
194195

195196
func (v *propolisVM) Stop(ctx context.Context) error {
196197
v.logger.Info("stopping sandbox VM")
197-
err := v.vm.Stop(ctx)
198+
err := v.vm.Remove(ctx)
198199
// Clean up ephemeral SSH keys regardless of stop outcome.
199200
_ = os.RemoveAll(v.sshKeyDir)
200201
if err != nil {

0 commit comments

Comments
 (0)