LDoms Community CookbookContentsIn this Section ... |
Section OverviewThis section contains scripts applicable to LDoms and orthogonal technologies. In some cases the scripts may not be located here and links are simply provided for convenience. For those posting scripts, please ensure you include a full description and any caveats and pre-requisites (LDoms/Platform/Solaris versions etc.) Administration ScriptsControl and guest domain setup automaticallyDescriptionThis script is kind of "Hello World" for LDOMs. It should serve as a starting point for someone who has a blank system and who does not want to study any docs to get LDOMs up and running. The script has been tested on a T2000, a T5220, and a T5440 and LDOMs 1.0.3 and 1.1 (and it worked It does this, after system has been booted in "factory-default"
Now one has two guests accessible via telnet 0 5000, the ls-spconfig now has two configs:
I use it as starting point for all experiments with LDOMs AuthorMartin Müller, German Systems Practice and DC Ambassador, PrerequisitesLDOMs 1.0.3, LDOMs 1.1 (tested on build 12), tested on T2000, T5220, T5440. No idea why it should not work on all other sun4v systems Usage:
Download simple-dominator.sh hereLDoms Scripts for DemosI have written some scripts as aids in demonstrating LDoms. They are based on using ZFS file systems for each guest domain and a file within the ZFS file system as the boot disk. ldomcreatecontroldomain.shThis script is used to configure the control domain after LDoms has been installed. It determines how much memory (using prtconf(1M)) and how many CPUs (using mpstat(1)) the machine has and then prompts for how much memory and how many virtual CPUs to allocate to the control domain. Next, a virtual switch is configured for each of the on-board physical network interfaces. After executing all the necessary ldm(1M) commands, the configuration is saved to persist across power cycles. Finally, instructions are printed to standard out instructing the user to reboot the system to instantiate the new configuration. ldomcreateguestdomain.kshThis script is for creating a guest domain. It first looks for any configured ZFS pools and figures out if any disks are available (using format(1M)) for creating a ZFS pool to create a ZFS file system for the new guest domain. The script then collects the following information from the user:
It then creates the guest domain, saves the configuration for persistence across power cycles, prints to standard out instructions for accessing the console and the MAC address for JumpStart purposes. ldomcloneguestdomain.kshThis script is for cloning a guest domain. It is very similar to "ldomcreateguestdomain.ksh" except that it takes a ZFS snapshot of an existing guest domain and uses ZFS cloning to create an identical boot disk. This makes for very speedy guest domain provisioning. ldomdestroy.shThis script is for destroying guest domains. It displays a list logical domains and prompts the user for the name of the domain to destroy. The user is also prompted whether or not to destroy the boot device for the domain being destroyed. ldomdisable.shThis script is used to disable ldoms and return the physical machine back to the factory default configuration. It comes in handy when you need to repeat an LDoms demonstration. AuthorJoe Cicardo PrerequisitesTested with LDoms version 1.1 on a T5240. All of the scripts in a tar bundle can be downloaded fromOther ScriptsExample ScriptExample Script DescriptionThis is an example script to show the layout for posting scripts. You would put a functional overview and usage information here. AuthorWho to contact for feedback on the script PrerequisitesWorks with LDoms version <version>, and all platforms etc. Download "Example Script" here << link to script |
