VMware {code} Community
ktan1986
Contributor
Contributor

vmclone.pl guest customization failed

Hi All,

I am trying to clone a vm using vmclone.pl with guest cutomization. These are the attached customized file i am using.

1. vmclone.pl

2. vmclone.xml

3. vmclone.xsd

4. VMUtil.pm

Here is the command that i run.

When i run without vm and guest customization, it works fine. When i only customize vm without guest, it also works fine but when i run guest customization, i get this "spec.identity" error. When i invoke the script, i see the request reaching to the vsphere server but server replies back with this error. i spend almost a week to troubleshoot but no luck so far. I am not that familiar with vsphere. I have changed some parameters name here and there just while posting this here but i am making sure that they are correct when i run the script. Any kind of help will be appreciated. Smiley Sad

[root@vmtest3 vmclone]#  perl vmclone.pl --url abc.com/sdk --username root --password admin --vmname "vmauto" --vmname_destination test1 --vmhost 10.10.11.3 --customize_guest yes --filename vmclone.xml --schema vmclone.xsd

----------------------------------------------------------------------
$VAR1 = bless( {
  'globalIPSettings' => bless( {}, 'CustomizationGlobalIPSettings' ),
  'identity' => bless( {
    'guiUnattended' => bless( {
      'autoLogon' => '1',
      'autoLogonCount' => 0,
      'timeZone' => '140'
    }, 'CustomizationGuiUnattended' ),
    'identification' => bless( {
      'domainAdmin' => 'root',
      'domainAdminPassword' => bless( {
        'plainText' => 'true',
        'value' => 'admin'
      }, 'CustomizationPassword' ),
      'joinDomain' => 'abc.com'
    }, 'CustomizationIdentification' ),
    'licenseFilePrintData' => bless( {
      'autoMode' => bless( {
        'val' => 'perServer'
      }, 'CustomizationLicenseDataMode' ),
      'autoUsers' => '5'
    }, 'CustomizationLicenseFilePrintData' ),
    'userData' => bless( {
      'computerName' => bless( {
        'name' => 'vmauto5'
      }, 'CustomizationFixedName' ),
      'fullName' => 'vmware',
      'orgName' => 'vmware',
      'productId' => 'XXXX-XXXX-XXXX-XXXX-XXXX'
    }, 'CustomizationUserData' )
  }, 'CustomizationSysprep' ),
  'nicSettingMap' => [
    bless( {
      'adapter' => bless( {
        'dnsDomain' => ' 192.168.0.50:192.168.0.1',
        'dnsServerList' => [
          '10.5.1.11'
        ],
        'gateway' => [
          '10.10.64.1'
        ],
        'ip' => bless( {
          'ipAddress' => '10.10.64.140'
        }, 'CustomizationFixedIp' ),
        'primaryWINS' => '192.168.0.50',
        'secondaryWINS' => undef,
        'subnetMask' => '255.255.255.0'
      }, 'CustomizationIPSettings' )
    }, 'CustomizationAdapterMapping' )
  ]
}, 'CustomizationSpec' );


$VAR1 = undef;
Fault
SOAP Fault:
-----------
Fault string: A specified parameter was not correct.
spec.identity
Fault detail: InvalidArgument=HASH(0x1d96f4f0)

-------------------------------------------------------------------------------------------------

0 Kudos
0 Replies