Skip to main content

Install-LXCAOSImage

This cmdlet deploys an operating-system image to one or more target devices.

Note
You cannot pipe objects to this cmdlet.

Syntax

Install-LXCAOSImage [-Connection Connection] 
-DeployTask DeployTask[]
[-AsJob]
[CommonParameter]

Parameters

-Connection LXCAConnection
Specifies the connection to the Lenovo XClarity Administrator server. If no connection is specified, the result from the last Connect-LXCA cmdlet is used.
-DeployTask DeployTask[]
Specifies one or more deployment tasks. The list is created from theNew-LXCADeployTask cmdlet.
-AsJob
When specified, the cmdlet runs as background job and returns a Job object immediately.
CommonParameters
This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.

Results

If the -AsJob parameter is specified, this cmdlet returns a Job object. The DeployResult objects can be retrieved from Job.Output.

If you do not specify the -AsJob parameter, this cmdlet returns one or more DeployResult objects.

Examples

  • The following example installs VMware ESXi 5.5 on a target component in synchronous mode.

    $cred = Get-Credential
    Connect-LXCA -Host 192.0.2.0 -Credential $cred

    $nodes = Get-LXCADeployableServer
    $images = Get-LXCAOSImage | where {$_.Name -like "*esxi5.5*"}
    $deployTask = New-LXCADeployTask -ServerUuid $nodes[0].Uuid -ImageProfileID $images[0].Profiles[0].Id`
    -TargetDevice "SanDisk" -SanId "WWN123445" -IpAddress 9.5.12.122`
    -MacAddress $nodes[0].HostMacAddresses[0] -SubnetMask 255.255.255.0`
    -GateWay 9.5.12.1 -DNS1 9.10.244.100 -DNS2 9.10.244.200 -Mtu 1500
    Install-LXCAOSImage -DeployTask $deployTask

    Disconnect-LXCA
  • The following example deploys multiple operating-system images to multiple target component as a job that runs in the background.

    $cred = Get-Credential
    Connect-LXCA -Host 192.0.2.0 -Credential $cred

    $nodes = Get-LXCADeployableServer
    $esxi5 = Get-LXCAOSImage | where { $_.Name -like "*esxi5.5*" }
    $rhel6 = Get-LXCAOSImage | where { $_.Name -like "*RHEL6*" }

    #create deployment node list
    $deployList = @()
    $deployTask = New-LXCADeployTask -ServerUuid $nodes[0].Uuid -ImageProfileID $esxi5.Profiles[0].Id`
    -TargetDevice "SanDisk" -SanId "WWN123445" -IpAddress 9.5.12.122`
    -MacAddress $nodes[0].MacAddresses[0] -SubnetMask 255.255.255.0`
    -GateWay 9.5.12.1 -DNS1 9.10.244.100 -DNS2 9.10.244.200 -Mtu 1500
    $deployList.Add($deployTask);
    $deployTask = New-LXCADeployTask -ServerUuid $nodes[1].Uuid -ImageProfileID $rhel6.Profiles[0].Id`
    -TargetDevice "LocalDisk" -MacAddress $nodes[1].MacAddresses[0]`
    -IpAddress 9.5.12.123 -SubnetMask 255.255.255.0 -GateWay 9.5.12.1`
    -DNS1 9.10.244.100 -DNS2 9.10.244.200 -Mtu 1500
    $deployList.Add($deployTask);

    #deploy the node
    $job = Install-LXCAOSImage -DeployTask $deployList -AsJob
    while ($job.State eq "Running")
    {
    Start-Sleep -Seconds 5
    }
    $job.Output

    Disconnect-LXCA