Provision - provisionDevice
Provision - provisionDevice
Description :
This command is deprecated. We recommend that you use the ProvisionJob : createProvisionJob command instead.
If you do use this deprecated command, note that it creates hidden system packages, which you can manage by using the following commands:
SystemPackage : deleteAllHiddenSysPacks
SystemPackage : listAllHiddenSysPacks
This command provisions a device that is currently in the imported state. This command creates a job and also runs it immediately. If approval is enabled for the job type use the provisionDeviceWithApproval command instead.
As input, this command takes a systemPackageId that identifies a system package. The system package contains configuration details for the device to be provisioned. If you want to override the configuration details from the system package, you can specify new configuration details in the input properties file identified by propsFileURL. In this case, the new values in the input file are used to provision the device.
The input file URL should be a valid java.net.URL pointing to a text file conforming to the java.util.Properties format.
The input properties file has only two required entries. These define the job folder and job name of the Provisioning Job:
- Job.Provision.JOB_FOLDER_ID=JOB_FOLDER_ID
- Job.Provision.JOB_NAME=JOB_NAME
All other entries are optional. For each optional entry, if you do not specify a value in the input property file, then the value that is present in the system package is the value that is applied to the provisioned device. For Citrix XenServer provisioning specifying AGENTLESS_MANAGED_OBJECT_PROXY_HOST* Property is mandatory. Format to specify this property is Class://SystemObject/Server/(Enrolled Server IP/Name)
Miscellaneous setting guidelines:
- Server.Property.prop_name=value, where prop_name is the name of a server property.
- SystemPackage.LocalProperty.prop_name=value, where prop_name is the name of a property of the given system package.
- Network.network_setting=value, where network_setting is a PXE or JumpStart network setting.
To provision a Citrix XenServer, you must include the following entry:
- Server.Property.AGENTLESS_MANAGED_OBJECT_PROXY_HOST*=[server_name_or_IP]
The following examples show the correct format to use to specify a Citrix XenServer:
- Server.Property.AGENTLESS_MANAGED_OBJECT_PROXY_HOST*=Class://SystemObject/Server/10.20.38.153
- Server.Property.AGENTLESS_MANAGED_OBJECT_PROXY_HOST*=Class://SystemObject/Server/myServer
Provide the ID of the boot image you want to use to provision the device. To get the boot image ID, use the Provision : listAllBootImages command.
- Device.BootImage=[valid boot image ID]
For NIM device provisioning, you can optional specify the following entry:
- Job.Provision.PerformCleanUp=true
The following network settings are for NIM devices.
- Network.UseNetworkObject =[true or false]
- Network.NetworkObjectName=network_object_name
- Network.Type=[ent, tok, fddi, generic or property reference]
- Network.SubNetMask=[valid subnet mask ipv4 format]
- Network.Name=network_name
- Network.ClientGateway=[valid v4 ipv4 address or property reference]
- Network.MasterGateway=[valid v4 ipv4 address or property reference]
- Network.NetworkAdapterName=network_adapter_name
- Network.DNSIpAddress=[valid v4 ipv4 address or property reference]
- Network.DomainName=domain_name
- Network.ClientIP=[valid v4 ipv4 address or property reference]
If the Network.UseNetworkObject property is set to true, the Network.NetworkObjectName should have a value. If the Network.UseNetworkObject property is set to false,Network.Type, Network.SubNetMask should have a value.
The following network settings are common between PXE and JumpStart devices:
- Network.DHCPEnabled=[true or false]
- Network.IPAddress=[valid v4 ipv4 address]
- Network.SubNetMask=[valid subnet mask ipv4 format]
- Network.DefaultGateway=[valid ipv4 address]
If Network.DHCPEnabled is set to true, settings for Network.IPAddress, Network.SubNetMask and Network.DefaultGateway are ignored.
The (additional) valid Network settings for a PXE device are:
- Network.AutoDNSEnabled=[true or false]
- Network.DNSAddress.Primary=[valid ipv4 address]
- Network.DNSAddress.Secondary
If Network.AutoDNSEnabled is set to true, settings for Network.DNSAddress.Primary and Network.DNSAddress.Secondary are ignored.
The (additional) valid Network settings for a JumpStart device are:
- Network.EnablePrimaryInterface=[true or false]
- Network.UseIPv6=[true or false]
- Network.NameService.Type=[NIS | NIS+ | DNS | LDAP | NONE]
- Network.NameService.DomainName=domain_name
- Network.NetworkIP=[valid v4 ipv4 address]
Network.NetworkIP is compulsory for WAN BOOT. If Network.NameService.Type equals "NIS" or "NIS+", you must specify the following settings: - Network.NameService.NameServerHostName=name_server_host_name
- Network.NameService.NameServerIPAddress=[valid ipv4 address]
If Network.NameService.Type equals "DNS", use the following required and optional settings: - Network.NameService.DomainName= [valid domain name] (required)
- Network.NameService.PrimaryDNSServer=[valid ipv4 address] (required)
- Network.NameService.SecondaryDNSServer=[valid ipv4 address] (optional)
- Network.NameService.TertiaryDNSServer=[valid ipv4 address] (optional)
- Network.NameService.AdditionalDomains=domains, where domains is a comma-separated list of domains (optional)
If Network.NameService.Type equals "LDAP", you can use the following optional settings: - Network.NameService.ProfileName=profile_name (optional)
- Network.NameService.ProfileServerIP=[valid ipv4 address] (optional)
- Network.NameService.ProxyDN=proxy_dn (optional)
- Network.NameService.ProxyPassword=proxy_password (optional)
If Network.NameService.Type equals "NONE", all network settings in the file are ignored.
iDRAC entries:
- IDRACJob.UseLocalDrivers=TRUE/FALSE
If TRUE, the job uses unpack and attach, if FALSE, the job uses drivers from the datastore. Note that unpack and attach operations are not supported for Win2k3 system packages and x64 system packages.
- IDRACJob.BootMediaType=0/1
If 0, the job selects boot from network ISO. If 1, the job selects boot from vflash.
- IDRACJob.OSForDrivers=os_name
For os_name, specify the operating system, using one of the following strings:
- Windows Server(R) 2003 R2 with SP2
- Windows Server(R) 2003, x64 R2 with SP2
- Windows Server(R) 2008
- Windows Server(R) 2008, x64
- Windows Server(R) 2008 R2
- Windows(R) Small Business Server 2008
- Windows(R) Essential Business Server 2008
- Red Hat Enterprise Linux 4.7 32-bit
- Red Hat Linux Enterprise 4.7 64-bit
- Red Hat Enterprise Linux 4.8 32-bit
- Red Hat Linux Enterprise 4.8 64-bit
- Red Hat Enterprise Linux 5.3 32-bit
- Red Hat Enterprise Linux 5.3 64-bit
- RedHat Enterprise Linux 6.0
- SUSE Linux Enterprise Server 10 SP2 64-bit
- SUSE Linux Enterprise Server 11 64-bit
- ESX 3.5
- ESXi 3.5
- ESX 4.0
- ESXi 4.0
- Hyper-V(TM) Server
- Hyper-V(TM) Server R2
- Citrix XenServer(TM) Dell Edition
Sample input properties file that includes only mandatory settings:
Job.Provision.JOB_FOLDER_ID=2000700
Job.Provision.JOB_NAME=TestProvJob
Sample input properties file that includes both the mandatory settings, and settings that override values from the system package:
Job.Provision.JOB_FOLDER_ID=2000700
Job.Provision.JOB_NAME=TestProvJob
SystemPackage.LocalProperty.DATA_STORE=Class://SystemObject/DataStore/Pxe Datastore/DSInstance
SystemPackage.Fields.ComputerName=W2K8RR
SystemPackage.Fields.OMServerName=W2K8RR
Network.DHCPEnabled=false
Network.IPAddress=10.20.25.15
Network.SubNetMask=255.0.0.0
Network.DefaultGateway=10.20.25.1
Network.AutoDNSEnabled=false
Network.DNSAddress.Primary=10.20.21.13
Network.DNSAddress.Secondary=10.20.21.13
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
---|---|---|
systemPackageId | Integer | Integer ID of the system package. |
macAddress | String | MAC address of the device to be provisioned. Format the MAC address as a '-' separated hex string, for example 00-0B-CD-1B-E0-44. Alphabetic characters in the MAC address must be in upper case. As an alternative to the dash character, you can use the colon or space key as the delimiter in the MAC address. |
aclTemplateId | Integer | ACL template to apply to the server that will be added to BMC BladeLogic, once it is provisioned. If you want to use default ACLs, set this variable to 0. |
propsFileURL | String | URL to the input file containing device properties. |
Example
The following example shows how to provision a device that has the MAC address 11-AA-22-BB-33-CC using a system package with ID 2000000. This example uses an ACL template with ID 1. The file propfile.txt, residing on the root directory of the local machine, is the input file for the device properties.
Script
Provision provisionDevice 2000000 11-AA-22-BB-33-CC 1 file:///c:/propfile.txt