How to use one.vm.updateconf using api

I am trying to change Password base 64 in context by using api one.vm.updateconf, I’m getting a response as 200 but nothing is updated

Did you resolved it. I am also stuck here. Please reply if you have found the answer.

Increase the API verbosity by uncommenting this line and setting %l to some high value, like 2000. Then restart opennebula and check out the string being passed to oned.

For example, the following call is the result of updating the whole VM template

Fri Dec  8 14:07:25 2023 [Z0][ReM][D]: Req:9552 UID:0 IP:127.0.0.1 one.vm.updateconf invoked , 0, "OS=[
  ARCH="x86_64",
  UUID="72840a5d-5f5e-44bb-8cad-740e6db43eb1" ]
GRAPHICS=[
  LISTEN="0.0.0.0",
  PORT="5900",
  TYPE="vnc" ]
CONTEXT=[
  DISK_ID="1",
  ETH0_DNS="172.16.100.1",
  ETH0_EXTERNAL="",
  ETH0_GATEWAY="172.16.100.1",
  ETH0_IP="172.16.100.2",
  ETH0_IP6="",
  ETH0_IP6_GATEWAY="",
  ETH0_IP6_METHOD="",
  ETH0_IP6_METRIC="",
  ETH0_IP6_PREFIX_LENGTH="",
  ETH0_IP6_ULA="",
  ETH0_MAC="02:00:ac:10:64:02",
  ETH0_MASK="",
  ETH0_METHOD="",
  ETH0_METRIC="",
  ETH0_MTU="",
  ETH0_NETWORK="",
  ETH0_SEARCH_DOMAIN="",
  ETH0_VLAN_ID="",
  ETH0_VROUTER_IP="",
  ETH0_VROUTER_IP6="",
  ETH0_VROUTER_MANAGEMENT="",
  NETWORK="YES",
  ONEGATE_ENDPOINT="http://172.16.100.1:5030",
  PASSWORD_BASE64="cm9vdA==\n",
  REPORT_READY="YES",
  SSH_PUBLIC_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDI9v7X1obujdpEyJs9f3fJZ0ueB196BZxtMwUaOH/J1jVTOBYl6wOhzw6sci1L5HY9kJOjlxqKUkmKYrXNvZVyNFxMSr1YYNM73mY42pFxE49+vVJ1DZszQOd3ORvxuLqs3tMMw4ZvBQWgz2Jl5wUF9PKyxnCvbkXXUN6ARgJZYmEWqruBKhFCHPhqQYlBl6JJoEUzWrPNQKXugOwz/BCxYZ24ChZCZrB0fAXGtKmywnqCh1iNZCokr0AxJe6IpNhnqve89a2SDk4bEA9Fg3p4tkqx8EaeoRAqtQ7TlLIJY+58W7+StvjH0IUpozcG1DjZLvxKrIoHKnzHI2TcdtjYBosfbuFHCGuoVzc5UWmKwW+5oFVHs2QDmKZQT1vCabLvLaKiULrF2Lbfq24XK25q7jSbRbfEJ+WH7ewiCqqb2eTxO2G3dvlTBCTGijD5mCgSEZ8RKvQE3M5a5zXvco87OQu6VW2Zpy8KYZCXgV0HtFAb5vE9AebuP7dz0/A2mx8= oneadmin@fog
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCeO91f255rApWV62cgd2bZWg8bWUsYeMQb1q66hcXMS/SwH9QW6HSlPqeJ9k5cmiuCE0HERmCXvkQJPvF7EUkencAMULX0muKjSrezVkw3xQzCfCf0CEP7tb6YQnn76CWs9NOSdqc4rjSFD1jiTUxvyXJGfH1Ad3ORvgSDMaRlXS3FovBrZFkl5RqjiJJZI2i4IimT/XpP7ILZQf4hfwb+6qE2F9NQ/lIp2TukCzEPc8ZyvwTJeXa09kXIY8Uxk3dO2l1t3DN763U1SWSRSgl1XK0Ykj5ZDpYZeSYGozZzlJA0RMtwmY6A4WU4NBueLrtTev9wICxEwJk7Pm1yMZnW5VcjqFXOgGq4KBHpOq5QYLSthsFVP3wQP1mOm1Q4kI3DpqPMeFejaA/OKChrvDFzmZXrwfjsAOtxZw11KU8JA6DaR0lDWNKE+GHZj31JSbsZS8nsMv1GCm8Ak4SCM+SbaTH8qadXphCQdUExWdxnYJ4S1AH0yYbBPtK36zPkIRs= root@fog",
  TARGET="hda",
  TOKEN="YES",
  VMID="0" ]
", 0
Fri Dec  8 14:07:25 2023 [Z0][ReM][D]: Req:9552 UID:0 one.vm.updateconf result SUCCESS, 0
Fri Dec  8 14:07:26 2023 [Z0][VMM][D]: Message received: UPDATECONF SUCCESS 0

the VM previously had PASSWORD instead of PASSWORD_BASE64 and the VM template shows it

root@fog:~# onevm show 0 -j | jq .VM.TEMPLATE.CONTEXT.PASSWORD_BASE64
"cm9vdA==\\n"

Read carefully the updateconf API call description since you can append as well instead of replacing the whole template.