mechboxes / mech

Easy command line virtual machines for VMWare
https://mechboxes.github.io/mech/
MIT License
311 stars 49 forks source link

Can't start VM from different folder #62

Open network-shark opened 5 years ago

network-shark commented 5 years ago

I have setup multiple VMs , but I'm only able to start them from the VM folder. I thought I can use the name parameter to start the vm from everywhere .

Error:

+ OSX  sharkys-mbp  sharky  ~/VMs/freebsd12-zfs  ansible                                                                                                                                                                                           + 3260
+╰─ mech --debug  up name=macos10.14
+DEBUG: Attempting to acquire lock 4449858728 on /Users/sharky/.mech/data/index.lock
+INFO: Lock 4449858728 acquired on /Users/sharky/.mech/data/index.lock
+DEBUG: Attempting to release lock 4449858728 on /Users/sharky/.mech/data/index.lock
+INFO: Lock 4449858728 released on /Users/sharky/.mech/data/index.lock
-Cannot find a valid path for 'name=macos10.14' instance

Indexfile:

 OSX  sharkys-mbp  sharky  ~/VMs/freebsd12-zfs  ansible                                                                                                                                                                                            3261
╰─ cat /Users/sharky/.mech/data/index
{
  "freebsd12-generic": {
    "path": "/Users/sharky/VMs/freebsd12-generic"
  },
  "freebsd12-zfs": {
    "path": "/Users/sharky/VMs/freebsd12-zfs"
  },
  "macos10.13": {
    "path": "/Users/sharky/VMs/macos10.13"
  },
  "macos10.14": {
    "path": "/Users/sharky/VMs/macos10.14"
  }
}%