6 Replies Latest reply on Jun 9, 2015 8:30 AM by marcdevin

    vCloud Director 5.5 - how to perform "power on and force guest os customization" through rest API ?

    marcdevin Novice

      Hello,

       

      I am trying to change the password of my vm using rest API call :

       

       <GuestCustomizationSection href="https://xxx/api/vApp/vm-20dad588-96b4-4479-8ddb-91f1cb55df27/guestCustomizationSection/" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns="http://www.vmware.com/vcloud/v1.5">
          <ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
          <Enabled>true</Enabled>
          <JoinDomainEnabled>false</JoinDomainEnabled>
          <UseOrgSettings>false</UseOrgSettings>
          <AdminPasswordEnabled>true</AdminPasswordEnabled>
          <AdminPasswordAuto>false</AdminPasswordAuto>
          <AdminPassword>***********</AdminPassword>
          <ResetPasswordRequired>true</ResetPasswordRequired>
          <CustomizationScript>
      @ECHO OFF
          </CustomizationScript>
          <ComputerName>myvm</ComputerName>
          <Link rel="edit" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" href="https://xxxx/api/vApp/vm-20dad588-96b4-4479-8ddb-91f1cb55df27/guestCustomizationSection/"/>
      </GuestCustomizationSection>
      

       

      And then I power on the vm using :  https://xxxxxxx/api/vApp/vm-20dad588-96b4-4479-8ddb-91f1cb55df27/power/action/powerOn

       

      VM parameter are correctly set on vCloud Director, vm is powered on, but Guest OS Customization is not happening.

      Is there a way to "power on and force guest os customization" using rest API like in vCD UI ? Or do I need to do it differently?

       

      Thanks for your help !