Bug #16020
node_vmware fails to terminate running instance on vSphere 5.0.0u1
| Status: | Merged - Pending Release | Start date: | 08/17/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | - | Spent time: | - | |
| Target version: | - | |||
| Keywords: | Branch: | https://github.com/puppetlabs/puppetlabs-cloud-provisioner-vmware/pull/17 | ||
Description
On a vanilla install of vSphere 5.0.0u1 with a root login and rbvmomi either 1.3.0 or 1.5.1 the command puppet node_vmware terminate <path> fails to correctly terminate a VM on the first pass. Running the terminate command again as a second pass will successfully terminate the VM. Output for three successive commands (create, terminate, terminate) given below.
[reid@Systems-MacBook-Pro-4:~] % puppet node_vmware create --template=/Datacenters/saleseng/vm/vpuppet --name=puppetvm --wait-for-boot
notice: Connecting ...
notice: Connected to 10.0.5.60 as root (API version 4.1)
notice: Locating VM at /Datacenters/saleseng/vm/vpuppet (Started at 04:08:06 PM)
notice: Control will be returned to you in 10 minutes at 04:18 PM if locating (1/3) is unfinished.
Locating (1/3): 100% |oooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
notice: Starting the clone process (Started at 04:08:06 PM)
notice: Control will be returned to you in 10 minutes at 04:18 PM if starting (2/3) is unfinished.
Starting (2/3): 100% |oooooooooooooooooooooooooooooooooooooo| Time: 00:00:32
notice: Waiting for the machine to boot and obtain an IP address ... (Started at 04:08:39 PM)
notice: Control will be returned to you in 10 minutes at 04:18 PM if booting (3/3) is unfinished.
Booting (3/3): 100% |oooooooooooooooooooooooooooooooooooooo| Time: 00:00:47
---
operatingsystem: ""
connection_state: connected
hostname: ""
name: puppetvm
id: &id001 5003211b-b3b5-3deb-b9f3-be381cecdb5d
hypervisor: 10.0.5.67
is_a_template: false
cpus: 1
power_state: poweredOn
mac_addresses:
Network adapter 1: "00:50:56:83:59:74"
instance_uuid: *id001
mo_ref: vm-42
path: /Datacenters/saleseng/vm
ipaddress: 10.0.5.111
uuid: 4203a86d-f0a8-d441-4e6e-b1e2e5f1d511
memory_mb: 1024
status: success
tools_state: toolsOk
tools_version: guestToolsCurrent
[reid@Systems-MacBook-Pro-4:~] % puppet node_vmware terminate /Datacenters/saleseng/vm/puppetvm
notice: Connecting ...
notice: Connected to 10.0.5.60 as root (API version 4.1)
notice: Locating VM at /Datacenters/saleseng/vm/puppetvm (Started at 04:09:34 PM)
notice: Control will be returned to you in 10 minutes at 04:19 PM if locating is unfinished.
Locating: 100% |oooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
notice: The VM is powered on. Turning it off. (Started at 04:09:35 PM)
notice: Control will be returned to you in 10 minutes at 04:19 PM if stopping is unfinished.
Stopping: 100% |oooooooooooooooooooooooooooooooooooooo| Time: 00:00:01
notice: Destroying Virtual Machine /Datacenters/saleseng/vm/puppetvm (Started at 04:09:37 PM)
notice: Control will be returned to you in 10 minutes at 04:19 PM if destroying is unfinished.
Destroying: 100% |oooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
err: InvalidPowerState: The attempted operation cannot be performed in the current state (Powered off).
err: Try 'puppet help node_vmware terminate' for usage
[reid@Systems-MacBook-Pro-4:~] % puppet node_vmware terminate /Datacenters/saleseng/vm/puppetvm
notice: Connecting ...
notice: Connected to 10.0.5.60 as root (API version 4.1)
notice: Locating VM at /Datacenters/saleseng/vm/puppetvm (Started at 04:09:40 PM)
notice: Control will be returned to you in 10 minutes at 04:19 PM if locating is unfinished.
Locating: 100% |oooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
notice: Destroying Virtual Machine /Datacenters/saleseng/vm/puppetvm (Started at 04:09:41 PM)
notice: Control will be returned to you in 10 minutes at 04:19 PM if destroying is unfinished.
Destroying: 100% |oooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
task_state "success"
[reid@Systems-MacBook-Pro-4:~] %