VMware Communities
penguinattack
Contributor
Contributor

vmrun start causes lock file followed by "Error: unknown error" when trying to run headless

My vmrun start up script for centos vm which has been working fine until yesterday:

#!/bin/bash

"/Applications/VMware Fusion.app/Contents/Library/vmrun" -T fusion start "/Users/xxx/Documents/Virtual Machines.localized/CentOS 64-bit.vmwarevm" nogui

this results in

Error: Unknown error

  • If I go to "show package contents" in the centosvm OSX VM I see the a vm lock file being created as I execute the above script. Then nothing happens just the above error.
  • This was working fine and I had been using it for a few weeks to login direct from OSX to the VM via the terminal -  until I tried to do fsck unmount and init 1 in the centos vm command line, resulting in a force shutdown and after that its stopped working.
  • So after that I got a backup centosvm that i had before i ran the above fsck commands and tried to use it - however the vmrun problem persists
  • Then I did a fresh install of centos and still the vmrun above error is appearing, so I’m kind of stuck, don't know why the vmrun error is appearing on a fresh install of centos.
  • I also reinstalled VMWare Fusion
  • If I open the VM from the fusion library (i.e GUI mode) it will start up fine and then the above vmrun script command will run, and i can log in to the VM from the  OSX command line using vmrun.
  • But trying to start up the VM via the command line without having the GUI started using the above script , results in Error Unknown error

Please advise.

Thanks

Tags (3)
0 Kudos
6 Replies
penguinattack
Contributor
Contributor

I am now getting this error when trying to run in GUI mode:

VMware Fusion cannot connect to the virtual machine.

Make sure you have rights to run the program, access all directories the program uses, and access all directories for temporary files

0 Kudos
penguinattack
Contributor
Contributor

reinstalled everything vmware 6, centos same issue persists.

If I run:

"/Applications/VMware Fusion.app/Contents/Library/vmrun" -T fusion start "/Users/xxx/Documents/Virtual Machines.localized/CentOS6.5.vmwarevm/CentOS6.5.vmx" gui  -This works

But no GUI mode results in error:

"/Applications/VMware Fusion.app/Contents/Library/vmrun" -T fusion start "/Users/xxx/Documents/Virtual Machines.localized/CentOS6.5.vmwarevm/CentOS6.5.vmx"  nogui

Error: Unknown error

0 Kudos
WoodyZ
Immortal
Immortal

I just tested using VMware Fusion 6.0.2 (both while opened and closed) with a CentOS 6.5 Virtual Machine using vmrun nogui and it worked just fine.  I was able to ssh into it and do a few things and then shut it down from the ssh Terminal session.  So it's capable of working.

Did you look in the Virtual Machine's vmware.log file or the /Users/${USER}/Library/Logs/VMware/vmware-vix-nnnnn.log file for any additional clues other then the very nondescript "Error: Unknown error"?

0 Kudos
penguinattack
Contributor
Contributor

Hi thanks,

I started up a centos vm from a backup and captured the attached two log files when i tried to start it up via vmrun:

I think problems start around here -

vmware-vix-3828.log

2014-03-16T16:45:40.550+09:00| vix| I120: Warning: Could not open /proc/net/dev

2014-03-16T16:45:40.550+09:00| vix| I120: Warning: SGHostEnumerate not yet implemented

2014-03-16T16:45:40.550+09:00| vix| I120: SMBIOS: can't open /dev/mem: Could not find the file

2014-03-16T16:45:40.550+09:00| vix| I120: VmhsHostInfoPopulateSystem:  Could not get information from smbios to populate VMDB.

2014-03-16T16:45:40.613+09:00| vix| I120: Vix: [140735167623952 foundryHandleProperties.c:3362]: Error VIX_E_NOT_FOUND in Vix_GetPropertiesImpl(): Unable to get bool property 107.

2014-03-16T16:45:40.629+09:00| vthread-4| I120: Vix: [4317540352 vixWorkstationHost.c:2251]: VixVMMakeTemporaryVMDBMount: unable to acquire lock on /Users/UserX/Desktop/CentOS 64-bit.vmwarevm/CentOS 64-bit.vmx, err = 0

2014-03-16T16:45:40.629+09:00| vthread-4| I120: Vix: [4317540352 foundryVMPowerOps.c:2313]: Error VIX_E_FILE_ALREADY_LOCKED in FoundryVMPowerOnWithVMDB(): The file is already in use

0 Kudos
WoodyZ
Immortal
Immortal

Have you used tried using First Aid in Disk Utility to Verify Disk/Repair Disk and Verify Disk Permissions/Repair Disk Permissions?

0 Kudos
penguinattack
Contributor
Contributor

yes - there were no problems in both permissions and verify disk , only printer needed its permissions fixed,  everything else was ok and same problem persists after the checks

0 Kudos