VMware Cloud Community
oliver_rafa
Contributor
Contributor

vmtoolsd.exe: info-get guestinfo.<variable> returns "no value found"

"C:\progra~1\VMware\VMware Tools\vmtoolsd.exe" --cmd "info-get guestinfo.ovfEnv"

C:\Users\Administrator><?xml version="1.0" encoding="UTF-8"?>

<Environment

    xmlns="http://schemas.dmtf.org/ovf/environment/1"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xmlns:oe="http://schemas.dmtf.org/ovf/environment/1"

    xmlns:ve="http://www.vmware.com/schema/ovfenv"

    oe:id=""

    ve:vCenterId="vm-7869">

  <PlatformSection>

      <Kind>VMware ESXi</Kind>

      <Version>5.0.0</Version>

      <Vendor>VMware, Inc.</Vendor>

      <Locale>en</Locale>

  </PlatformSection>

  <PropertySection>

        <Property oe:key="host.admin_pass" oe:value="test,1234"/>

        <Property oe:key="host.hostname" oe:value="new-computer-name"/>

  </PropertySection>

</Environment>

works!

but:

C:\Users\Administrator>"C:\progra~1\VMware\VMware Tools\vmtoolsd.exe" --cmd "info-get guestinfo.host.hostname"

C:\Users\Administrator>No value found

Smiley Sad

I am trying to create a PowerShell script to change the VM hostname on the first boot (it's a Windows 2012 VM).

For some reason, I am unable to retrieve a variable value when I call it by info-guest.<variable>.

Would someone know what needs to be done in order to retrieve the hostname parameter?

0 Kudos
0 Replies