New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

train-vsphere-gom

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

train-vsphere-gom

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Train-vsphere-gom

train-vsphere-gom is a Train plugin and is used as a Train OS Transport to connect to virtual machines via VMware Tools.

This allows working with machines in different network segments, without adding routes, NAT or firewall routes.

vSphere Guest Operations Manager covers various use cases within a target VM, including file transfers, Windows registry access and command execution. It is used by various 3rd party tools to monitor and manage VMs.

Requirements

  • VMware vSphere 5.0 or higher

Permissions

Needs login credentials for vCenter (API) as well as the target machine (OS).

Mandatory privileges in vCenter:

  • VirtualMachine.GuestOperations.Query
  • VirtualMachine.GuestOperations.Execute
  • VirtualMachine.GuestOperations.Modify (for file uploads)

Installation

Install this Gem from rubygems.org:

gem install train-vsphere-gom

Transport parameters

OptionExplanationDefaultEnv. Vars
hostVM to connect (host for Train compatibility)requiredVI_VM
userVM username for loginrequired
passwordVM password for loginrequired
vcenter_serverVCenter serverrequiredVI_SERVER
vcenter_usernameVCenter usernamerequiredVI_USERNAME
vcenter_passwordVCenter passwordrequiredVI_PASSWORD
vcenter_insecureAllow connections when SSL certificate is not matchingfalse
loggerLogger instance$stdout, info
quickEnable quick modefalse
shell_typeShell type ("auto", "linux", "cmd", "powershell")auto
timeoutTimeout in seconds60

By design, Train VSphere GOM requires two authentication steps: One to get access to the VCenter API and one to get access to the guest VM with local credentials.

VMs can be searched by their IP address, their UUID, their VMware inventory path or by DNS name.

The environment variables are aligned to those from VMware SDK and ESXCLI.

Quick Mode

In quick mode, non-essential operations are omitted to save time over slow connections.

  • no deletion of temporary files (in system temp directory)
  • no checking for file existance before trying to read
  • only reading standard error, if exit code was not zero

Limitations

  • SSPI based guest VM logins are not supported yet
  • using PowerShell via GOM is very slow (7-10 seconds roundtrip)

Example use

require 'train-vsphere-gom'

train  = Train.create('vsphere-gom', {
            # Relying on VI_* variables for VCenter configuration
            host:     '10.20.30.40'
            username: 'Administrator',
            password: 'Password'
         })
conn   = train.connection
conn.run_command("Write-Host 'Inside the VM'")

References

  • vSphere Web Services: GOM

FAQs

Package last updated on 24 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc