guestinfo.pl - Lists and customizes the attributes of guest OS on a Virtual Machine.
guestinfo.pl --operation <display|customize> [options]
This command provides an interface for displaying and customizating the attributes of guest OS on Virtual Machine. For customization of the guest, the ``System Preparation Tool (Sysprep) Version 1.1'' must be installed on the virtual center server. This tool enables VMWare to prepare Windows System Images as part of an automated deployment.
Required. Operation to be performed. Must be one of the following: display (displays the attributes of guest) customize (reads the customization specification from an xml file and customizes those attributes).
Optional. The name of the virtual machine. It will be used to select the virtual machine. For display operation the virtual machine must be powered on and the user must be logged in.
Required. The name of the virtual machine. It will be used to select the virtual machine. For customize operation the virtual machine must be powered off.
Required. The name of the input xml file. This file specifies the properties to be modified and the new values to be set.
Required. The name of the schema file for validation.
The parameters for customizing the guest OS are specified in an XML file. The structure of the input XML file is:
<Specification> <Customization-Spec> <!--Several parameters like Auto-Logon, Virtual-Machine-Name etc--> </Customization-Spec> </Specification>
Following are the input parameters:
Required. Flag to specify whether auto logon should be enabled or disabled.
Required. Name of the virtual machine to be created.
Required. Time zone property of guest os.
Required. The domain that the virtual machine should join.
Required. The domain user account used for authentication.
Required. The password for the domain user account used for authentication.
Required. User's full name.
Required. User's organization.
Displays the attributes of guest OS on virtual machines with name ``VirtualABC'':
guestinfo.pl --url https://<ipaddress>:<port>/sdk/webService --username administrator --password mypassword --vmname VirtualABC --operation display
Customize the attributes of guest, customizing the attributes as specified in the xml specification file.
guestinfo.pl --url https://<ipaddress>:<port>/sdk/webService --username administrator --password mypassword --vmname VirtualABC --operation customize --filename guestinfo.xml --schema guestinfo.xsd
Sample specification xml file
<?xml version="1.0"?> <Specification> <Customization-Spec> <Auto-Logon>1</Auto-Logon> <Virtual-Machine-Name>VM10</Virtual-Machine-Name> <Timezone>033</Timezone> <Domain>DomainName</Domain> <Domain-User-Name>Username</Domain-User-Name> <Domain-User-Password>password</Domain-User-Password> <Full-Name>admin</Full-Name> <Orgnization-Name>InterraIT</Orgnization-Name> </Customization-Spec> </Specification>
Sample Output: Guest Info for the VM VM1
VM1 guestFamily: windowsGuest VM1 guestFullName: Microsoft Windows XP Professional VM1 guestId: winXPProGuest VM1 guestState: running VM1 hostName: VM9.companame.info VM1 ipAddress: 111.111.111.111 VM1 toolsStatus: VMware Tools is not running VM1 toolsVersion: 32039 VM1 guest - Screen: Not Known VM1 Disk[0]: Capacity 7501422592 VM1 Disk[0]: Path : C:\ VM1 Disk[0]: freespace : 5289558016 VM1 net[0] - connected : 1 VM1 net[0] - deviceConfigId : 4000 VM1 net[0] - macAddress : 00:0c:29:fa:ba:52 VM1 net[0] - network : VM Network VM1 net[0] - ipAddress : 111.111.111.111