vmware / open-vm-tools

Official repository of VMware open-vm-tools project
http://sourceforge.net/projects/open-vm-tools/
2.26k stars 427 forks source link

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

Open lethargosapatheia opened 3 months ago

lethargosapatheia commented 3 months ago

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.

johnwvmw commented 3 months ago

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:

lethargosapatheia commented 3 months ago

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.

johnwvmw commented 3 months ago

Sounds like a plan.

I am pinging the Guest CustomizationTeam to:

lethargosapatheia commented 3 months ago

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.