0

I'm running into an issue while provisioning Cisco FTD on Nutanix using the V2 API. When I deploy the VM without a Day 0 configuration file, the default password works fine. However, when I attempt to set a custom password using vm_customization_config, neither the default nor the configured password works.

🔹 Setup Details:

  • Using Nutanix V2 API for FTD deployment.
  • Tried provisioning with and without a Day 0 config.
  • Without Day 0 Config: Default credentials (admin / Admin123) work.
  • With Day 0 Config: Neither the default nor the custom password (AdminPassword: xxxxxx) works.

🔹 Day 0 Configuration JSON Used:

{
    "EULA": "accept",
    "Hostname": "ftdv-test2",
    "AdminPassword": "xxxxxxxxxx",
    "FirewallMode": "routed",
    "DNS1": "8.8.8.8",
    "DNS2": "",
    "DNS3": "",
    "IPv4Mode": "manual",
    "IPv4Addr": "XXX.XXX.XXX.XXX",
    "IPv4Mask": "255.255.254.0",
    "IPv4Gw": "XXX.XXX.XXX.XXX",
    "IPv6Mode": "disabled",
    "FmcIp": "XXX.XXX.XXX.XXX",
    "FmcRegKey": "Cisco123",
    "FmcNatId": "",
    "ManageLocally": "No"
}

🔹 Configuration Applied During VM Creation

# Convert JSON to Base64
day0_config_content = json.dumps(ftd_config, indent=4)
encoded_userdata = base64.b64encode(day0_config_content.encode()).decode()

# Add `vm_customization_config`
ftd_vm_create["vm_customization_config"] = {
    "datasource_type": "CONFIG_DRIVE_V2",
    "files_to_inject_list": [],
    "fresh_install": True,
    "userdata": encoded_userdata,
    # "userdata_path": "/cisco/ftd/day0-config.txt"
}

🔹 What I Tried:

Tried logging in with admin / Admin123 and admin / xxxxxxxxBoth failed.

Is anyone else faced this issue?

passowrd error

1 Answer 1

0

I was able to resolve this issue.

The problem was with the encoded_userdata. I initially had the following line in my code:

encoded_userdata = base64.b64encode(day0_config_content.encode()).decode()

Removing that line entirely and just passing the raw JSON string directly worked:

day0_config_content = json.dumps(ftd_config, indent=4)

ftd_vm_create["vm_customization_config"] = {
    "datasource_type": "CONFIG_DRIVE_V2",
    "files_to_inject_list": [],
    "fresh_install": True,
    "userdata": day0_config_content,
}

After removing the Base64 encoding, the password started working correctly, and I was able to log in with the AdminPassword provided in the Day 0 config.

Hope this helps someone else facing the same issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.