Automattic / Automattic/hostmgr

Starting a VM with the same handle as an existing VM deletes the existing VMs files

Open
#141 0 comments 0 reactions 0 assignees View on GitHub
bug hostmgr
Dominant language
Swift
Stars
12
Forks
3
Avg merge
4h 50m
Merged PRs (30d)
4

Description

Tested in `0.51.0`. Starting a new VM with the handle of an existing VM will delete the existing VMs files. The existing VM will continue to run.

```
➜ hostmgr_shortcuts hostmgr vm start xcode-16.2-macos-14.7.1-v1 --handle cat
Starting VM with handle: cat
Booted xcode-16.2-macos-14.7.1-v1 in 8 seconds
VM SSH IP Address: 192.168.64.14
➜ hostmgr_shortcuts hostmgr vm start xcode-16.2-macos-14.7.1-v1 --handle cat
Starting VM with handle: cat
“xcode-16.2-macos-14.7.1-v1.vmtemplate” couldn’t be copied to “working-vm-images” because an item with the same name already exists.
```

I expected to see `💻 Local | cat | 🟢 Running | 120.03 GB` at the top.

```
➜ hostmgr git:(0.51.0) hostmgr vm list --location local
Location | Filename | State | Size
-------- | -------------------------- | ----------- | ---------
💻 Local | macos-15.2 | 💾 Ready | 120.03 GB
💻 Local | xcode-16.2-macos-14.7.1-v1 | 💾 Ready | 120.03 GB
💻 Local | macos-15.2 | 📦 Packaged | 17.47 GB
💻 Local | xcode-16.2-macos-14.7.1-v1 | 📦 Packaged | 50.33 GB
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with `hostmgr vm start` using the same `--handle`, then inspect the VM start and listing entry points implicated by the report. Confirm that starting a duplicate handle neither removes the existing VM's files nor creates conflicting state, and that `hostmgr vm list --location local` still shows the running VM.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.