Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Support 'boot_command` on vSphere 6.0 and older #63

Closed
michaelhajjar opened this issue Mar 15, 2018 · 12 comments
Closed

Support 'boot_command` on vSphere 6.0 and older #63

michaelhajjar opened this issue Mar 15, 2018 · 12 comments

Comments

@michaelhajjar
Copy link

michaelhajjar commented Mar 15, 2018

Hello, I am encountering a error when trying to run a centos 7 automated install. It fails at typing the boot command with the following message:

[root@oraclebench packer]# ./packer build centos7.json
vsphere-iso output will be in this color.

==> vsphere-iso: Creating VM...
==> vsphere-iso: Adding CDRoms...
==> vsphere-iso: Creating floppy disk...
    vsphere-iso: Copying files flatly from floppy_files
    vsphere-iso: Copying file: ks.cfg
    vsphere-iso: Done copying files from floppy_files
    vsphere-iso: Collecting paths from floppy_dirs
    vsphere-iso: Resulting paths from floppy_dirs : []
    vsphere-iso: Done copying paths from floppy_dirs
==> vsphere-iso: Uploading created floppy image
==> vsphere-iso: Adding generated Floppy...
==> vsphere-iso: Adding configuration parameters...
==> vsphere-iso: Power on VM...
==> vsphere-iso: Waiting 10s for boot...
==> vsphere-iso: Typing boot command...
==> vsphere-iso: Power off VM...
==> vsphere-iso: Destroying VM...
Build 'vsphere-iso' errored: error typing a boot command: ServerFaultCode: Unable to resolve WSDL method name PutUsbScanCodes for namespace name urn:vim25

while parsing SOAP body
at line 2, column 60

while parsing SOAP envelope
at line 2, column 0

while parsing HTTP request before method was determined
at line 1, column 0

==> Some builds didn't complete successfully and had errors:
--> vsphere-iso: error typing a boot command: ServerFaultCode: Unable to resolve WSDL method name PutUsbScanCodes for namespace name urn:vim25

while parsing SOAP body
at line 2, column 60

while parsing SOAP envelope
at line 2, column 0

while parsing HTTP request before method was determined
at line 1, column 0

==> Builds finished but no artifacts were created.
--------------------------------------------------------------------------------------------

this is the centos7.json file for building:

{
  "builders": [
    {
      "boot_command": [
        "<up><wait><tab> text inst.ks=hd:fd0:/ks.cfg <enter>"
      ],
      "type": "vsphere-iso",

      "vcenter_server":      "server",
      "username":            "user",
      "password":            "password",
      "insecure_connection": "true",
      "ssh_username": "root",
      "ssh_password": "example",

      "datacenter": "test",
      "cluster": "test",
      "network": "test",
      "network_card": "vmxnet3",
      "datastore": "test",
      "vm_name": "golden_image_lin",
      "guest_os_type": "rhel7_64Guest",

      "CPUs":             2,
      "RAM":              4096,
      "RAM_reserve_all": true,

      "disk_controller_type":  "pvscsi",
      "disk_size":        50,
      "disk_thin_provisioned": true,
      "folder": "_directory",

      "iso_paths": [
        "[ISO] place/centos7-netinstall.iso"
      ],
      "floppy_files": [
        "ks.cfg"
      ],
      "boot_order": "disk,cdrom"
    }
  ]
}

what am I doing wrong or is this a issue?
debug mode is not showing anything weird....

@ghost
Copy link

ghost commented Mar 15, 2018

I get the same error, boot_command only work starting from vCenter 6.5 (as per #53), maybe this can make it in the documentation upon a new release. The codebase is moving kinda fast :)

@michaelhajjar
Copy link
Author

is it possible to add this function for vCenter 6.0 ??

@ghost
Copy link

ghost commented Mar 15, 2018

Not a contributor to the codebase myself but I according to https://pubs.vmware.com/vsphere-6-5/topic/com.vmware.wssdk.apiref.doc/vim.VirtualMachine.html#putUsbScanCodes this method is only available from version 6.5:

PutUsbScanCodes(putUsbScanCodes), Inject a sequence of USB HID scan codes into the keyboard., Since vSphere API 6.5

My guess would be no

@mkuzmin
Copy link
Contributor

mkuzmin commented Mar 15, 2018

That's right. VMware deprecated VNC access in 6.5 and provided a new API.
So the current implementation is compatible with 6.5 only. Maybe we need a better error message in logs.

Supporting older vSphere versions requires a completely separate feature implementation. I personally don't have plans working on that.

@mkuzmin mkuzmin changed the title Error typing a Boot command, unable to resolve WSDL method name PutUSBScanCodes Support 'boot_command` on vSphere 6.0 and older Mar 15, 2018
@sudomateo
Copy link

sudomateo commented Apr 4, 2018

Can't we just label the floppy drive as OEMDRV and let RHEL kick off the installation automatically?

Source: https://access.redhat.com/discussions/3187232

EDIT: There's some progress regarding this on issue #85

@mkuzmin
Copy link
Contributor

mkuzmin commented May 3, 2018

Even if RedHat Linux has an alternate solution, the issue is still valid for Ubuntu and macOS.

@gaui
Copy link

gaui commented May 6, 2018

Yep, having this issue for Ubuntu, running vSphere ESXi 6.0

@jspenc72
Copy link

Im having the same issue:
packer: 1.3.1

@trunov-ms
Copy link

trunov-ms commented Mar 18, 2020

Same
packer 1.5.4

@serrnovik
Copy link

Same
packer 1.5.4

@renatocmaia
Copy link

I'm having the same issue:
packer: 1.5.6

@VladRassokhin
Copy link
Collaborator

I'm closing this issues since plugin is moved to official Packer repo and relevant issue there closed with resolution:

We've decided to explicitly support only vSphere 6.5 and above

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

9 participants