Quantcast
Channel: VMware Communities: Message List - VMware vCloud Director
Viewing all articles
Browse latest Browse all 7719

Re: How to convert .xml customization script to vcloud understanble format(.txt or .bat or .sh)

$
0
0

Well, as I mentioned above, you'll have to write your own script/program to do that. There is no automatic way to convert. VC spec looks like:

 

<ConfigRoot>
  <_type>vim.CustomizationSpecItem</_type>
  <info>
    <_type>vim.CustomizationSpecInfo</_type>
    <changeVersion>1359364321</changeVersion>
    <description/>
    <lastUpdateTime>2013-01-28T09:12:01Z</lastUpdateTime>
    <name>W2k8r2Spec</name>
    <type>Windows</type>
  </info>
  <spec>
    <_type>vim.vm.customization.Specification</_type>
    <encryptionKey>
      <_length>1169</_length>
      <_type>byte[]</_type>
      <e id="0">48</e>
    </encryptionKey>
    <globalIPSettings>
      <_type>vim.vm.customization.GlobalIPSettings</_type>
    </globalIPSettings>
    <identity>
      <_type>vim.vm.customization.Sysprep</_type>
      <guiRunOnce>
        <_type>vim.vm.customization.GuiRunOnce</_type>
        <commandList>
          <_length>1</_length>
          <_type>string[]</_type>
          <e id="0">echo &gt; C:\test.txt</e>
        </commandList>
      </guiRunOnce>
      <guiUnattended>
        <_type>vim.vm.customization.GuiUnattended</_type>
        <autoLogon>false</autoLogon>
        <autoLogonCount>0</autoLogonCount>
        <timeZone>4</timeZone>
      </guiUnattended>
      <identification>
        <_type>vim.vm.customization.Identification</_type>
        <joinWorkgroup>WORKGROUP</joinWorkgroup>
      </identification>
      <licenseFilePrintData>
        <_type>vim.vm.customization.LicenseFilePrintData</_type>
        <autoMode>perServer</autoMode>
        <autoUsers>5</autoUsers>
      </licenseFilePrintData>
      <userData>
        <_type>vim.vm.customization.UserData</_type>
        <computerName>
          <_type>vim.vm.customization.FixedName</_type>
          <name>test-host</name>
        </computerName>
        <fullName>test-name</fullName>
        <orgName>test-org</orgName>
        <productId/>
      </userData>
    </identity>
    <nicSettingMap>
      <_length>1</_length>
      <_type>vim.vm.customization.AdapterMapping[]</_type>
      <e id="0">
        <_type>vim.vm.customization.AdapterMapping</_type>
        <adapter>
          <_type>vim.vm.customization.IPSettings</_type>
          <ip>
            <_type>vim.vm.customization.DhcpIpGenerator</_type>
          </ip>
        </adapter>
      </e>
    </nicSettingMap>
    <options>
      <_type>vim.vm.customization.WinOptions</_type>
      <changeSID>true</changeSID>
      <deleteAccounts>false</deleteAccounts>
    </options>
  </spec>
</ConfigRoot>

 

The node you're talking about is:

 

<guiRunOnce>
        <_type>vim.vm.customization.GuiRunOnce</_type>
        <commandList>
          <_length>1</_length>
          <_type>string[]</_type>
          <e id="0">echo &gt; C:\test.txt</e>
        </commandList>
      </guiRunOnce>

 

So you can just parse that yourself and call REST API with <CustomizationScript> set to "echo &gt; C:\test.txt".

 

/Andrii


Viewing all articles
Browse latest Browse all 7719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>