Questions tagged [rbvmomi]
8 questions
3
votes
2 answers
How to resize VM disk with RbVmomi in Ruby
I'm working on a project where I'm cloning a VM with RbVmomi and after the clone is finished I want to ReConfig the VM.
The cloning is working great, but I have some problems when I want to change the disk size of the VM. I can change the numbers…

Thorstein Løkensgard
- 92
- 11
2
votes
3 answers
Getting all VirtualMachines using API (rbvmomi)
I would like to see some info for all the virtualmachines in my vcenter, right now I have:
require 'rbvmomi'
vim1 = RbVmomi::VIM.connect host: 'vcenter.foo.tld', ssl: true, insecure: true, user: 'keith', password: 'NSABACKDOOR'
dc1 =…

FelixHJ
- 1,071
- 3
- 12
- 26
1
vote
0 answers
Ruby socket break after fork
I am using a Ruby gem to interact with the vmware SDK. I found an interesting issue that I thought I would bring attention to.
I found that if I make a ssl connection to vCenter and it connects successfully, then I fork the processes and try to use…

jacksonecac
- 284
- 4
- 15
1
vote
1 answer
rbvmomi extraConfig update fails with `unexpected property name`
I am using vmomi gem for using vsphere api.
Here is what I did :-
....
new_extra_config = [{"softPowerOff"=>"true"}]
vm.ReconfigVM_Task(:spec => RbVmomi::VIM.VirtualMachineConfigSpec(:extraConfig => new_extra_config)).wait_for_completion
....
This…

Nishutosh Sharma
- 1,926
- 2
- 24
- 39
0
votes
1 answer
Can rbvmomi use VM Tools similarly to Invoke-VMScript script
I need to copy a script and run it in a VM. Have been using PowerCLI Invoke-VMScript and Copy-VMGuestFile.
Can the same be accomplished with rbvmomi (and how :) )?
Thanks

vanyans
- 1
- 1
0
votes
2 answers
vSphere Build Version via API
Is there a way do get the vsphere build versing using any API/SDK/REST?
I know it's possible using powershell on vcenter for that, but it'd be great if there was another option.
Like described here:…

Quirinux
- 310
- 2
- 7
0
votes
0 answers
Pass "yes" to command given in a text file
I'm using rbvmomi gem to automate vsphere in ruby. I'm using vmware API StartProgramInGuest to run commands. The commands are given in a text file which is passed as an argument to GuestProgramSpec. One of the commands in the file requires a…

user5478656
- 266
- 1
- 2
- 9
0
votes
1 answer
How can I get ruby's JSON to follow object references like Pry/PP?
I've stared at this so long I'm going in circles...
I'm using the rbvmomi gem, and in Pry, when I display an object, it recurses down thru the structure showing me the nested objects - but to_json seems to "dig down" into some objects, but just dump…

Tom Bortels
- 88
- 1
- 6