VMware {code} Community
kmsmhn1
Contributor
Contributor

Adding a new ESX User for vmware-vmrc

Hi all,

i'm programming a little PowerShell Script to connect via the vmware-vmrc utility to an VM within a VI.

My problem is now, that if you directly want to connect to an VM you need the root account for the ESX Host.

So i created via adduser -g users -G vpxusers -s /sbin/nologin vmrc a new user called vmrc.

I also followed the instructions here: http://communities.vmware.com/message/825021;jsessionid=AAC28E69BC9A6B3A3A23E8B93F1103A6 and added the user in the authorization.xml but with no success. I can login via ssh, but when i try to connect via the VI Client or vmware-vmrc it says i have no permissions. Whats wrong?

Tags (2)
0 Kudos
5 Replies
Texiwill
Leadership
Leadership

Hello,

Moved to the Management APIs forum.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

SearchVMware Blog: http://itknowledgeexchange.techtarget.com/virtualization-pro/

Blue Gears Blogs - http://www.itworld.com/ and http://www.networkworld.com/community/haletky

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
esloof
Expert
Expert

When do you receive the error? When you try to logon with the following command line ?

c:\program files\VMwareVMRC\vmware-vmrc.exe -h 192.168.75.128 -u user-p vmware -m "[Storage1] VM1/VM1.vmx"

B.T.W I'm working on the same PowerShell util.

Eric Sloof

http://www.ntpro.nl

0 Kudos
kmsmhn1
Contributor
Contributor

@esloof:

Yes i get the message when i set the -u and -p Option and when i try to login via the vmware-vmrc dialog.

Getting the nice "Permission denied" error

The log files say:

Event 320 : Failed to login user vmrc@127.0.0.1: No permission

Activation : Invoke done on

Throw vim.fault.NoPermission

Result:

(vim.fault.NoPermission) {

dynamicType = <unset>,

object = 'vim.Folder:ha-folder-root',

privilegeId = "System.View",

msg = ""

}

But the user is exisiting on the machine (can login) and is entered in the authorization.xml

(authoriaztion.xml)

<ACEData id="12">

<ACEDataEntity>ha-folder-root</ACEDataEntity>

<ACEDataId>12</ACEDataId>

<ACEDataIsGroup>false</ACEDataIsGroup>

<ACEDataPropagate>true</ACEDataPropagate>

<ACEDataRoleId>-1</ACEDataRoleId>

<ACEDataUser>vmrc</ACEDataUser>

</ACEData>

0 Kudos
kmsmhn1
Contributor
Contributor

Ok its quite too simple.

Login via ssh and restart the mgmt-vmware service. After this it all works fine.

0 Kudos
gbraad1
Contributor
Contributor

LOL... so was I. But in the script on: http://www.ntpro.nl/blog/archives/777-Start-VMware-Remote-Console-with-PowerShell.html. there is an additional check for the count of vms. I just foreach the given param to open more than one VMRC.

0 Kudos