Avoid manually editing the desired file to manage the 'PrecisionTimeProtocol' tag for the vmknic
search cancel

Avoid manually editing the desired file to manage the 'PrecisionTimeProtocol' tag for the vmknic

book

Article ID: 313174

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

Users can utilize the desired file for vSphere Configuration Profile (VCP) remediation to manage the vmknic enabled service tags. Take the following configurations as an example, users may manually modify the exported desired file, adding <"precision_time_protocol": true> to a specific vmknic to manage the 'PrecisionTimeProtocol' tag. Following the remediation, the outcome is compliant, and the tag appears to be successfully added to vmk1. However, upon rebooting the host, the tag disappears, resulting in non-compliance.

{
    ...
    {
        "device": "vmk1",
        "enabled": true,
        "net_stack_instance_key": "defaultTcpipStack",
        "port_connection_type": "VDS",
        "ip": {
            "dhcp_dns": false,
            "ipv6_enabled": true,
            "dhcp": true,
            "ipv6": {
                "dhcp": false,
                "auto_configuration_enabled": false,
                "dhcp_dns": false
            }
        },
        "vds_port": {
            "switch_name": "DSwitch",
            "portgroup_name": "DPortGroup"
        },
        "mtu": 1500,
        "mac_mode": "AUTO_GENERATED",
        "enabled_services": {
            "nvme_tcp": true,
            "precision_time_protocol": true <=========== user manually adds precision_time_protocol
        }
    }
    ...
}


Cause

This is because 'PrecisionTimeProtocol' is a special service tag and it needs to be integrated with system time. Only adding "precision_time_protocol": true is not enough. The following configuration is the complete desired configurations for this tag. This differs from the other vmknic enabled service tags.
{
...
            {
                "device": "vmk1",
                "enabled": true,
                "net_stack_instance_key": "defaultTcpipStack",
                "port_connection_type": "VDS",
                "ip": {
                    "dhcp_dns": false,
                    "ipv6_enabled": true,
                    "dhcp": true,
                    "ipv6": {
                        "dhcp": false,
                        "auto_configuration_enabled": false,
                        "dhcp_dns": false
                    }
                },
                "vds_port": {
                    "switch_name": "DSwitch",
                    "portgroup_name": "DPortGroup"
                },
                "mtu": 1500,
                "mac_mode": "AUTO_GENERATED",
                "enabled_services": {
                    "nvme_tcp": true,
                    "precision_time_protocol": true <============ This should exist in the doc
                }
            }
        ],
        "net_stacks": [
            {
                "key": "defaultTcpipStack",
                "name": "defaultTcpipStack"
            }
        ]
    },
    "system": { <========= These should exist in the doc with precision_time_protocol
        "system_time": { <=========
            "enabled": true, <=========
            "protocol": "PTP" <=========
        } <=========
    }, <=========
...
}

Resolution

Users should not manually edit the desired file for this vmknic ''PrecisionTimeProtocol' tag.


Workaround:
To workaround the issue, please ensure users do not manually edit the desired file to manipulate vmknic 'PrecisionTimeProtocol' tag. It is better to manage the 'PrecisionTimeProtocol' tag through vCenter UI.