اینم یه قسمتی از فایل Perl :
البته بیش از 20 تا فایل هستند.

کد:
#!/usr/bin/perl -w

use strict;
use warnings;
use VMware::VIRuntime;
use VMware::VILib;
use IO::File;
use DBI;

require LWP::UserAgent;

my $WHMCS_ROLE_NAME = 'WHMCSVirtualMachineUser';
my %opts = (
	'templatename' => {
		type => "=s",
		help => "The Name of the template to clone",
		required => 1,
	},
	'destinationname' => {
		type => "=s",
		help => "The Name of the destination VM",
		required => 1,
	},
	'destinationfolder' => {
		type => "=s",
		help => "The name of the folder for the destination VM",
		required => 0,
	},
	'cluster' => {
		type => "=s",
		help => "The name of the cluster for the destination VM resources (overrides resourcepool parameter)",
		required => 0,
	},
	'resourcepool' => {
		type => "=s",
		help => "The Resource pool to assign for the new machine",
		required => 0,
		default => "Resources",
	},
	'datacenter' => {
		type => "=s",
		help => "The Datacenter to place the new VM in",
		required => 1,
	},
	'host' => {
		type => "=s",
		help => "The ESX/ESXi host to place the new VM on",
		required => 0,
	},
	'datastore' => {
		type => "=s",
		help => "The Datastore to place the new VM in",
		required => 0,
	},
	'guesttype' => {
		type => "=s",
		help => "The type of OS customization to perform (windows/linux) (leave blank for no guest OS customization)",
		required => 0,
	},
	'macaddress' => {
		type => "=s",
		help => "Changes the MAC address of the primary network adapter",
		required => 0,
	},
	'ip' => {
		type => "=s",
		help => "The IP address to assign to the VM",
		required => 0,
	},
	'subnetmask' => {
		type => "=s",
		help => "The Subnet mask to assign to the VM",
		required => 0,
	},
	'gateway' => {
		type => "=s",
		help => "The Gateway to assign to the VM",
		required => 0,
	},
	'dns' => {
		type => "=s",
		help => "The Dns server to assign to the VM",
		required => 0,
	},
	'domain' => {
		type => "=s",
		help => "The Domain suffix to assign to the VM",
		required => 0,
	},
	'primarywins' => {
		type => "=s",
		help => "The primary WINS server to assign to the VM",
		required => 0,
	},
	'secondarywins' => {
		type => "=s",
		help => "The secondary WINS server to assign to the VM",
		required => 0,
	},
	'memorymb' => {
		type => "=s",
		help => "The size of the new machine's memory in MB",
		required => 0,
	},
	'numcpus' => {
		type => "=s",
		help => "The number of CPUs to assign to the VM",
		required => 0,
	},
	'disksizekb' => {
		type => "=s",
		help => "The primary disk size in KB",
		required => 0,
	},
	'hostname' => {
		type => "=s",
		help => "The Hostname of the VM",
		required => 1,
	},
	'rootpwd' => {
		type => "=s",
		help => "The Administrtor password for Guest OS",
		required => 0,
	},
	'timezone' => {
		type => "=s",
		help => "The Timezone for Windows OS",
		required => 0,
		default => '085',
	},
	'orgname' => {
		type => "=s",
		help => "The Organization name for Windows OS",
		required => 0,
		default => 'Microsoft',
	},
	'fullname' => {
		type => "=s",
		help => "The user name for Windows OS",
		required => 0,
		default => 'User',
	},
	'productid' => {
		type => "=s",
		help => "The product key for Windows OS",
		required => 0,
		default => '',
	},
	'hostdomain' => {
		type => "=s",
		help => "The Domain for Linux OS",
		required => 0,
		default => '',
	},
	'timezonelinux' => {
		type => "=s",
		help => "The timezone for Linux OS",
		required => 0,
		default => 'Europe/London',
	},
	'assignuser' => {
		type => "=s",
		help => "The Username to assign for access to the VM",
		required => 0,
	},
	'poweron' => {
		type => "=i",
		help => "Wether or not to power on the new virtual machine (0/1)",
		required => 0,
		default => 0,
	},
	'whmcshost' => {
		type => "=s",
		help => "",
		required => 0,
	},
	'whmcsuser' => {
		type => "=s",
		help => "",
		required => 0,
	},
	'whmcspassword' => {
		type => "=s",
		help => "",
		required => 0,
	},
	'whmcsdb' => {
		type => "=s",
		help => "",
		required => 0,
	},
	'whmcsserviceid' => {
		type => "=s",
		help => "",
		required => 0,
	},
	'whmcscustomfield' => {
		type => "=s",
		help => "",
		required => 0,
	},
	'whmcsmoref' => {
		type => "=i",
		help => "",
		required => 0,
	},
	'productuser' => {
		type => "=s",
		help => "The windows account of the product user",
		required => 0,
	},
	'cpulimit' => {
		type => "=i",
		help => "The CPU Limit resource allocation in Mhz",
		required => 0,
	},
	'networkid' => {
		type => "=s",
		help => "The Network ID to assign to the network card (can be a distributed virtual switch)",
		required => 0,
	},
);