Red Hat SATELLITE 5.3.0 RELEASE NOTES Información técnica Pagina 143

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 199
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 142
3. Shut down the VM
4. In the RHEV-M Virtual Machines tab, select the VM that was just shut down and click
the Make Template button specifying a Name.
5. Create several VMs from the template using the add-vms.ps1 script
# add-vms
# tempName - source template (can not be Blank)
# baseName - base name of created guest (default: guest)
# num - number to create (default: 1)
# run -start VMs (default: no)
Param($baseName = 'guest', $tempName, $num = 1, [switch]$run)
if ($tempName -eq $null) {
write-host "Must specify a template!"
exit
}
$my_clusId = -1;
$my_temp = select-template -SearchText $tempName
if ($my_temp -eq $null)
{
Write-host "No matching templates found!"
exit
} elseif ($my_temp.count -gt 1) {
Write-host "Too many matching templates found!"
exit
} elseif ($my_temp.name -eq "Blank") {
Write-host "Can not use Blank template!"
exit
}
#search for matching basenames
$matches = select-vm -searchtext "$baseName" | where {$_.name -like "$baseName*"}
if ($matches -ne $null) {
$measure = $matches | select-object name | foreach { $_.name.Replace("$baseName","") } |
measure-object -max
$start = $measure.maximum + 1
$x = $matches | select-object -first 1
$my_clusId = $x.HostClusterId
} else {
$start = 1
}
$id = $my_temp.HostClusterId
$clus = select-cluster | where { $_.ClusterID -eq $id }
if ($clus -ne $null) {
143 www.redhat.com
Vista de pagina 142
1 2 ... 138 139 140 141 142 143 144 145 146 147 148 ... 198 199

Comentarios a estos manuales

Sin comentarios