Sponsored Content
Operating Systems Solaris VM server (LDOMS) HOWTOs/Examples [Request] Post 302636713 by jlouki01 on Tuesday 8th of May 2012 02:23:21 PM
Old 05-08-2012
I will post a script I used to create bunch of LDOMS on a T3-1 tomorrow.

The way I do it is I created a master system and created a snapshot. I then use zfs send / recv to duplicate the snapshot to another ldom. A few quick LDOM commands and you can have servers up in a few minutes.

---------- Post updated at 02:12 PM ---------- Previous update was at 12:23 AM ----------

First you need to create a snapshot of your master machine. I loaded the Solaris 10 8/11 ( buggy release but it's the lastest ) ISO into a folder on the local machine in /DVD/Solaris10/iso/

First create the zfs dataset that will hold your installation of LDOM1
zfs create logicalpool/ldoms
zfs create logicalpool/ldoms/ldom1
zfs set mountpoint=/ldom1 logipool/ldoms/ldom1

Create the image file that will hold our OS install:
mkfile -n 100g /ldom1/disk0.img ( 100gb may seem big but it leaves you plenty of room to live upgrade in the future for patches. We started out doing 25, then 50 and now the standard is 100gb. )

Note: I also suggest each machine have a physical lun attached. This way in the future you can make use of the ldm migrate feature.

Here is the script I use:

ldm add-domain ldom1
ldm set-vcpu 10 ldom1
ldm set-mau 0 ldom1
ldm set-mem 2g ldom1
ldm add-vnet vnet1 primary-vsw0 ldom1
ldm add-vdsdev /ldoms/ldom1/disk0.img vol200@primary-vds0
ldm add-vdisk vdisk200 vol200@primary-vds0 ohcinpuppettest01

Connect the Solaris 10 iso to the host:

ldm add-vdsdev /DVD/Solaris10/iso/sol10u10.iso s10u10iso@primary-vds0
ldm add-vdisk vdisk_iso s10u10iso@primary-vds0 ldom1

Misc final steps:
ldm set-variable autoboot\?=true ldom1
ldm bind ldom1
ldm start ldom1

At this point you should be able to run an ldm list command and see your local port that you can connect to.

Once you telnet to the ldom you will be at the {0} ok prompt. Type boot vdisk_iso and start the install process. You have a lot of options at this point. You can use a flar you have.. use a jumpstart server whatever you fancy. Note the T3/T4 are sun4v arch and a sun4u image will not work. I suggest creating a new image. Once you are complete you have patched and completed all your customizations you can then create a zfs snapshot and clone the machine. Run sys-unconfig and clear any naming IP from this master image before your snapshot.

zfs snapshot logipool/ldoms/ldom1@master

zfs send logipool/ldoms/ldom1@master | zfs recv logipool/ldoms/ldom2

Take the commands from above and create a new machine.

ldm add-domain ldom2
ldm set-vcpu 10 ldom2
ldm set-mau 0 ldom2
ldm set-mem 2g ldom2
ldm add-vnet vnet1 primary-vsw0 ldom1
ldm add-vdsdev /ldoms/ldom2/disk0.img vol201@primary-vds0
ldm add-vdisk vdisk201 vol201@primary-vds0 ldom2
ldm set-variable autoboot\?=true ldom2
ldm bind ldom2
ldm start ldom2

I script the whole thing and can be done with a new machine in less then 15 minutes.

---------- Post updated at 02:23 PM ---------- Previous update was at 02:12 PM ----------

Storage:

Create your pool of disks, depends on what type of devices you have.

zpool create ldomstor emcpower1c empower2c emcpower3c etc.
zfs create ldomstor/ldom1
zfs create -V 300g ldomstor/ldom1/ldom1-stor0
zfs create -V 300g ldomstor/ldom1/ldom1-stor1

ldm add-vdsdev /dev/zvol/dsk/ldomstor/ldom1/ldom1-stor0 ldom1stor0@primary-vds0
ldm add-vdsdev /dev/zvol/dsk/ldomstor/ldom1/ldom1-stor0 ldom1stor1@primary-vds0

ldm add-vdisk ldomstor0 ldom1stor0@primary-vds0 ldom1
ldm add-vdisk ldomstor1 ldom1stor1@primary-vds0 ldom1

Restart ldom1.

Once inside the domain you can see the new devices as disk using the format command. We create a second pool inside the domain for whatever the intended purpose may be.
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

looking for .profile examples

I'm looking for some 'well documented' .profile examples (8 Replies)
Discussion started by: JimC
8 Replies

2. Shell Programming and Scripting

need examples?

Can someone give me an example of two shells? (1 Reply)
Discussion started by: wmosley2
1 Replies

3. UNIX for Dummies Questions & Answers

SimpleAWK Examples

Can Anyone please give me some simple AWK Examples to clearly understand the usage and syntax of the command. Thanks (2 Replies)
Discussion started by: unxusr123
2 Replies

4. Emergency UNIX and Linux Support

Awk and Sed examples

Hi all, I tried to understand what this awk and sed does but cudnt understand. Can any body explain what awk and sed means with one simple example each and complex examples each with explanation. Thanks in advance. (7 Replies)
Discussion started by: j_panky
7 Replies

5. IP Networking

How to send non get request from linux server

Hi I want to send non get request for HTTP from linux server. Please let me knwo how to do that Thanks Lakshmikant (0 Replies)
Discussion started by: lakshmikant
0 Replies

6. Shell Programming and Scripting

lwp-request examples

Hi; Can i have ne sample examples of of using " lwp-request" in shell script. Is it necessary to have perl installed already in linux box for using this; Thnks; (2 Replies)
Discussion started by: ajaypadvi
2 Replies

7. Shell Programming and Scripting

Need lot of examples

Hi, I need a word doc or pdf which contains lots of Shell Programming samples... This is for my open book examination, thanks in advance.. (2 Replies)
Discussion started by: karthikeayan
2 Replies

8. Solaris

One virtual disk server or more for LDOMs?

Is it better to use single or multiple virtual disk servers? The host has multiple physical disk sets in multiple zpools. Should I use, say# ldm add-vds primary-vds0 primary # ldm add-vds primary-vds1 primary and then do the add-vdsdev to -vds0 and vds1 depending on which disk / zpool... (3 Replies)
Discussion started by: ad101
3 Replies
AMZFS-SENDRECV(8)					  System Administration Commands					 AMZFS-SENDRECV(8)

NAME
amzfs-sendrecv - Amanda script to create zfs sendrecv DESCRIPTION
amzfs-sendrecv is an Amanda application implementing the Application API. It should not be run by users directly. It create a zfs snapshot of the filesystem and backup the snapshot with 'zfs send'. Snapshot are kept after the backup is done, this increase the disk space use on the client but it is neccesary to be able do to incremental backup. If you want only full backup, you can disable this feature by setting the KEEP-SNAPSHOT property to 'NO'. Only the restoration of the complete backup is allowed, it is impossible to restore a single file. The application is run as the amanda user, it must have many zfs priviledge: zfs allow -ldu AMANDA_USER mount,create,rename,snapshot,destroy,send,receive FILESYSTEM Some system doesn't have "zfs allow", but you can give the Amanda backup user the rights to manipulate ZFS filesystems by using the following command: usermod -P "ZFS File System Management,ZFS Storage Management" AMANDA_USER This will require that your run zfs under pfexec, set the PFEXEC property to YES. The format of the diskdevice in the disklist (DLE) must be one of: Desciption Example ---------- ------- Mountpoint /data ZFS pool name datapool ZFS filesystem datapool/database ZFS logical volume datapool/dbvol The filesystem doesn't need to be mounted. PROPERTIES
This section lists the properties that control amzfs-sendrecv's functionality. See amanda-applications(7) for information on the Application API, application configuration. DF-PATH Path to the 'df' binary, search in $PATH by default. KEEP-SNAPSHOT If "YES" (the default), snapshot are kept after the backup, if set to "NO" then snapshot are no kept and incremental backup will fail. ZFS-PATH Path to the 'zfs' binary, search in $PATH by default. PFEXEC-PATH Path to the 'pfexec' binary, search in $PATH by default. PFEXEC If "NO" (the default), pfexec is not used, if set to "YES" then pfexec is used. EXAMPLE
In this example, a dumptype is defined to use amzfs-sendrecv application to backup a zfs filesystem. define application-tool amzfs_sendrecv { comment "amzfs-sendrecv" plugin "amzfs-sendrecv" #property "DF-PATH" "/usr/sbin/df" #property "KEEP-SNAPSHOT" "YES" #property "ZFS-PATH" "/usr/sbin/zfs" #property "PFEXEC-PATH" "/usr/sbin/pfexec" #property "PFEXEC" "NO" } define dumptype user-zfs-sendrecv { program "APPLICATION" application "amzfs_sendrecv" } SEE ALSO
amanda(8), amanda.conf(5), amanda-client.conf(5), amanda-applications(7) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHOR
Jean-Louis Martineau <martineau@zmanda.com> Zmanda, Inc. (http://www.zmanda.com) Amanda 3.3.3 01/10/2013 AMZFS-SENDRECV(8)
All times are GMT -4. The time now is 07:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy