Virtual resources and PowerVM
The work that you have done so far already provides a functional way to model PowerVM deployments. In this section, you will go a step further and implement some of the behavior present in the VMware scenario, namely virtual disks and NICs that represent the virtual devices configured in the HMC to be used by the operating system in the LPAR.
There are two important points that you need to take into consideration:
- Using generic units as a starting point for new units is extremely flexible, quick, and easy to manage, but there is only so much that can be done. In particular, you can use only existing capabilities. (Rational Software Architect offers ways to create new units and domains, but that it beyond the scope of this tutorial.) You could use this approach, for example, to add a Virtualization.PowerVMHypervisor capability that would be more tailored to your needs. For more information, see the developerWorks article Extending the topology editor with custom technology domains referenced in the Resources
- One of the best points of Rational Software Architect is the support for model-driven development. This means that in many cases there is built-in support for turning diagrams into real configurations that can be deployed, much in the same way that it creates Java header files from UML diagrams. Our customizations are merely aimed at providing a coherent model and do not support advanced functionality, such as automatic creation of HMC configuration files that would configure a server according to our model.
You will use the same general approach as in the previous section: take a generic conceptual unit and customize it to your needs. You will need to use these two definitions:
- The conceptual Virtual Disk definition
- The conceptual Virtual Ethernet NIC definition
- Using the same topology as the previous section, add a conceptual Virtual Disk Definition to the diagram, and deselect the Conceptual check mark, as before. The result is a generic virtual disk that can be hosted in a virtual image.
- Now, add a stereotype named PowerVM Virtual Disk Def to the unit.
As it is right now, this PowerVM virtual disk would happily allow a hosting relationship with, for example, a VMware virtual image. You want to limit to the unit to a specific kind of virtual image so that this newly created PowerVM Virtual Disk Definition will be hosted only by your custom-made PowerVM LPAR.
As mentioned previously, Rational Software Architect offers ways to add entire new capabilities and domains. For the purposes of this tutorial, though, a simpler approach is sufficient, and one possibility is using stereotypes.
- Select the Virtual Disk Definition that you just customized, and go to the Requirements tab.
- Select the HostingReq requirement, and go to the Constraints tab.
- To add the constraint, click the green plus sign in the constraints editor, and select Stereotype from the pop-up window.
- In the dialog window that appears, type
PowerVM LPARin both the Caption and Includes fields.
- Click Close when you are finished.
Figure 41 shows the constraint added.
Figure 41. Adding hosting constraints to the virtual disk
- Now, try to host you virtual disk in the PowerVM LPAR.
You'll find that the hosting link displays an error (see Figure 42). The warning tells you that the constraint failed because the PowerVM LPAR Virtual Server definition doesn't have the appropriate stereotype.
Figure 42. Virtual disk hosting error
The reason that this happened is because the constraint that you specified was not made in relation to the stereotype of the hosting unit but, instead, to the stereotype of a specific capability present in the hosting unit, namely virtualization.VirtualServerDef.
- Using the action proposed by the error resolution dialog, add the stereotype to the Virtual Server Definition capability in the PowerVM LPAR unit. (See Figure 43.)
Figure 43. Adding a stereotype to satisfy hosting requirements
- Repeat the process with a conceptual Virtual Ethernet NIC Definition.
The result, shown in Figure 44, will be quite similar to the VMware topology.
Figure 44. Final topology with virtual devices
With the addition of virtual devices, the PowerVM virtualization possibilities that you have built during the course of this tutorial are already complete. The next section adds a final touch that could be useful.