You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this piece of code below to update the name of a VM. I noticed that the next operation (connecting the VM to the network) fails if I don't wait for the VM name update to complete (which takes like 10/15 seconds or so).
So I am trying to use the "wait.for" function to check when the VM is ready. If I use it like in the example below, it just waits 20 (or 50 or 100) seconds and then it says:
/usr/local/rvm/gems/ruby-2.2.1/gems/fog-core-1.32.1/lib/fog/core/wait_for.rb:9:in `block in wait_for': The specified wait_for timeout (100 seconds) was exceeded (Fog::Errors::TimeoutError)
If I don't specify any number after the wait, it will just stay there forever.
Is the wait.for implemented properly when used with the vcloud-director module? Or am I missing something in the syntax / flow?
Thanks.
....
....
vapp = vdc.vapps.get_by_name(inputvappname)
vm = vapp.vms.first
@mreferre - In the past, I've used wait_for without passing any value and it's worked just fine for me. Have you tried just using vm.wait_for { ready? } (without the specific time)?
I am using this piece of code below to update the name of a VM. I noticed that the next operation (connecting the VM to the network) fails if I don't wait for the VM name update to complete (which takes like 10/15 seconds or so).
So I am trying to use the "wait.for" function to check when the VM is ready. If I use it like in the example below, it just waits 20 (or 50 or 100) seconds and then it says:
/usr/local/rvm/gems/ruby-2.2.1/gems/fog-core-1.32.1/lib/fog/core/wait_for.rb:9:in `block in wait_for': The specified wait_for timeout (100 seconds) was exceeded (Fog::Errors::TimeoutError)
If I don't specify any number after the wait, it will just stay there forever.
Is the wait.for implemented properly when used with the vcloud-director module? Or am I missing something in the syntax / flow?
Thanks.
....
....
vapp = vdc.vapps.get_by_name(inputvappname)
vm = vapp.vms.first
vm_id = vm.id
vcloud.put_vm(vm_id, "myvm", {})
vm.wait_for(20) { ready? }
vmnetwork = vm.network
vmnetwork.network = "DMZ"
vmnetwork.is_connected = true
vmnetwork.ip_address_allocation_mode = "POOL"
vmnetwork.save
The text was updated successfully, but these errors were encountered: