open-vm-tools icon indicating copy to clipboard operation
open-vm-tools copied to clipboard

vmware tools fail in Ubuntu 24.04 cloud image because `hwclock` doesn't exist

Open lethargosapatheia opened this issue 1 year ago • 4 comments

Describe the bug

This bug has been reported here https://bugs.launchpad.net/ubuntu/+source/open-vm-tools/+bug/2039206

At this point I gather an update for open-vm-tools should solve this, but this has happened yet, as tested with ubuntu 24.04 cloud image from 10 July 2024.

In my case this probably results in the network interface not being attached after powering on the virtual machine, even if the original template does have the option checked.

Reproduction steps

  1. Import an ova cloudimage template from here https://cloud-images.ubuntu.com/daily/server/noble/current/noble-server-cloudimg-amd64.ova
  2. clone the template using Packer v1.11.1 using:
        vapp {
                properties = {
                        hostname = "${var.playbook}"
                        user-data = base64encode(var.user_data)
                }
        }
[...]
        customize {
                linux_options {
                        host_name = "${var.template_name}"
                        domain = "company.internal"
                        hw_clock_utc = true
        }
        network_interface {
                ipv4_address = "${var.template_ip}"
                ipv4_netmask = "${var.vm_netmask}"
        }

        dns_server_list = [ "10.88.88.21", "10.88.88.22" ]
        ipv4_gateway = "${var.vm_gateway}"
        }

Expected behavior

That vmtools stop using hwclock and use timedatectl.

Additional context

I would like to know if there's been any progress here and if this is discussed anywhere. I've looked at the issues here and haven't found any mentions related to this topic, but I might have missed it.

lethargosapatheia avatar Jul 23 '24 19:07 lethargosapatheia

The Linux guest customization Perl scripts come from the vCenter Server, not from open-vm-tools.

The scripts have been updated to skip attempting setting the hardware clock if the hwclock command is not available on the system. The updated scripts are in the recent releases of vCenter:

  • VMware vCenter Server 8.0U3 & 8.0U3a
  • VMware vCenter Server 7.0 Update 3q

johnwvmw avatar Jul 23 '24 20:07 johnwvmw

I understand. I had no idea vcenter itself provided the perl scripts. Thanks for the information. I just need to upgrade the vcenter server then.

lethargosapatheia avatar Jul 23 '24 20:07 lethargosapatheia

Sounds like a plan.

I am pinging the Guest CustomizationTeam to:

  • provide an update to the Ubuntu bug report.
  • remember to note the fix is the relative Release Notes.

johnwvmw avatar Jul 23 '24 20:07 johnwvmw

Just in case someone come across this thread (I know this is becoming even more off-topic, but this might help others too), you might encounter this bug: https://knowledge.broadcom.com/external/article/371524/patching-vcenter-server-to-80-u3-fails-a.html

Changing the role names as follows:

CNS-Datastore -> CNS-Vanilla-Datastore
CNS-SEARCH-AND-SPBM -> CNS-Vanilla-SEARCH-AND-SPBM

before updating (or after rolling back the failed update) works.

lethargosapatheia avatar Jul 24 '24 15:07 lethargosapatheia