VMware Cloud Community
PSScripter
Enthusiast
Enthusiast

Does Stop-VMGuest creat a profileon the guest OS?

Hello,

Wondering if the above command creates a profile in Windows?

 

Another question....is there anyway to pass a command to a VM through vcenter/esx, in such a way to not create a profile?

 

Thanks!

Reply
0 Kudos
6 Replies
LucD
Leadership
Leadership

Normally not, these commands are passed via the VMware Tools.
And in the Guest OS the command is triggered via the VMware Tools service, which runs under Local System.

Other commands, like Invoke-VMScript, when used with the Credential parameter, do require a Profile.

So the answer is a yes/no, it depends.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

PSScripter
Enthusiast
Enthusiast

Thanks for that LucD.

 

You can pass commands to VMs using the VIX Vmware  api, using vmrun. It looks like the esx hosts need to have the vmware remote console service running though, so its out for me 😞

Reply
0 Kudos
LucD
Leadership
Leadership

The VIX API functionality has been merged into the GuestOperationsManager since vSphere 5.

And the GuestOperationsManager requires VMware Tools to be installed.
All cmdlets, like Stop-VMGuest/Invoke-VMScript/..., are using the GuestOperationsManager API.

Btw, vmrun is intended for use with VMs running on VMware Workstation afaik


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
PSScripter
Enthusiast
Enthusiast

Thanks for clarifying. I saw vmrun had a -T esx switch so thought it was possible, but either way without vmrc I dont think it works.

Reply
0 Kudos
LucD
Leadership
Leadership

I'm not sure what documentation you are looking at, but vmrun is currently only avaialble in implementations of open-vm-tools.
These are 3th party implemenetations of VMware Tools done by some Linux vendors.
Some of these packages contain a vmrun, most of the time a rather old Perl script.

I don't know where you got the requirement for VMRC


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
PSScripter
Enthusiast
Enthusiast

yup it was in some ancient documentation. I have it in my VMware VIX directory:

 

Directory of C:\Program Files (x86)\VMware

01/22/2023 08:50 AM <DIR> .
01/22/2023 08:50 AM <DIR> ..
01/21/2023 02:07 PM <DIR> VMware Remote Console
01/22/2023 08:50 AM <DIR> VMware VIX
0 File(s) 0 bytes
4 Dir(s) 94,380,818,432 bytes free

C:\Program Files (x86)\VMware>cd "VMware VIX"

C:\Program Files (x86)\VMware\VMware VIX>dir
Volume in drive C has no label.
Volume Serial Number is 049F-3D87

Directory of C:\Program Files (x86)\VMware\VMware VIX

01/22/2023 08:50 AM <DIR> .
01/22/2023 08:50 AM <DIR> ..
02/24/2017 03:02 AM 25,214 arp.ico
01/22/2023 08:50 AM <DIR> doc
02/24/2017 03:01 AM 25,294 eula.rtf
02/24/2017 03:02 AM 114,535 open_source_licenses.txt
01/22/2023 08:50 AM <DIR> Samples
02/24/2017 03:01 AM 476,573 vix-perl.zip
02/24/2017 03:01 AM 46,920 vix.h
02/24/2017 03:01 AM 7,731,192 Vix64AllProducts.lib
02/24/2017 03:01 AM 7,731,192 Vix64AllProductsd.lib
02/24/2017 03:01 AM 559,104 Vix64AllProductsDyn.dll
02/24/2017 03:01 AM 28,852 Vix64AllProductsDyn.lib
02/24/2017 03:01 AM 6,942,872 VixAllProducts.lib
02/24/2017 03:01 AM 6,942,872 VixAllProductsd.lib
02/24/2017 03:01 AM 437,760 VixAllProductsDyn.dll
02/24/2017 03:01 AM 29,384 VixAllProductsDyn.lib
01/22/2023 08:50 AM <DIR> VixCOM
02/24/2017 03:01 AM 536,576 VixCOM.dll
02/24/2017 03:01 AM 674,816 VixCOM64.dll
02/24/2017 03:02 AM 1,810 vixwrapper-config.txt
02/24/2017 03:01 AM 462,336 vmrun.exe
02/24/2017 03:01 AM 29,909 vm_basic_types.h
01/22/2023 08:50 AM <DIR> Workstation-12.0.0
18 File(s) 32,797,211 bytes
6 Dir(s) 94,380,158,976 bytes free

C:\Program Files (x86)\VMware\VMware VIX>

Reply
0 Kudos