Add the Same ISO image file in Multiple LDOMS

Need to attach the ISO file to each logical domain, for the first time operating system installation. If you have pre-configured jumpstart , You can use it for the guest domain operating system installation. If you don’t have jumpstart,then you need to install it using the ISO image. By default LDOM will not allow to map the same device file to multiple guest domains .Here we will see how we can map the same ISO image to multiple LDOMS.

Prerequisites :
ISO Image

High Level Plan :

Add Virtual Disk Server to export the ISO image
Stop the Guest Domain
Add the Virtual disk for the ISO image to the Logical or Guest Domain
Start the Guest Domain
Connect to the Guest Domain
Verify and boot the Guest Domain from ISO image.

Add Virtual Disk Server Device to export the ISO Image

[root@unixkarri /]# ldm add-vdsdev options=ro /export/home/sol10-sparcdvd.iso iso01@primary-vds0
[root@unixkarri /]#
[root@unixkarri /]#
[root@unixkarri /]# ldm list-services primary
VCC
 NAME LDOM PORT-RANGE
 primary-vconsole primary 5000-5100

VSW
 NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE
 primary-vsw0 primary 00:14:4f:f8:f3:f4 e1000g0 0 switch@0 1 1 1500

VDS
 NAME LDOM VOLUME OPTIONS MPGROUP DEVICE
 primary-vds0 primary vol01 /dev/dsk/c0t1d0s2
 iso01 ro /export/home/sol10-sparcdvd.iso 
[root@unixkarri /]#

Stopping the Guest Domain
[root@unixkarri /]# ldm list-domain
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
primary active -n-cv- SP 8 2G 0.4% 55m
testldom01 active -t---- 5001 8 2G 0.1% 25m 
[root@unixkarri /]# 
[root@unixkarri /]# ldm stop-domain testldom01
LDom testldom01 stopped
[root@unixkarri /]#
[root@unixkarri /]# ldm list-domain
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
primary active -n-cv- SP 8 2G 0.4% 55m
testldom01 bound ------ 5001 8 2G 
[root@unixkarri /]#

Add the Virtual disk for the ISO image to the Logical or Guest Domain and start the Domain

[root@unixkarri /]# ldm add-vdisk iso01 iso01@primary-vds01 testldom01
[root@unixkarri /]#
[root@unixkarri /]# ldm start-domain testldom01
LDom testldom01 started
[root@unixkarri /]#

Connect to the Guest Domain and boot from ISO image

[root@unixkarri /]# telnet localhost 5001 
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Connecting to console "testldom01" in group "testldom01" ....
Press ~? for control options ..

{0} ok
{0} ok devalias
iso01 /virtual-devices@100/channel-devices@200/disk@1
vdisk01 /virtual-devices@100/channel-devices@200/disk@0
vnet0 /virtual-devices@100/channel-devices@200/network@0
net /virtual-devices@100/channel-devices@200/network@0
disk /virtual-devices@100/channel-devices@200/disk@0
virtual-console /virtual-devices/console@1
name aliases
{0} ok 
{0} ok boot iso01
Boot device: /virtual-devices@100/channel-devices@200/disk@1 File and args:

SunOS Release 5.10 Version Generic_147440-01 64-bit
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
Configuring devices.
Using RPC Bootparams for network configuration information.
Attempting to configure interface vnet0...
Skipped interface vnet0
Setting up Java. Please wait...
Serial console, reverting to text install
Beginning system identification...
Searching for configuration file(s)...
Search complete.
Discovering additional network configuration..
Select a Language
 0. English
 1. Brazilian Portuguese
 2. French
 3. German
 4. Italian
 5. Japanese
 6. Korean
 7. Simplified Chinese
 8. Spanish
 9. Swedish
 10. Traditional Chinese Perfect !!!!! We have successfully exported the ISO image and booted the logical domain with ISO Image.
Please continue the OS installation

If we have more Logical Domain, we can add the many Virtual disk Server devices to export the same ISO images.

[root@unixkarri /]# ldm add-vdsdev option=ro /export/home/sol10-sparcdvd.iso iso02@primary-vds0
[root@unixkarri /]# ldm add-vdsdev option=ro /export/home/sol10-sparcdvd.iso iso03@primary-vds0
[root@unixkarri /]# ldm add-vdisk iso02 iso02@primary-vds01 testldom02
[root@unixkarri /]# ldm add-vdisk iso03 iso03@primary-vds01 testldom03
[root@unixkarri /]# 
[root@unixkarri /]#