Skip to content

Snapshot fails if VMWare tools are "old" #113

@cyberkov

Description

@cyberkov

As soon as the vcenter reports the vmware tools are reported as "tooslOld", the creation of snapshots with the quiesce option fails:

    def create_snapshot(host, name, description, include_ram = false, quiesce = false)
      server = find_vm_by_uuid(host.uuid)
      raise N_('Unable to create VMWare Snapshot with Quiesce. Check Power and VMWare Tools status.') if quiesce && (server.power_state != 'poweredOn' || server.tools_state != 'toolsOk')
      raise N_('Unable to create VMWare Snapshot. Cannot set both Memory and Quiesce options.') if quiesce && include_ram

The output with foreman-rake console:

host = Host.find_by_name('myserver')
server = host.compute_resource.find_vm_by_uuid(host.uuid)
irb(main):009:0> server.power_state
=> "poweredOn"
irb(main):010:0> server.tools_state
=> "toolsOld"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions