turnkeylinux / tracker

TurnKey Linux Tracker
https://www.turnkeylinux.org
70 stars 16 forks source link

vmdk files will not deploy on ESXi 6.7 #1716

Open FreedomFaighter opened 2 years ago

FreedomFaighter commented 2 years ago

GUI reports they're version 5.5 and on ESXi the vmdk templates I have attempted to load even after the automated conversion of the vmx file will not start.

JedMeister commented 2 years ago

Do you have any more info on what might have gone wrong? E.g. specific error/log messages?

Have you tried the OVA (AFAIK that should work on ESXi v6)?

FreedomFaighter commented 2 years ago

I do not have the vmdk file zip on the server at the moment but it was something along the lines of an issue with the virtual disk. When imported it gives a message that it needs to be converted to the current config file version. It might be a while until I can reproduce the issue as I keep getting redirected into a .de TLP mirror that I cannot connect to and unable to select any other mirror

JedMeister commented 2 years ago

Ah ok.

FWIW I do recall that there were intermittent issues with VMware finding the right disk to install the bootloader (grub) to. The workaround for that is/was to select the "manual" option and type in /dev/sda (choosing the '/dev/sda' option won't work, you have to explicitly and manually enter the disk to install grub to - if you are doing a clean install to a new VM, it should always be /dev/sda). And I recall some network related issues after someone had upgraded their ESXi/vSphere infrastructure (but was easily worked around).

So I suggest that you try to OVA first (if you haven't already), or worst case try installing from ISO (although as I said, if you hit the grub install bug, choose /dev/sda).

When yuou do have some further info, I'd be pleased to hear.

Also, FWIW it should be possible to just configure a new VM with desired specs and add the the VMDK file from our VM build.

FreedomFaighter commented 2 years ago

Direct import gives Failed to power on virtual machine TURNKEY POSTGRESQL. Unsupported or invalid disk type 2 for 'scsi0:0'. Ensure that the disk has been imported. Click here for more details.

ESXi 5.5 virtual machine

is the VM type it gives

JedMeister commented 2 years ago

Is this still the VMDK? The OVA should not give that error?! We make our OVAs with the "offical" VMWare "OVFTool" so I would expect it to "just work"?! We tested ISO, OVA and VMDK releases in the latest "VMWare Workstation Player" release at the time of v16.0. FWIW, the ISO did(/does) have intermittent issues finding where to install GRUB (workaround is to select "manual" then type in 'dev'sda') and VMDK build did throw a warning message, but worked anyway.

We have had issues over the years trying to ensure that our VMDK/OVA builds are as compatible as possible (many of our users are still using old versions of VMWare ESXi). So it's always a bit of a balance. Although as I say, our OVA build is made with the latest (at the time) release of VMware's OVFTool so would expect that to at least support newer VMware products.

Perhaps it's worth trying to "convert" it with the OVFTool yourself and see what happens then? Or if you haven't already tried the OVA (that's the one I'd recommend anyway) or the ISO, I would recommend trying them (the VMDK is a legacy build and/or for those that just want to import the VMDK).

Also, FWIW, googling around the internet, I found a Stackoverflow Q&A that notes:

I solved the issue by changing the Virtual Device Node from SCSI controller 0 to IDE controller 0 at the hard disk settings of the virtual machine.

And another post (on the same Q&A - more details available via the link) suggests:

If anyone has also the same issue, check this article from Vmware. It solved for me: https://kb.vmware.com/s/article/1028943


Digging a little deeper, I suspect that the issue is this line in the VMX:

scsi0.virtualDev = "lsilogic"

Apparently that should be compatible with newer VMware products, but older ones may need:

scsi0.virtualDev = "buslogic"

Newer VMware products can use the paravirtualised driver:

scsi0.virtualDev = "pvscsi"

Another thing that might be worth trying (instead or as well as) is updating the virtualHW.version. See this VMware hardware versions doc page for info on hardware version(s).

JedMeister commented 2 years ago

FWIW, I just had a quick look into trying to get hold of a version of ESXi/vSphere so I can test on that (I use the free version of Proxmox for my hypervisor). Unfortunately, it's a bit of a pain to get a "trial" version (of ESXi/vSphere) and it's only valid for 60 days.

We're currently hard at work on the v17.0 release and are currently planning to delay to creation of our VM builds (we still plan to do them, but are prioritising ISO & AWS EC2 builds). So once we get to working on the VM builds for v17.0, I will relook at getting a version(s) of VMware ESXi/vSphere for testing. My research (for my previous post) raised the fact that ESXi/vSphere and Workstation Player are not completely compatible/consistent. I'm not sure when that happened, but it is contrary to my previous understanding so may well be part of the issue.

FreedomFaighter commented 2 years ago

I have looked at the available menu after importing the vmdk and there is and Upgrade option, once upgraded it still does not boot and produces the following error in the log

Failed - Module 'DevicePowerOn' power on failed.
Errors

    Module 'DevicePowerOn' power on failed.
    Unable to allocate a PCI SCSI adapter. Too many PCI devices are already configured.
    Failed to configure virtual device 'scsi0'.
    Failed to start the virtual machine

it does not boot with a sata controller either

I actually looked at the popup a bit further and its actual message is that it cannot find a corresponding device on the host and that esxi will reconnect the ide controller upon each boot if needed.

Cannot connect the virtual device ide1:0 because no corresponding device is available on the host. Do you want to try to connect this virtual device every time you power on the virtual machine?

to which you can answer no and the VM will still power on

I powered off one of the VMs and powered it back on and seems that popup does not reappear and may actually only reappear upon host reboot

There is a message about irreversibly you have to deal with step 1 The steps I've found now that allow it to power on successfully without an error message is to go to

  1. Actions->Upgrade VM Compatibility and choose version 6.7 and confirm if you agree that it is irreversible
  2. Actions->Edit settings->Expand the Hard disk 1 device and change the controller to IDE 0 (this isn't changeable while the device is powered on) and save the new settings
  3. Power on the VM and make a decision Yes or No as to whether you want the virtual device reconnected at each power on
FreedomFaighter commented 2 years ago

Those steps have worked to get to the configuration on first boot for Core, LXC, Postgresql, and gitlab

FreedomFaighter commented 2 years ago

LXC does have a mismatch however on the guest OS setting

The configured guest OS (Debian GNU/Linux 9 (64-bit)) for this virtual machine does not match the guest that is currently running (Other 3.x Linux (64-bit)). You should specify the correct guest OS to allow for guest-specific optimizations.
FreedomFaighter commented 2 years ago

They do seem to stop receiving input after 2-8 characters and no input after reset

a complete power off and power on was necessary to get input redirected into the VM

FreedomFaighter commented 2 years ago

The VMs however do not come back up after restart, tried unregistering and reregistering, with same settings and get this error message Failed to power on virtual machine <vm name>. Object type requires hosted I/O Click here for more details.