I am currently deploying 64 Citrix XenApp servers with Altiris. The deployment consists of an OS Image, OS Configuration and finally Citrix XenApp and Applications.

In the OS Configuration part the IP configuration needs to be applied and I decided to do this with a database.

The database consists of 2 tables; one table with the per host settings and one table with the global settings (such as DNS).

In the Altiris job both tables are read from an embedded VBScript and assigned to the NIC.

Database configuration

I created a database (SQL Server) called IPManagement with 2 tables:

image

 

The globalconfig table has a name and a data field:

image

And contains only the DNS settings:

image

The hostconfig table has fields for hostname, ip address, netmask and default gateway:

image

Some sample data:

image

Altiris Configuration

In Altiris I have added the database as a custom data source, this can be done via Tools | Options | Custom Data Sources:

image

image

The Script:

The final step is the VBScript, which use the Custom Token feature to retreive the data from the database:

Note that I had to do a little trick using the Trim statement and a space to get a correct assignment to the variables. Without the space Altiris doesn’t properly recognize the custom token.

The array is necessary beasue the EnableStatic and SetGateways Methods require array parameters even when there’s just a single entry.