-
Notifications
You must be signed in to change notification settings - Fork 909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executing file on windows vm using govc #2446
Comments
Howdy 🖐 rahul14sep ! Thank you for your interest in this project. We value your feedback and will respond soon. If you want to contribute to this project, please make yourself familiar with the |
What does the following report for your vm? % govc object.collect vm/VC-ATM-ICLONE guest.guestFamily The govc code uses cmd.exe when govmomi/guest/toolbox/client.go Lines 120 to 133 in 13851af
|
govc object.collect vm/VC-ATM-ICLONE guest Its not populating correct information for guest family because we are using ESX 6.7 which does not support win2k19 OS. For such cases can we have optional parameter in guest.run to override shell path , where we could specify which Like we have option in pyvmomi |
- Add '-w' flag to guest.run Fixes vmware#2446
Ah ok. With #2451 you can use the same ProgramSpec in your example or the new guest.run |
This will help. Thanks @dougm for adding this support. |
- Default to Windows family when family is "Other" and toolsInstallType is MSI Fixes vmware#2446
- Default to Windows family when family is "Other" and toolsInstallType is MSI Fixes vmware#2446
- Default to Windows family when family is "Other" and toolsInstallType is MSI Fixes vmware#2446
@rahul14sep just note that Doug created an even better fix for this issue using auto-detection, that is not requiring any flags :) |
- Default to Windows family when family is "Other" and toolsInstallType is MSI Fixes vmware#2446
- Default to Windows family when family is "Other" and toolsInstallType is MSI Fixes vmware#2446
I want to execute powershell script on window vm using govc, I tried using
govc guest.run
but it looks to execute file in /bin/bash shell, Is there any way i could tell govc to use windows command prompt?Command I tried
govc guest.run -vm VC-ATM-ICLONE -l='username:password' 'powershell C:\windows_network_refresh.ps1'
and got below error
govc: ServerFaultCode: File /bin/bash was not found
Is there any other way I could execute file on windows vm.
The text was updated successfully, but these errors were encountered: