Project

General

Profile

Actions

Bug #2704

closed

Foreman fails to delete a host with vmware-tools installed

Added by Kal Aeolian almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
VM management
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Using Foreman 1.2-RC3. A foreman provisioned guest has vmware-tools installed. When a delete is issued against the host, foreman first powers down the machine. VMware assumes that you want a 'clean shutdown', so it uses the vmware-tools interface to shutdown the host. However, this takes more than a couple of seconds, and in the meantime foreman issues the 'delete VM' command. Since the VM is still powered on, this fails and you get an error in the VMware console:

Delete virtual machine:
The attempted operation cannot be performed in the current state (Powered on).

If you try to delete it a second time, it succeeds as the guest OS has finally shut down. Our solution is scripted, power down a machine and wait to issue the delete until VMware says 'its really shutdown'. You could send a 'force' to fog on the shutdown but this would probably only be wise on a delete..

Actions

Also available in: Atom PDF