VMware Communities
kipp
Contributor
Contributor

Executing shell commands in guest OS / Migrating from Parallels

Hi

I have been using Parallels for a while to run Mac OS Server as a guest OS on Mac OS. For various reasons (upgrade cycle, stability etc.) I am evaluating switching back to Fusion (3.5 was the last version of Fusion i owned). Before I do that, I would like to know a bit more about the ability to run shell commands the guest OS. As I have backup shell scripts on the host that trigger commands through Parallels on the guest OS (such as dumping mysql databases etc.), I am wondering if I get the same functionality on VMware as well.

I have seen that VMware offers the vmrun command line command (like: vmrun -T fusion -gu <user> -gp <pass> runScriptInGuest [MacOS_VM].vmx [shell_command]).

Are there any limitations to executing commands on the guest OS?

Also: Parallels executes commands on the guest OS with root privileges so I don't have to pass user account passwords to the guest OS. I guess VMware does not. As I feel a bit uncomfortable having admin passwords in plaintext in shell scripts: Is there any way around that?

OH, and one question concerning VM-image migration. Are there any drawbacks in migrating an vm-image compared to fresh install and restore of data from backup?

Thanks you in advance for your help

7 Replies
kipp
Contributor
Contributor

I installed a trial version of Fusion 8.0.1 and migrated my Parallels VM (Mac OS X Server 10.10.5) to VMware. I was even able to upgrade the guest OS to Mac OS 10.11 (which I wasn't able to do on Parallels). So far so good. No I'm having trouble with the vmrun command. I tried following:

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmrun -T fusion -gu 'user' -gp 'password' runScriptInGuest /pathto/mac10.11.server.vmx /bin/bash shell-command

I am always getting a:

Error: Invalid user name or password for the guest OS

But on the guest OS, the accountpolicy.log tells me:

Oct  3 11:26:01 (95.64.1) AuthenticationAllowed completed: record "user", result: Success (0).

I tried to use the command with / without sudo, with / without '_' and "_" for username and password. VMware Tools are installed. Always the same error, even on 10.10.5., before upgrading to 10.11. Any ideas?

Reply
0 Kudos
Woodmeister50
Enthusiast
Enthusiast

I too have left Parallels due to there handicapping of base product and moving most

functionality to their "ball and chain" subscription model.

There is a bit of a problem with Windows10 VM migration and activation, but that seems

to be an issue with the new licensing/activation scheme Microsloth is now employing with

Windows 10.  However, I did import two Win10 VMs with out any other issue than activation.

I think the activation problem may have been due to the fact that they were clean installs which

seems to be a common issue on all hardware or VM platforms.

I did however import a Win8.1 VM  and a Win7 VM and both went without a hitch and were working

quite well and were upgraded to Win10 as well and are now also working without issue, so far

(just updated to El Capitan and will see if that tosses some monkey wrench in the works).

Just for reference, the Macs used were:

     Early 2011 13" Macbook Pro, 2.7 GHz dual core i7, 16 GB RAM, 240 GB SSD

     Late 2013 27" iMac, 3.2 GHz quad core i5, 32GB RAM, 256GB SSD (via Thunderbolt), with 27" Thunderbolt display.

Reply
0 Kudos
HPReg
VMware Employee
VMware Employee

We are aware of an issue where vmrun fails to work with OS X VMs, with this error message:

Error: Authentication failure or insufficient permissions in guest operating system

This issue is being internally tracked as bug 1437434. It is caused by

https://support.apple.com/en-us/HT204659:

==============================================

Kernel

Available for: OS X Mountain Lion v10.8.5, OS X Mavericks v10.9.5, OS X Yosemite v10.10 to v10.10.2

Impact: A local application may escalate privileges using a compromised service intended to run with reduced privileges

Description: setreuid and setregid system calls failed to drop privileges permanently. This issue was addressed by correctly dropping privileges.

CVE-ID

CVE-2015-1117 : Mark Mentovai of Google Inc.

==============================================

Which was introduced by Apple in 10.10.3, and then backported to 10.9.5 and 10.8.5, so sadly *all* up-to-date recent OS X guests are affected by this Smiley Sad

We have a fix, that is currently being tested.

kipp
Contributor
Contributor

Thank you for the update. I read about this specific issue in an older forum-post, but I expected it to be fixed by now. Can you tell when the fix will be released, or at least with which version of VMware 8.0.x?

Best regrads

Antonios

Reply
0 Kudos
kipp
Contributor
Contributor

Now VMware Fusion 8.0.2 was released, is the fix for vmrun included? I can't check as my trial version expired.

Cheers

Reply
0 Kudos
wila
Immortal
Immortal

Hello,

No unfortunately the fix did not make it to Fusion 8.0.2, see also HPReg‌'s reply here:

Re: vmrun tool doesn't work after the latest Mac-OS security update

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
kipp
Contributor
Contributor

Thanks for the update. Hope the issue is resolved soon.

Cheers

Reply
0 Kudos