packer-builder-vsphere icon indicating copy to clipboard operation
packer-builder-vsphere copied to clipboard

No host is compatible with the virtual machine when setting `vm_version` below 13

Open kalgra opened this issue 6 years ago • 4 comments

We are encountering an error when attempting to create a virtual machine using the VSphere ISO plugin targeting the ESXi server version 6.0 (hardware version 11 and earlier) and earlier. We receive the following error:

“Build 'vsphere-iso' errored: No host is compatible with the virtual machine.”

Using the default or version 13 and up have no issues. Am able to manually build new version 11 ESXi 6.0 compatible VMs using the same resources and configuration on our ESXi host.

Is there any way for us to inspect what is sent to VSphere to determine if the correct hardware versions are being sent or is it possible that our Packer template is configured incorrectly?

Dependency Versions:

$ packer --version
1.3.1
packer-builder-vsphere-iso.macos 2.0
packer-builder-vsphere-iso.linux 2.0

vSphere 6.5 w/DRS

Thank you in advance for any help you can provide.

kalgra avatar Oct 02 '18 15:10 kalgra

I see two problems here:

  • boot_command requires ESXi 6.5, and cannot be executed on older hosts due to lack of API.
  • DRS-enabled clusters are configured without host parameter https://github.com/jetbrains-infra/packer-builder-vsphere#clusters-with-drs

mkuzmin avatar Oct 17 '18 07:10 mkuzmin

vm_version is not working. I have tried on several 6.5 ESX clusters and they all error in the same way:

Building CentOS 6 prod vsphere-iso output will be in this color.

==> vsphere-iso: Creating VM... ==> vsphere-iso: Customizing hardware... ==> vsphere-iso: Mount ISO images... ==> vsphere-iso: Set boot order temporary... ==> vsphere-iso: Power on VM... ==> vsphere-iso: Clear boot order... ==> vsphere-iso: Power off VM... ==> vsphere-iso: Destroying VM... Build 'vsphere-iso' errored: No host is compatible with the virtual machine.

If I use the GUI I can create vmx11 system just fine so I don't think its a VMware issue.

I have done "vm_version": 11, & "vm_version": "11" and get the same error regardless. If I remove the line everything works perfectly.

gapotts avatar Sep 12 '19 15:09 gapotts

The problem here is that you are using a guest_os_type not supported by your Hardware version:

https://vdc-download.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html

You should be using:

"guest_os_type": "centos64Guest",

rumans avatar Oct 14 '19 13:10 rumans

Well who would of thunk that a guest_os_type would make a difference in supporting an older vm_version.

Thanks. That seems to have fixed it. Now to figure out the right guest_os_type for Ubuntu, & FreeBSD.

gapotts avatar Oct 14 '19 18:10 gapotts