Edit: Guess what I do not run anymore? The links seem to redirect, but I was able to find the information after a little digging. Your mileage may vary.
Originally posted February 18, 2008 on AIXchange
Managing and organizing an environment with several workload partitions (WPARs) running on many different machines can be difficult. To start and stop WPARs, you must log into each individual global instance. But there’s a better way: Workload Partition Manager.
With Workload Partition Manager, you can much more easily see which WPARs are running on your machines. You can also use this product to relocate your WPARs automatically, by establishing policies, instead of moving them manually. While WPARs are built into AIX 6, Workload Partition Manager is a separately purchased program that you should consider if your shop plans on using WPARs.
WPARs have been covered a lot lately — including here, here and here.
But in this entry I’ll dig deeper, and focus on how to relocate workload partitions from one machine to another. First, I installed the “IBM Workload Partition Manager for AIX” CD on my AIX 6 machine and read the README.wparmgr.txt file. This info is also available here and here.
Following the readme file, I ran these two commands:
installp -acqgYXd wparmgt.mgr
installp -acqgYXd wparmgt.db
Then I ran:
/opt/IBM/WPAR/manager/db/bin/DBInstall.sh -dbinstallerdir /db2 -dbpassword
and received this output:
DBInstall.sh:Database install started.
DBInstall.sh:Database install successful.
DBInstall.sh:Database instance creation started.
DBInstall.sh:Database instance creation successful.
DBInstall.sh:Database creation started.
DBInstall.sh:Database population started.
DBInstall.sh:Database creation successful.
The instructions then called for me to “execute the following command with the X11 DISPLAY variable set.” So I pointed my DISPLAY to my X session and ran:
# /opt/IBM/WPAR/manager/bin/WPMConfig.sh
(Note: You can also use the console version by adding -console to the end of that command.)
The WPMConfig.sh command presents a GUI that’s used to configure Workload Partition Manager. I used all of the default values that it presented to me, except when entering the password.
Then I installed the agent code on my agent machine with:
installp -acqgYXd wparmgt.agent
After that, I ran:
/opt/IBM/WPAR/agent/bin/configure-agent -hostname
(Note: I found one gotcha that revolved around the hostname I used. When I tried host1_aix6, I received this error:
java.net.URISyntaxException: Illegal character in hostname.
The GUI kept displaying “failed registration” in the state column. But when I changed it to host6, the state changed to “online” and it worked fine. Hopefully this tip will help someone out there. You must also be sure that your host names are resolvable in your network.)
I was prompted for the password I’d configured earlier. I received this output:
Agent Registration Password:
Re-enter Agent Registration Password:
0513-059 The wparagent Subsystem has been started. Subsystem PID is 426010
Then I installed the agent on a second machine using the same process.
With that, I could I point my browser to my management machine and login by going to:
http://<localhost>:14080/ibm/console
At this point I could log in with root:password and create and relocate WPARs, change settings, look at error logs, etc.
Then I looked at the documentation and on my NFS server and ran:
crfs -v jfs2 -m /wparsfs -A yes -a size=1G -g datavg
mount /wparsfs
mknfsexp -d /wparsfs/ -r -B
exportfs
(Note: exportfs should show you the directory that you just exported using nfs.)
I went ahead and used the wizard to create a WPAR, following the prompts that were presented to me. They seemed pretty self-explanatory. I made sure to select “enable relocation” when creating my WPAR so that I could test out the relocation of my WPARs from one machine to another. (WPARs can obviously be created from the command line, but I chose the wizard instead to see how it worked. You can also get the ouput that the GUI generates and then save that for later use in scripts, etc.)
By selecting the task activity and then the workload partitions tab, I could toggle back and forth between them in case I needed to do some troubleshooting. The task activity tab provided important warnings and information as I set up my WPARs to be “relocatable.”
Once I got it all working, I was able to create, deploy and relocate WPARs, which was the point of the exercise. I could also change their properties, all from the GUI. I could easily see which WPARs were defined, active, broken and undeployed, and on which machines. I could use the GUI to create and remove them.
Again, all of these things (save for the actual relocation–this is why you need to purchase the software) can be done from the command line, but Workload Partition Manager makes it much easier to keep track of your WPARs. Familiarize yourself with this valuable tool.