
if ($clus.IsInitialized -eq $true) {
$my_clusId = $id
} else {
write-host "Cluster of Template is not initialized!"
exit
}
}
#loop over adds async
for ($i=$start; $i -lt $start + $num; $i++) {
# write-host "-name $baseName$i -templateobject $my_temp -HostClusterId $my_clusId
-copytemplate -Vmtype server"
if ( $run -eq $true ) {
$my_vm = add-vm -name $baseName$i -templateobject $my_temp -HostClusterId $my_clusId
-copytemplate -Vmtype server
#Until BZ 617730 and 617725 are addressed, use this work around
$my_vm.DisplayType = 'VNC'
$uv = update-vm -vmobject $my_vm
$sv = start-vm -VmObject $my_vm
} else {
$my_vm = add-vm -name $baseName$i -templateobject $my_temp -HostClusterId $my_clusId
-copytemplate -Vmtype server -Async
#Until BZ 617730 and 617725 are addressed, use this work around
$my_vm.DisplayType = 'VNC'
$my_vm.DisplayType = 'VNC'
$uv = update-vm -vmobject $my_vm
}
}
6. Call the script from a RHEV Manager Scripting Library window
cd \saved
.\add-vms.ps1 -baseName exec -tempName mrgexec_template -num 5
7. Log into the MRG Manager node as 'admin'
8. Create 50 separate submit jobs to search a range up to 1,000,000
cd perfect
./mk_jobs.sh 1000000 50
9. Submit the jobs
./submit_jobs.sh
www.redhat.com 144
Kommentare zu diesen Handbüchern