script customization

Hello

I want to check script customization is successful or not.

Is any tool available?

I'm looking for a script that can help me to find the entry in the events of the virtual computer.

successful completion sysprep has two messages in task & events > events of the virtual machine. a customization script started is and if it succeeds it shows successful personalization.

Is it possible to create a script to search in the event that the virtual machines have a successful event sysprep/customization & tasks.

Thanks in advance.

Try something like this

$entity = get - VM

$start = (get-Date). AddDays(-31)

Get-VIEvent-body $entity - start $start |

where {$_-is [VMware.Vim.CustomizationFailed]} |

Select CreatedTime,@{N="VM; E={$_. Vm.Name}}, FullFormattedMessage, logLocation

It will look like a back 31 days customizations all failed.

Tags: VMware

Similar Questions

  • Guest OS script customization help.

    Hello
    I am trying to run a script in a virtual machine after deploying a paralytic. The script sets the automatic logon to activate because we need this function to perform certain other actions before joining the domain.
    I activated the VM Guest OS customization VAPP ("customization of activate ', 'Change SID', 'Password Reset'") and I used William Lams script provided here, http://blogs.vmware.com/vsphere/2012/06/using-a-guest-customization-script-to-tell-when-vappvm-is-ready-in-vcloud-director.html in the section of script Guest OS customization as a base.

    I have tried both:

    off @echo

    If '%1% ' == 'precustomization' (echo of the tasks precustomization) otherwise if '%1% ' == 'postcustomization' (c:\script\script.bat)

    and

    off @echo
    If '%1% ' is "precustomization" (echo of precustomization task) if '%1% ' is 'postcustomization' (cmd/c reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" AutoAdminLogon t REG_SZ/d '1' f v)
    cmd /c reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" DefaultUserName t REG_SZ/d 'Administrator' f v
    cmd/d reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" v DefaultDomainName t REG_SZ/d 'localhost' f
    Shutdown r)

    The first example points to a file, c:\script\script.bat, locally on the virtual machine. If I use Williams script without changing the vm-is-ready file is created.

    The customscript.bat is created in a folder under C:\Windows\Temp\ on of Windows virtual machine with the content as described above, but it seems that it is never executed

    Any help appreciated.
    Thank you

    We that debogues in offline mode, so just to sum up the results so far:

    Theory:

    There are several things here.

    One is on unattend.xml required by sysprep. The way in which it is used is the following:
    -VCD uses the ' basic' version of guestcustomization/windows/unattend.xml
    -obtained set cached in guestcustomization/windows_deployment_package_sidgen.cab on the first request to customize Vista + or any other virtual Windows computer in case "change SID is false."
    d ' after the above, I believe that it is possible to use the unattend.xml file "basic" to "extend" VCD offer out-of-the-box. Remember that any time that you do this, you must manually backup or remove guestcustomization/windows_deployment_package_sidgen.cab. Then the system takes care of regenerate automatically using the most recent version of the unattend.xml file
    -I think that this is not the right way to go in this particular case. This approach would severely limit flexibility due to the need to specify a password for automatic logon. So, you would have to live with a hard-coded pass which is very precarious. But it works very well for 'static' things like "company name".
    -I think change unattend.xml inside the virtual machine (probably see you \Windows\Panther) is not going to work somehow. I don't know exactly the purpose of this file, but I think that it is generated by sysprep itself during its work
    -I work on improvements for the next version and followed bug add this feature. Basically I dynamically update unattend.xml based on the password set in VCD
    The other is about performance after customization. The way it works now (for the case of "change SID is true") is that we rely on the Windows Task Scheduler. Basically plan us customization after execution of the script to run after reboot to the very last point inside the sysprep mini-setup phase. If the warning you see is probably the Scheduler and I think it's harmless. It also means that after customization will be the last thing that is performed on your virtual machine. So not sysprep after that and I don't expect anything to delete your registry values or either reboot.
    Now, I suspect that these keys are not simply added because of a problem with the keys themselves or (as you well pointed out) this could be the permissions problem.
    Practice:
    We went with the first approach, which is a good enough compromise for this particular client:
    0) be careful with the update of file system of the cell while signed in as 'root' ssh, because most of the files (if not all) is the property of vcloud:vcloud
    (1) to add:
           
              XXX
              true</PlainText> </div> <div>         </div> <div> </div> <div> <AutoLogon> </AutoLogon></div> <div>         <Password> </Password></div> <div>           <Value>XXX</Value> </div> <div>           <PlainText>true</PlainText> </div> <div>         </div> <div>         <Domain>localhost</Domain> </div> <div>         <Enabled>true</Enabled> </div> <div>         <LogonCount>8</LogonCount> </div> <div>         <Username>Administrator</Username> </div> <div> </div> <div>at $VCD_HOME/guestcustomization/windows/unattend.xml</div> <div>(2) to remove the $VCD_HOME/guestcustomization/windows_deployment_package_sidgen.cab that caches the unattend.xml file. System must regenerate. If she doesn't do something like:</div> <div>Su - vcloud</div> <div> <div>CD/opt/vmware/vcloud-director/deploymentPackageCreator</div> <p class="reply">export LD_LIBRARY_PATH = / opt/vmware/vcloud-Director/deploymentPackageCreator</div></div><p class="reply"> <div>. / deploymentPackageCreator... / guestcustomization/windows... /guestcustomization/windows_deployment_package_sidgen.cab "Customize - guest.exe" 1</div> <div>(3) be aware that on some models sysprep automatically disables the administrator account. It was not a problem on the model of the customer, but for me it does not on any of my models in the laboratory. The solution is to create another account to the Administrators group, and to be used for automatic logon. I'm working on the fix.</div><p class="reply"> <p class="reply">(4) for debugging this kind of things always start to do it manually on an own virtual computer (run sysprep.exe to register commands from the command line, run update) and check to succeed before trying to mess with VCD</p> <p class="reply">(5) we have no debug update registry problem, I'll put it on my TODO list</p> <p class="reply">Andrii</p> </li> <a name="MZ8r7bXG"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/cannot-change-the-entry-door-of-the-linux-guest-os-by-the-perl-script-customization/">Cannot change the entry door of the Linux guest OS by the perl script customization</a></p> <p class="help">Default gateway Linux can be changed using script (modified from vmclone.pl) below.</p><p class="help">Someone at - it gives help on this?</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><!--[CodeBlockStart:9b0c99d4-852d-4184-b484-ab28dcc6303a][excluded]--><pre class="xml" name="code"> #!/usr/bin/perl -w # # Copyright (c) 2007 VMware, Inc.&nbsp; All rights reserved. # use strict; use warnings; use FindBin; use lib "$FindBin::Bin/../"; use VMware::VIRuntime; use XML::LibXML; use AppUtil::VMUtil; use AppUtil::HostUtil; use AppUtil::XMLInputUtil; $Util::script_version = "1.0"; sub check_missing_value; my %opts = ( &nbsp;&nbsp; vmhost =&gt; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type =&gt; "=s", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; help =&gt; "The name of the host", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; required =&gt; 1, &nbsp;&nbsp; }, &nbsp;&nbsp; vmname =&gt; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type =&gt; "=s", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; help =&gt; "The name of the Virtual Machine", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; required =&gt; 1, &nbsp;&nbsp; }, &nbsp;&nbsp; vmname_destination =&gt; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type =&gt; "=s", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; help =&gt; "The name of the target virtual machine", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; required =&gt; 1, &nbsp;&nbsp; }, &nbsp;&nbsp; filename =&gt; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type =&gt; "=s", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; help =&gt; "The name of the configuration specification file", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; required =&gt; 0, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default =&gt; "../sampledata/vmclone.xml", &nbsp;&nbsp; }, &nbsp;&nbsp; customize_guest =&gt; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type =&gt; "=s", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; help =&gt; "Flag to specify whether or not to customize guest: yes,no", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; required =&gt; 0, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default =&gt; 'no', &nbsp;&nbsp; }, &nbsp;&nbsp; customize_vm =&gt; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type =&gt; "=s", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; help =&gt; "Flag to specify whether or not to customize virtual machine: " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . "yes,no", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; required =&gt; 0, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default =&gt; 'no', &nbsp;&nbsp; }, &nbsp;&nbsp; schema =&gt; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type =&gt; "=s", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; help =&gt; "The name of the schema file", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; required =&gt; 0, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default =&gt; "../schema/vmclone.xsd", &nbsp;&nbsp; }, &nbsp;&nbsp; datastore =&gt; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type =&gt; "=s", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; help =&gt; "Name of the Datastore", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; required =&gt; 0, &nbsp;&nbsp; }, ); Opts::add_options(%opts); Opts::parse(); Opts::validate(\&amp;validate); Util::connect(); clone_vm(); Util::disconnect(); # Clone vm operation # Gets destination host, compute resource views, and # datastore info for creating the configuration # specification to help create a clone of an existing # virtual machine. # ==================================================== sub clone_vm { &nbsp;&nbsp; my $vm_name = Opts::get_option('vmname'); &nbsp;&nbsp; my $vm_views = Vim::find_entity_views(view_type =&gt; 'VirtualMachine', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filter =&gt; {'name' =&gt;$vm_name}); &nbsp;&nbsp; if(@$vm_views) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (@$vm_views) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $host_name =&nbsp; Opts::get_option('vmhost'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $host_view = Vim::find_entity_view(view_type =&gt; 'HostSystem', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filter =&gt; {'name' =&gt; $host_name}); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!$host_view) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0, "Host '$host_name' not found\n"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # bug 449530 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $disk_size = get_disksize(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if($disk_size eq -1 || $disk_size eq "") { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $disk_size = 0; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $devices = $_-&gt;config-&gt;hardware-&gt;device; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach my $device (@$devices) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ref $device eq "VirtualDisk") { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $disk_size = $disk_size + $device-&gt;capacityInKB; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($host_view) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $comp_res_view = Vim::get_view(mo_ref =&gt; $host_view-&gt;parent); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $ds_name = Opts::get_option('datastore'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my %ds_info = HostUtils::get_datastore(host_view =&gt; $host_view, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; datastore =&gt; $ds_name, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; disksize =&gt; $disk_size); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($ds_info{mor} eq 0) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($ds_info{name} eq 'datastore_error') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0, "\nDatastore $ds_name not available.\n"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($ds_info{name} eq 'disksize_error') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0, "\nThe free space available is less than the" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . " specified disksize or the host" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . " is not accessible.\n"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $relocate_spec = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VirtualMachineRelocateSpec-&gt;new(datastore =&gt; $ds_info{mor}, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host =&gt; $host_view, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pool =&gt; $comp_res_view-&gt;resourcePool); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $clone_name = Opts::get_option('vmname_destination'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $clone_spec ; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $config_spec; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $customization_spec; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ((Opts::get_option('customize_vm') eq "yes") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;&amp; (Opts::get_option('custom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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif ((Opts::get_option('customize_guest') eq "yes") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;&amp; (Opts::get_option('customize_vm') ne "yes")) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $customization_spec = get_customization_spec &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Opts::get_option('filename')); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $clone_spec = VirtualMachineCloneSpec-&gt;new( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; customization =&gt; $customization_spec, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif ((Opts::get_option('customize_guest') eq "yes") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;&amp; (Opts::get_option('customize_vm') eq "yes")) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $customization_spec = get_customization_spec &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name =&gt; Opts::get_option('vmname_destination'), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; spec =&gt; $clone_spec); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace (0, "\nClone '$clone_name' of virtual machine" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . " '$vm_name' successfully created."); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($@) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ref($@) eq 'SoapFault') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ref($@-&gt;detail) eq 'FileFault') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0, "\nFailed to access the virtual " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ." machine files\n"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif (ref($@-&gt;detail) eq 'InvalidState') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0,"The operation is not allowed " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ."in the current state.\n"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif (ref($@-&gt;detail) eq 'NotSupported') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0," Operation is not supported by the " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ."current agent \n"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif (ref($@-&gt;detail) eq 'VmConfigFault') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Virtual machine is not compatible with the destination host.\n"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif (ref($@-&gt;detail) eq 'InvalidPowerState') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "The attempted operation cannot be performed " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ."in the current state.\n"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif (ref($@-&gt;detail) eq 'DuplicateName') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "The name '$clone_name' already exists\n"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif (ref($@-&gt;detail) eq 'NoDisksToCustomize') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0, "\nThe virtual machine has no virtual disks that" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . " are suitable for customization or no guest" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . " is present on given virtual machine" . "\n"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif (ref($@-&gt;detail) eq 'HostNotConnected') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0, "\nUnable to communicate with the remote host, " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ."since it is disconnected" . "\n"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elsif (ref($@-&gt;detail) eq 'UncustomizableGuest') { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0, "\nCustomization is not supported " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb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bsp;&nbsp; } &nbsp;&nbsp; else { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace (0, "\nNo virtual machine found with name '$vm_name'\n"); &nbsp;&nbsp; } } # It returns the customization spec as per the input XML file sub get_customization_spec { &nbsp;&nbsp; my ($filename) = @_; &nbsp;&nbsp; my $parser = XML::LibXML-&gt;new(); &nbsp;&nbsp; my $tree = $parser-&gt;parse_file($filename); &nbsp;&nbsp; my $root = $tree-&gt;getDocumentElement; &nbsp;&nbsp; my @cspec = $root-&gt;findnodes('Customization-Spec'); &nbsp;&nbsp; # Default Values &nbsp;&nbsp; my $computername = "compname"; &nbsp;&nbsp; #my $timezone = 190; &nbsp;&nbsp; #my $userpassword; &nbsp;&nbsp; my $domain; &nbsp;&nbsp; my $ipAddress; &nbsp;&nbsp; my @gateway; &nbsp;&nbsp; my $subnetMask; &nbsp;&nbsp; my @dnsServerList; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; foreach (@cspec) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($_-&gt;findvalue('Virtual-Machine-Name')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $computername = $_-&gt;findvalue('Virtual-Machine-Name'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($_-&gt;findvalue('Domain')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $domain = $_-&gt;findvalue('Domain'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($_-&gt;findvalue('ipAddress')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ipAddress = $_-&gt;findvalue('ipAddress'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($_-&gt;findvalue('gateway')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @gateway = split (',',$_-&gt;findvalue('gateway')); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($_-&gt;findvalue('subnetMask')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $subnetMask = $_-&gt;findvalue('subnetMask'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($_-&gt;findvalue('dnsServerList')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @dnsServerList = split (',',$_-&gt;findvalue('dnsServerList')); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; } &nbsp; &nbsp;&nbsp; # globalIPSettings &nbsp;&nbsp; my @dnsSuffixList = [$domain]; &nbsp;&nbsp; my $customization_global_settings = CustomizationGlobalIPSettings-&gt;new(dnsServerList =&gt; \@dnsServerList, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dnsSuffixList =&gt;@dnsSuffixList); &nbsp;&nbsp; my $customization_identity_settings = CustomizationIdentitySettings-&gt;new(); &nbsp;&nbsp; # identity &nbsp;&nbsp; # my $password = &nbsp;&nbsp; #&nbsp;&nbsp; CustomizationPassword-&gt;new(plainText=&gt;"true", value=&gt; $userpassword); $computername &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; my $cust_fixname = CustomizationFixedName-&gt;new (name =&gt; $computername); &nbsp;&nbsp; my $cust_linuxprep = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CustomizationLinuxPrep-&gt;new(domain =&gt; $domain, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hostName =&gt; $cust_fixname, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hwClockUTC =&gt;"false", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeZone =&gt;"Asia/Shanghai"); &nbsp;&nbsp; # nicSettingMap &nbsp;&nbsp; my $customization_fixed_ip = CustomizationFixedIp-&gt;new(ipAddress =&gt; $ipAddress); &nbsp;&nbsp; my $cust_ip_settings = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CustomizationIPSettings-&gt;new(ip =&gt; $customization_fixed_ip, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dnsDomain =&gt; $domain, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gateway =&gt; \@gateway, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subnetMask =&gt; $subnetMask); &nbsp;&nbsp; my $cust_adapter_mapping = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CustomizationAdapterMapping-&gt;new(adapter =&gt; $cust_ip_settings); &nbsp;&nbsp; my @cust_adapter_mapping_list = [$cust_adapter_mapping]; &nbsp;&nbsp; &nbsp;&nbsp; # customization spec &nbsp;&nbsp; my $customization_spec = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CustomizationSpec-&gt;new (identity=&gt;$cust_linuxprep, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; globalIPSettings=&gt;$customization_global_settings, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nicSettingMap=&gt;@cust_adapter_mapping_list); &nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; options=&gt;$CustomizationOptions); &nbsp;&nbsp; return $customization_spec; } #Gets the config_spec for customizing the memory, number of cpu's # and returns the spec sub get_config_spec() { &nbsp;&nbsp; my $parser = XML::LibXML-&gt;new(); &nbsp;&nbsp; my $tree = $parser-&gt;parse_file(Opts::get_option('filename')); &nbsp;&nbsp; my $root = $tree-&gt;getDocumentElement; &nbsp;&nbsp; my @cspec = $root-&gt;findnodes('Virtual-Machine-Spec'); &nbsp;&nbsp; my $vmname ; &nbsp;&nbsp; my $vmhost&nbsp; ; &nbsp;&nbsp; my $guestid; &nbsp;&nbsp; my $datastore; &nbsp;&nbsp; my $disksize = 4096;&nbsp; # in KB; &nbsp;&nbsp; my $memory = 256;&nbsp; # in MB; &nbsp;&nbsp; my $num_cpus = 1; &nbsp;&nbsp; my $nic_network; &nbsp;&nbsp; my $nic_poweron = 1; &nbsp;&nbsp; foreach (@cspec) { &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($_-&gt;findvalue('Guest-Id')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $guestid = $_-&gt;findvalue('Guest-Id'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($_-&gt;findvalue('Memory')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $memory = $_-&gt;findvalue('Memory'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($_-&gt;findvalue('Number-of-CPUS')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $num_cpus = $_-&gt;findvalue('Number-of-CPUS'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $vmname = Opts::get_option('vmname_destination'); &nbsp;&nbsp; } &nbsp;&nbsp; my $vm_config_spec = VirtualMachineConfigSpec-&gt;new( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name =&gt; $vmname, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memoryMB =&gt; $memory, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; numCPUs =&gt; $num_cpus, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; guestId =&gt; $guestid ); &nbsp;&nbsp; return $vm_config_spec; } sub get_disksize { &nbsp;&nbsp; my $disksize = -1; &nbsp;&nbsp; my $parser = XML::LibXML-&gt;new(); &nbsp;&nbsp; &nbsp;&nbsp; eval { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $tree = $parser-&gt;parse_file(Opts::get_option('filename')); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $root = $tree-&gt;getDocumentElement; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my @cspec = $root-&gt;findnodes('Virtual-Machine-Spec'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (@cspec) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $disksize = $_-&gt;findvalue('Disksize'); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp; }; &nbsp;&nbsp; return $disksize; } # check missing values of mandatory fields sub check_missing_value { &nbsp;&nbsp; my $valid= 1; &nbsp;&nbsp; my $filename = Opts::get_option('filename'); &nbsp;&nbsp; my $parser = XML::LibXML-&gt;new(); &nbsp;&nbsp; my $tree = $parser-&gt;parse_file($filename); &nbsp;&nbsp; my $root = $tree-&gt;getDocumentElement; &nbsp;&nbsp; my @cust_spec = $root-&gt;findnodes('Customization-Spec'); &nbsp;&nbsp; my $total = @cust_spec; &nbsp;&nbsp; if (!$cust_spec[0]-&gt;findvalue('Virtual-Machine-Name')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0,"\nERROR in '$filename':\n computername value missing "); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $valid = 0; &nbsp;&nbsp; } &nbsp;&nbsp; if (!$cust_spec[0]-&gt;findvalue('Domain')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0,"\nERROR in '$filename':\n domain value missing "); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $valid = 0; &nbsp;&nbsp; } &nbsp;&nbsp; if (!$cust_spec[0]-&gt;findvalue('ipAddress')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0,"\nERROR in '$filename':\n ipAddress value missing "); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $valid = 0; &nbsp;&nbsp; } &nbsp;&nbsp; if (!$cust_spec[0]-&gt;findvalue('gateway')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0,"\nERROR in '$filename':\n gateway value missing "); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $valid = 0; &nbsp;&nbsp; } &nbsp;&nbsp; if (!$cust_spec[0]-&gt;findvalue('subnetMask')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0,"\nERROR in '$filename':\n subnetMask value missing "); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $valid = 0; &nbsp;&nbsp; } &nbsp;&nbsp; if (!$cust_spec[0]-&gt;findvalue('dnsServerList')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0,"\nERROR in '$filename':\n dnsServerList value missing "); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $valid = 0; &nbsp;&nbsp; } &nbsp;&nbsp; return $valid; } sub validate { &nbsp;&nbsp; my $valid= 1; &nbsp;&nbsp; if ((Opts::get_option('customize_vm') eq "yes") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; || (Opts::get_option('customize_guest') eq "yes")) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $valid = XMLValidation::validate_format(Opts::get_option('filename')); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($valid == 1) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $valid = XMLValidation::validate_schema(Opts::get_option('filename'), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Opts::get_option('schema')); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($valid == 1) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $valid = check_missing_value(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; if (Opts::option_is_set('customize_vm')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ((Opts::get_option('customize_vm') ne "yes") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;&amp; (Opts::get_option('customize_vm') ne "no")) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0,"\nMust specify 'yes' or 'no' for customize_vm option"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $valid = 0; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; if (Opts::option_is_set('customize_guest')) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ((Opts::get_option('customize_guest') ne "yes") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;&amp; (Opts::get_option('customize_guest') ne "no")) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Util::trace(0,"\nMust specify 'yes' or 'no' for customize_guest option"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $valid = 0; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; } &nbsp;&nbsp; return $valid; } __END__ </pre><!--[CodeBlockEnd:9b0c99d4-852d-4184-b484-ab28dcc6303a]--><div style="display:none;"></div> <p class="reply">You get errors? I also recommend to check the customer that has been deployed, for linux guests, there is a log file of the customization specification and I want to say its somewhere in/var/log/vmware, but I don't remember the exact name of the file. You can see what happened in and if there is no error. Also, I assume that you have looked at the list of taken guestOSes supported for customization of comments?</p> </li> <a name="zPmKoWAJ"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/specifications-of-the-customization-only-some-seen-in-vra-6-2-0/">Specifications of the customization - only some seen in vRA 6&period;2&period;0</a></p> <p class="help">Hello</p><p style="min-height: 8pt; padding: 0px;"><p class="help">When I create a clone of a VC model model I normally specifies a customization script. I have 6 custimaztion scripts starting with the "Base" name... "can I display in vSphere web client on the virtual circuit.</p><p class="help">When I search for them through the customization of vRA spec field in a model by using the word 'Base', I have only posted 4. Also if you type the name of one of those missing and save it, then on provision of blueprint, I get an error that the script customization is not found. I can see and edit on the VC. I did vRA collect data of computing resources, but this has no effect.</p><p style="min-height: 8pt; padding: 0px;"><p class="help">Anyone has an idea why I only see in vRA some of the specs of the personalization of the VC?</p><p class="help"><span style="font-size: 10pt; line-height: 1.5em;">Also, I can see added in December 2015 but miss me one from July 2015.</span></p><p class="help"><span style="font-size: 13.3333px;"><br></span></p><p class="help"><span style="font-size: 13.3333px;">vRA 6.2.0</span></p><p class="help"><span style="font-size: 13.3333px;">VC 5.5 Update 1 c</span></p><p style="min-height: 8pt; padding: 0px;"><p class="help">Thank you</p><p class="help">Chris</p> <p class="reply">I don't think you are actually looking for Specs of personalization, you're seeing residual record that you entered in previously as a form that used the same name of backend.</p> </li> <a name="kGxjaXQZ"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/ubuntu-host-customization-vra7/">Ubuntu host customization vra7</a></p> <p class="help">deploy us a machine model virtual ubuntu we want as our host name to update with automatic generated vm name of vRA.</p><p class="help">Is this only possible with the gugent interface?</p><p class="help"><a href="https://communities.vmware.com/servlet/JiveServlet/showImage/2-2569390-56130/Screen+Shot+2016-01-20+at+15.19.03.png" rel="external nofollow noreferrer"><img alt="Screen Shot 2016-01-20 at 15.19.03.png" class="jive-image image-1" height="167" src="https://communities.vmware.com/servlet/JiveServlet/downloadImage/2-2569390-56130/Screen+Shot+2016-01-20+at+15.19.03.png" style="height: 130px; width: 620px;" width="794"></a></p><p style="min-height: 8pt; padding: 0px;"><p class="help">We tried to use 'software components' category of the designer but vra7 <span style="color: #333333; font-family: 'Lucida Console', 'Courier New', monospace; font-size: 14px;">VirtualMachine.Admin.Name <span style="font-family: arial, helvetica, sans-serif;">don't know not, so we can set the hostname generated through our own script years unknown this var.</span> </span></p><p class="help"><span style="color: #333333; font-size: 14px; font-family: arial, helvetica, sans-serif;">The UseGuestAgent made the rounds, but we want to keep it as simple as possible and to make changes via the part of software components.<br></span></p><p style="min-height: 8pt; padding: 0px;"><p class="help">Kind regards</p><p class="help">James Grinwis</p> <p class="reply">You use a script customization vCenter for the action plan? If you can clone a virtual machine in vCenter using personalization script and change the hostname, you can use this customization script in the action plan to define the IP address and the hostname without the guagent. See <a href="http://www.vmtocloud.com/vravcac-clone-blueprint-magic-secrets-revealed/" rel="external nofollow noreferrer">Clone of vRA/vCAC plan Magic Secrets Revealed!</a> for an example.</p> </li> <a name="DJb8Vk9P"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/deployment-of-linux-specification-of-pre-or-post-customization/">Deployment of Linux - specification of pre or Post customization</a></p> <p class="help">Hello</p><p style="min-height: 8pt; padding: 0px;"><p class="help">We are looking to deploy Linux models in Lab Manager environment, specifically SLES10. We placed in a customization script that works very well, however it seems to work twice, before and after customization. Exactly how can I specify in the script runs only one post?</p><p style="min-height: 8pt; padding: 0px;"><p class="help">Thank you</p> <p class="reply">In addition, if you just paste your script into the "Script customization" section, this code will be executed during the phases before and after.</p> <p class="reply">you need to add is:</p> <p class="reply">1. what suggested Shrenik</p> <p class="reply">2. an "if" statement in the parameter passed to this script.</p> <p class="reply">off @echo</p> <p class="reply">If "% 1" == "precustomization")</p> <p class="reply">tasks precustomization echo</p> <p class="reply">) ElseIf '%1% ' == 'postcustomization')</p> <p class="reply">tasks postcustomization echo</p> <p class="reply">) (other)</p> <p class="reply">unknown command line Echo</p> <p class="reply">)</p> <p class="reply">It is in a batch script format, but you should be able to translate to bash easily.  %1% I think is equal to $1 in bash.</p> <p class="reply">Kind regards</p> <p class="reply">Jonathan</p> <p class="reply">B.SC., RHCT, VMware vExpert 2009</p> <p class="reply">NOTE: If your question or problem has been resolved, please mark this thread as answered and awarded points accordingly.</p> </li> <a name="DJdWzLdZ"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/customization-error-sysprep-is-not-installed-on-the-server-of-virtual-center-for-the-model-you-have-selected/">customization error &quot;Sysprep is not installed on the server of virtual center for the model you have selected&period;</a></p> <p class="help">Hi all</p><p style="min-height: 8pt; padding: 0px;"><p class="help">Need your help with customization of the script here is the steps I've done so far</p><p style="min-height: 8pt; padding: 0px;"><p class="help">1.I have created a virtual machine with Windows XP Professional as the operating system installed VMware Tools / VMware view agent then I added the virtual machine to the domain and created a template called (winXPtemp)</p><p class="help"><span>2. According to article</span> <a class="jive-link-external-small" href="http://www.vmware.com/support/vc/doc/c12prepcustomize.html#1030366" rel="nofollow">http://www.VMware.com/support/VC/doc/c12prepcustomize.html#1030366</a> <span>I downloaded the Q257813_w2k_spl_x86_en.exe and the same extract. I force my VC server find the path as mentioned in article</span></p><p class="help">C:\ [VirtualCenter_installation_directory]\resources\windows\sysprep\1.1 so copied the files extracted to the location C:\Program Files\VMware\Infrastructure\VirtualCenter Server\resources\windows</p><p class="help">3 then I copied and extracted the file \support\tools\deploy.cab on the windows 2003 CD and copied the sysprep files extracted to the following location on the VC Server</p><p class="help">C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp</p><p class="help">4. After you have done that, I've created a script under customization script called "testsript".</p><p class="help">5 Note until now I have not created a pool of resources as requires it the deployment of only 4 VM on an ESX Server with script customization. The data store for the virtual machine is a 100 GB LUN from a 2050 of FAS of NetApp iSCSI</p><p class="help">6. now when I create an automatic pool when I select the script that I created in step 4, and then click then it gives me an error "Sysprep is not installed on the server of virtual center for the model you have selected. Sysprep on the server installation.</p><p style="min-height: 8pt; padding: 0px;"><p class="help">Troubleshooting done by me:</p><p class="help">I have readded the VC Server Manager to view but it force worked</p><p style="min-height: 8pt; padding: 0px;"><p class="help">Thanks in advance for your help</p><p style="min-height: 8pt; padding: 0px;"><p class="help">Kind regards</p><p class="help">v</p> <p class="reply">If I remember correctly the location for XP should go to: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp</p> <p class="reply">For XP SP2 Sysprep files can be downloaded from the Microsoft site and are called</p> <p class="reply"><a href="http://www.microsoft.com/downloads/details.aspx?familyid=3E90DC91-AC56-4665-949B-BEDA3080E0F6&displaylang=e" rel="external nofollow noreferrer">Windows XP SP2 deployment tools</a></p> <p class="reply">The article you linked was VirtualCenter 1.x. Since you have given a version number of VirtualCenter I assumed it was 2.x or later.</p> <p class="reply">----</p> </li> <a name="xPQLe6bG"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/putting-power-and-force-recustomization-powercli/">&apos;Putting power and Force Recustomization&apos; PowerCLI</a></p> <div><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help"><br>Hi guys!</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">I can't find any solution for recustomization VM in vCloud 5.5.</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">The sample script:</p><p style="min-height: 8pt; padding: 0px;"><pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $VM_GL = Get-CIVM -Name VMachine -Org $OrgName -OrgVdc $OrgVdcName -VApp $New_Clone &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $GuestCustomization = $VM_GL.ExtensionData.GetGuestCustomizationSection() &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $GuestCustomization.Enabled = $true &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $GuestCustomization.ResetPasswordRequired = $false &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $GuestCustomization.AdminAutoLogonEnabled = $false &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $GuestCustomization.AdminAutoLogonCount = 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $GuestCustomization.CustomizationScript = $CustomizationScript_GL &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $GuestCustomization.UpdateServerData() &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $VM_GL.ExtensionData.NeedsCustomization = $true &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $VM_GL.ExtensionData.UpdateServerData() &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start-CIVM -VM $VM_GL -Confirm:$false </pre><p style="min-height: 8pt; padding: 0px;"><p class="help"><br>In this way the only network parameters and the host name has changed, but script customization is not ongoing. If I do not start the machine in PowerShell and run in the hollow of the Web interface "power on and Force Recustomization" script is running and make changes.</p></div> <p class="reply">I find this way of forcing recustomization VM:</p> <p class="reply">$vm. ExtensionData.Deploy (1,1,0)</p> <p class="reply">Where to deploy is a method with the following parameters:</p> <p class="reply">C:\ &gt; $vm. ExtensionData.Deploy.Value</p> <p class="reply">OverloadDefinitions</p> <p class="reply">-------------------</p> <p class="reply">undeploy (System.Nullable [bool] powerOn, System.Nullable [bool] forceCustomization, System.Nullable [int] deploymentLeaseSeconds)</p> </li> <a name="LJA7zyRP"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/group-of-office-after-generation-serial-ports/">Group of office after generation serial ports</a></p> <p class="help">Wondering if anyone has a solution to automatically add a desktop computer to the port group once it has been created?</p><p style="min-height: 8pt; padding: 0px;"><p class="help">I don't know if the main image is connected to a port group then each clone (bound or full) is added to the Group of port of the master image but I want to keep a main image and make sure it is added to a group of port based on a parameter or action completed by the administrator. I can this script using PowerCLI and Get / Set - VirtualPortGroup but I was wondering if there was a way I could do a script customization or via a first run script.</p><p style="min-height: 8pt; padding: 0px;"><p class="help">You have an idea of what to do, but can not quite make. Any advice or suggestions welcome.</p> <p class="reply">5.2 view and above you can use network labels to specify groups of ports for pools.</p> <p class="reply"><a href="http://pubs.vmware.com/view-52/index.jsp?topic=%2Fcom.vmware.view.administration.doc%2FGUID-CD25AE55-7636-4493-B56F-B144780F6822.html" rel="external nofollow noreferrer">VMware View 5.2 Documentation Library</a></p> <p class="reply"><a href="http://kb.vmware.com/kb/2042809" rel="external nofollow noreferrer">VMware KB: Assigning multiple network labels to a Pool of offices: Troubleshooting and frequently asked Questions</a></p> </li> <a name="7JzNxrqJ"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/single-image-dozens-of-vlan/">Single image&comma; dozens of VLAN</a></p> <p class="help">I've been retooling a customers view Horizon 5.2 screw for the last few months.  The basics are this: a VDI cluster in a datacenter location and relatively low extended latency LANs to branch offices.  Fortunately for speeds not my concern, but they have many branch offices connected via VLAN extended from the data center.  Those who set them up initially thought that the creation of a different master for each VIRTUAL LAN snapshot was the way to go when it comes to re - composing dozens of pools.  Needless to say, he denies a little ease of maintaining a single image when you have multiple snapshots to be taken with the right network vlan assigned to them.</p><p style="min-height: 8pt; padding: 0px;"><p class="help">I already have the PowerCli assign run based on the location of the VMS specific prefix variables and set the network from that location.  Perfect - for me anyway.  I will not distribute this return to a VMware expert, so I'll try to automate as much as I can.  I'm not convinced that using QuickPrep as opposed to SysPrep is the answer - that would allow me to run a PS script to machines, and sysprep capability to "run once" does not work because, well, it is not installed VM Cli power on virtual methods.</p><p style="min-height: 8pt; padding: 0px;"><p class="help">I realize that once the pools are re-deployed correctly, there should be very little reason in fact, re - dial pools using Sysprep - the client must simply be refreshing that all my VMs properties will keep the same, just update the operating system.  But in the interest of making more work for me, can anyone suggest a way to call a PS script to run using a custom script customization specifications Manager I can link to the pools in the console of administration of the view?</p><p style="min-height: 8pt; padding: 0px;"><p class="help">If there isn't a solid medium to do, I think I might just leave a bunch of scripts PS on the desk of the vCenter server that can be run against any location / vlan must have networks adjusted to.  If I put my GM to do all join them on the management network AD when a recomposition is made and then everything just leave instructions to manually call the appropriate location script on the server vCenter to set PS the VLAN after the linked clones are completely, it will work too - but I'd do not have to worry about this and that he posts to clone / customization so it can be set and forgotten.</p><p style="min-height: 8pt; padding: 0px;"><p class="help">If it was my job full time to maintain this, I was running the PS required - if necessary, but is not and I want to make things too simple for my customer deploy new sites or redial a pool without worrying of what vlan they end up on.</p><p style="min-height: 8pt; padding: 0px;"><p class="help">That's what I have right now:</p><p style="min-height: 8pt; padding: 0px;"><p class="help">#This script is intended for users of VMWare View Horizon and requires the VIToolkit for Windows</p><p class="help">#When that run the script, you will be asked to authenticate</p><p class="help"><span style="font-size: 10pt; line-height: 1.5em;">#$VCServer should be the server you want the VIToolkit to connect to in order to get information about the users of virtual machine</span></p><p class="help">$VCServer = "vcenterFQDN".</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">#Check for the VMware.VimAutomation.Core snap-in and add the load if necessary</p><p class="help">$snapins = get-PSSnapin. where {$_.} {Name - match "VMware *"} | Select name</p><p class="help">If ($snapins.name - notcontains "VMware.VimAutomation.Core") {Add-PSSnapin VMware.VimAutomation.Core}</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">#collect the credentals necessary to connect to the servers of VDI</p><p class="help">$cred = get-Credential</p><p class="help">$pw = $cred. GetNetworkCredential()</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">#connect on the VI server with the supplied credentials</p><p class="help">SE connect-VIServer-Server $VCServer - Credential $cred - https protocol</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help"># Links a virtual machine virtual network adapter to the network VLAN - for example:<p class="help"><p class="help"># $vlan = get-VirtualSwitch-distributed - Name "dvSwitch-name | Get-VirtualPortGroup-name ' name of vlan or portgroup.</p><p class="help">#</p><p class="help"># The location of VDI-based filter prefix</p><p class="help"># Uncomment the variable $Location to spin by location prefix</p><p class="help"># Uncomment the variable $vlan to apply the VLAN to the correct location variable of VM.</p><p class="help"># Follow the simple formatting to add locations premanente and VLAN as required.</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">################################################################################<p class="help"><p class="help">##########                                                           ###########</p><p class="help"># BE CAREFUL WHEN YOU USE GLOBAL VARIABLES #.</p><p class="help"># VMPowerCli will move all the network locations of the #.</p><p class="help"># variable location regardless of the VM State &amp; session #.</p><p class="help">##########                                                           ###########</p><p class="help">################################################################################</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">#$location = "LOC1."</p><p class="help">#$vlan = "VLAN1000 - location1.</p><p class="help">#$location = "LOC2."</p><p class="help">#$vlan = "VLAN1001 - of guests place.2.</p><p class="help">#$location = "LOC3."</p><p class="help">#$vlan = "VLAN1026 - location3.</p><p class="help">#$location = "LOC4."</p><p class="help">#$vlan = "VLAN1027 - location4.</p><p class="help">#$location = "LOC5."</p><p class="help">#$vlan = "VLAN1024 - location5 '.</p><p class="help">$location = "TEST1."</p><p class="help">$vlan = "VLAN1000 - location1.</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">Get - VM $location | Get-NetworkAdapter | Together-NetworkAdapter - NetworkName $vlan</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">Variables can be adjusted from a single script, or I do a lot of copies and hardcode for "simplicity factor."</p><p style="min-height: 8pt; padding: 0px;"><p class="help">Suggestions or other ways to approach this would be welcome.</p><p style="min-height: 8pt; padding: 0px;"><p class="help">See you soon,.</p><p class="help">A</p> <p class="reply">The new version of view Horizon allows you now value VLAN at the pool level.  This new feature can simplify your task even more and reduce the need for a script. You can check this link for a write up on top of the function,<a href="http://myvirtualcloud.net/?p=4730" rel="external nofollow noreferrer">http://myvirtualcloud.net/?p=4730</a></p> </li> <a name="dZwdwR1J"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/av-management-install-on-desktop-view/">AV management install on desktop view</a></p> <p class="help">Hello</p><p style="min-height: 8pt; padding: 0px;"><p class="help">Please could someone explain to me the best approach to install and manage within a virtual desktop antivirus software in an environment that has a central control server BC</p><p class="help">Obviously when you create your image/basic model you must install av software and that could be registered with the central server av - when desktop computers are created dynamically scripts can be run to install the agent.</p><p class="help">What I don't understand, is how this is handled in a linked clone or an office non-persistent when the office is done with it is discounted at a base image which means no av software once more. Also, the central control server av will be be littered with obsolete computer objects...</p><p style="min-height: 8pt; padding: 0px;"><p class="help">Thank you</p> <p class="reply">I would say it depends on what AV software you use, they have different ways of recording machines.</p> <p class="reply">Some of my clients have solved this problem with a post script customization which records machine and get the latest signatures.</p> <p class="reply">Best regards</p> <p class="reply">Linjo</p> <p class="reply">If you find this information useful, please give points to "correct" or "useful".</p> </li> <a name="6Zop6RaJ"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/how-to-deploy-a-vm-from-a-model-of-orchestrator/">How to deploy a VM from a model of Orchestrator</a></p> <p style="min-height: 8pt; padding: 0px;"><p class="help">Hey,.</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">How to deploy a VM from a model using a technique of customization or launch a script customization on a Linux host via Orchestrator?  The JavaScript function not seem obvious to do this so a little code examples would be nice. Also, if I try to do using a PlugIn what are my rights of authentication?  The same as the logged-on user?</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">Kind regards</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">~ Patrick</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"><p class="help">Don't forget if the answers help you, award points</p><p style="min-height: 8pt; padding: 0px;"><p style="min-height: 8pt; padding: 0px;"> <p class="reply">To delpoy a virtual machine from a template use the Clone VM workflows. You can use a workflow clone with or without customization. Orchestrator, computers point of view virtual and models are pretty the same objects</p> </li> <a name="NJal2WDZ"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/integration-of-vcac-of-existing-scripts-of-vcenter-in-manager-of-customization-in-the-vcenter-client-specifications/">Integration of VCAC of existing scripts of VCENTER in &quot;Manager of customization in the VCENTER client specifications&period;</a></p> <p class="help">I have existing templates that I use to create plans, now I have not found the client is wanting to use the custom scripts that exist in the VCenter-&gt; Home-&gt; "customization specifications Manager.</p><p style="min-height: 8pt; padding: 0px;"><p class="help">How can I incorporate these scripts in the VCAC action plan?</p> <p class="reply">' Copy the name of the specification of the personalization of vCenter and paste in ' Cutomization Spec ' on the tab 'Build '.</p> </li> <a name="zPDodDLG"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/can-someone-provide-me-with-a-script-powercli-to-clone-a-vm-under-tension-of-mass-and-customize-them/">Can someone provide me with a script powercli to clone a vm under tension of mass and customize them&period;</a></p> <p class="help">Can someone provide me with a Powercli script to clone a vm under tension of mass and customize them.</p> <p class="reply">And where is the script will fetch this information?</p> </li> <a name="lJ5yjXMJ"></a> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/powercli-script-for-the-deployment-of-virtual-machines-via-the-model-using-customizations-comments/">PowerCLI script for the deployment of virtual machines via the model using customizations comments</a></p> <p class="help">Hello... I hope someone can give me a script that will do the following:</p><p style="min-height: 8pt; padding: 0px;"><p class="help">(1) provision VMs in vCenter template (I need 125 + VMs created in the next day or two)</p><p class="help">(2) use the existing customizations of comments in vCenter</p><p class="help">(3) let me enter data warehouses available to be created on the virtual machines.  Example: I want that VMs on warehouses of specific data as LUN2, LUN5, LUN6, LUN12, LUN1, etc...  However, the script must have the ability to know when a data store is near the threshold of capacity, say 90%, so it can use one of the other warehouses available, identified in the script... similar to storage profiles.  We still have to adopt profiles storage but plan to do so once upgraded us to v5.1 in the next month or two.  We hope that this will help us keep our replicated LUN more organized during the use of SRM and copy to remote groups, our team of storage's configuration on 3PAR.</p><p class="help"><br>Additional information: I will use 2 styles... Windows XP and Win7.  Their respective sizes are 40 and 60 GB due to all applications for stable DR.  Data warehouses are ea 500 GB.</p><p style="min-height: 8pt; padding: 0px;"><p class="help">Please let me know if additional information is necessary... Thank you!!!</p><p style="min-height: 8pt; padding: 0px;"><p class="help">Charles</p> <p class="reply">No, unfortunately you cannot specify a folder like this.</p> <p class="reply">You'll have to do a</p> <blockquote><p class="reply">$folder = get-file-name WinXP</p> <p class="reply">New-VM-$folder file...</p></blockquote> <p class="reply">Remove the line of New - VM WhatIf switch if you really want to start creating virtual machines.</p> </li> </ul> </div> </div> <div class="similar_msg"> <h3>Maybe you are looking for</h3> <ul> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/when-i-touch-my-satellite-p300d-support-component-turns/">When I touch my Satellite P300D support component turns</a></p> <p class="help">Hello I got my Satellite P300D for awhile now however when I try to clean up when its been turned off and I have spend my sheet over the media group above keyboard turns itself on which is annoying when you're trying to clean it up.No one knows how t</p> </li> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/what-is-the-dell-to-the-top-and-cost-recovery/">What is the Dell to the top and cost recovery&quest;</a></p> <p class="help">I have a laptop Dell Inspiron 17R that hard drive broke down and I am replacing a new one from dell. This computer is less than 2 years old, how can I get the USB flash drive to reinstall the software on the computer of the factory. The computer will</p> </li> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/blackberry-java-plug-in-for-eclipse-v1-3-windows-download/">BlackBerry Java plug-in for Eclipse v1&period;3 &lpar;Windows&rpar; download</a></p> <p class="help"></p> </li> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/customization-of-the-portal-helps-asa/">Customization of the Portal helps ASA</a></p> <p class="help">I am trying to modify the help file for the web application, but it doesn't show any changes, I went the customization assistance under the portal, imported html file and save the config. But always in the browser, is to show the old help content of </p> </li> <li> <p class="similar_list"><a href="https://www.eehelp.com/question/hello-the-tutorial-of-stock-said-you-can-change-the-watermark-preview-photo/">Hello&excl; The tutorial of Stock said&colon; you can change the watermark Preview photo&period;&period;&period;</a></p> <p class="help">... and then after having bought the pic you do not have to edit the photo again. Is this true? Someone at - it Expreience with whom?Thanks in advanceAlex</p> </li> </ul> </div> <div class="clear"></div> </div> <!-- <div class="rightmain"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> eehelp_c <ins class="adsbygoogle" style="display:inline-block;width:300px;height:600px" data-ad-client="ca-pub-3059180850985380" data-ad-slot="1404688152"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> --> <div class="clear"></div> </div> </div> </div> <div id="sidebar"> <div class="bloque suspension"> <div class="topicbul fbold margb4"> Similar Questions </div> <ul> <li class="topic_li"> <a href="#NJj47ERP">script customization</a> </li> <li class="topic_li"> <a href="#dZw6QDmP">Guest OS script customization help&period;</a> </li> <li class="topic_li"> <a href="#MZ8r7bXG">Cannot change the entry door of the Linux guest OS by the perl script customization</a> </li> <li class="topic_li"> <a href="#zPmKoWAJ">Specifications of the customization - only some seen in vRA 6&period;2&period;0</a> </li> <li class="topic_li"> <a href="#kGxjaXQZ">Ubuntu host customization vra7</a> </li> <li class="topic_li"> <a href="#DJb8Vk9P">Deployment of Linux - specification of pre or Post customization</a> </li> <li class="topic_li"> <a href="#DJdWzLdZ">customization error &quot;Sysprep is not installed on the server of virtual center for the model you have selected&period;</a> </li> <li class="topic_li"> <a href="#xPQLe6bG">&apos;Putting power and Force Recustomization&apos; PowerCLI</a> </li> <li class="topic_li"> <a href="#LJA7zyRP">Group of office after generation serial ports</a> </li> <li class="topic_li"> <a href="#7JzNxrqJ">Single image&comma; dozens of VLAN</a> </li> <li class="topic_li"> <a href="#dZwdwR1J">AV management install on desktop view</a> </li> <li class="topic_li"> <a href="#6Zop6RaJ">How to deploy a VM from a model of Orchestrator</a> </li> <li class="topic_li"> <a href="#NJal2WDZ">Integration of VCAC of existing scripts of VCENTER in &quot;Manager of customization in the VCENTER client specifications&period;</a> </li> <li class="topic_li"> <a href="#zPDodDLG">Can someone provide me with a script powercli to clone a vm under tension of mass and customize them&period;</a> </li> <li class="topic_li"> <a href="#lJ5yjXMJ">PowerCLI script for the deployment of virtual machines via the model using customizations comments</a> </li> </ul> </div> </div> </div> <script type="text/javascript"> function view_thread(code) { var url = '/help/'+code+'/'; window.open(url); } </script> <div class="clear"></div> <div id="footer"> <div class="leftside"> &copy; 2024 eehelp.com. All Rights Reserved. 10 q. 0.019 s. <a href="/about/contact/" rel="nofollow">Contact Us</a> - <a href="/about/tos/" rel="nofollow">Terms &amp; Conditions</a> - <a href="/about/privacy/" rel="nofollow">Privacy Policy</a> </div> </div> </div> <!-- Start of StatCounter Code for Default Guide --> <script type="text/javascript"> var sc_project=11251980; var sc_invisible=1; var sc_security="676835c8"; var scJsHost = (("https:" == document.location.protocol) ? "https://secure." : "http://www."); document.write("<sc"+"ript type='text/javascript' src='" + scJsHost+ "statcounter.com/counter/counter.js'></"+"script>"); </script> <noscript><div class="statcounter"><a title="web analytics" href="http://statcounter.com/" target="_blank"><img class="statcounter" src="//c.statcounter.com/11251980/0/676835c8/1/" alt="web analytics"></a></div></noscript> <!-- End of StatCounter Code for Default Guide --> </body> </html>