theforeman/foreman · error · Foreman::Exception

The console is not available because the VM is not powered o

Error message

The console is not available because the VM is not powered on

What it means

Error "The console is not available because the VM is not powered on" thrown in theforeman/foreman.

Source

Thrown at app/models/compute_resources/foreman/model/vmware.rb:613

        "firmware" => args[:firmware],
        "secure_boot" => args[:secure_boot],
      }

      opts['transform'] = (args[:volumes].first[:thin] == 'true') ? 'sparse' : 'flat' unless args[:volumes].empty?

      vm_model = new_vm(raw_args)
      opts['interfaces'] = vm_model.interfaces
      opts['volumes'] = vm_model.volumes
      if args[:user_data] && valid_cloudinit_for_customspec?(args[:user_data])
        opts["customization_spec"] = client.cloudinit_to_customspec(args[:user_data])
        opts["extraConfig"] = opts["customization_spec"]["extraConfig"] if opts["customization_spec"].key?("extraConfig")
      end
      client.servers.get(client.vm_clone(opts)['new_vm']['id'])
    end

    def console(uuid)
      vm = find_vm_by_uuid(uuid)
      raise Foreman::Exception, N_('The console is not available because the VM is not powered on') unless vm.ready?

      case display_type
      when 'vmrc'
        vmrc_console(vm)
      else
        vnc_console(vm)
      end
    end

    def vnc_console(vm)
      values = { :port => unused_vnc_port(vm.hypervisor), :password => random_password(8), :enabled => true }
      vm.config_vnc(values)
      WsProxy.start(:host => vm.hypervisor, :host_port => values[:port], :password => values[:password]).merge(:type => 'vnc')
    end

    def vmrc_console(vm)
      {
        :name => vm.name,

View on GitHub (pinned to 6b05625475)

When it happens

Trigger: Thrown at app/models/compute_resources/foreman/model/vmware.rb:613 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of theforeman/foreman@6b05625475 (2026-08-23). Data as JSON: /api/errors/671f8611cf8163bd. Report an issue: GitHub.