Guest domain is a top level virtual machine which we can create using the control domain. Guest domain will not perform any administrative operation on ldom but runs its own operating system on it.Once you have completed the Oracle VM for SPARC tutorial 1 ,then you can start following this article.We will see how we can create a new guest domain and allocate the resources to it.
Oracle VM for SPARC Tutorial:
[checklist]
- Installation and Configuring the Primary domain
- Creating Guest Domains (You Are Here)
- Configuring I/O Domain
- Dynamically adding/removing Resources
- Live Migration for Guest Domains
- Adding ISO image to Multiple Guests
- Configuration Backup & Restore
- Removing the LDOM and Services
[/checklist]

1. Login to the control domain which we have already configured . (Refer Oracle VM for SPARC tutorial 1 )
2. You need to find out how much resources are available in the system.Use ldm list-devices -a command to get those details.
PD-bash# ldm list-devices -a
CORE
ID %FREE CPUSET
0 0 (0, 1, 2, 3, 4, 5, 6, 7)
1 100 (8, 9, 10, 11, 12, 13, 14, 15)
2 100 (16, 17, 18, 19, 20, 21, 22, 23)
3 100 (24, 25, 26, 27, 28, 29, 30, 31)
4 100 (64, 65, 66, 67, 68, 69, 70, 71)
5 100 (72, 73, 74, 75, 76, 77, 78, 79)
6 100 (80, 81, 82, 83, 84, 85, 86, 87)
7 100 (88, 89, 90, 91, 92, 93, 94, 95)
VCPU
PID %FREE PM
0 0 no
1 0 no
2 0 no
3 0 no
4 0 no
5 0 no
6 0 no
7 0 no
8 100 --- -------------->Free CPU's cores starts here.
9 100 ---
10 100 ---
11 100 ---
12 100 ---
13 100 ---
14 100 ---
15 100 ---
16 100 ---
17 100 ---
18 100 ---
19 100 ---
20 100 ---
21 100 ---
22 100 ---
23 100 ---
24 100 ---
25 100 ---
26 100 ---
27 100 ---
28 100 ---
29 100 ---
30 100 ---
31 100 ---
64 100 ---
65 100 ---
66 100 ---
67 100 ---
68 100 ---
69 100 ---
70 100 ---
71 100 ---
72 100 ---
73 100 ---
74 100 ---
75 100 ---
76 100 ---
77 100 ---
78 100 ---
79 100 ---
80 100 ---
81 100 ---
82 100 ---
83 100 ---
84 100 ---
85 100 ---
86 100 ---
87 100 ---
88 100 ---
89 100 ---
90 100 ---
91 100 ---
92 100 ---
93 100 ---
94 100 ---
95 100 --- -------------->Free CPU's cores ends here.
MAU
ID CPUSET BOUND
0 (0, 1, 2, 3, 4, 5, 6, 7) primary
1 (8, 9, 10, 11, 12, 13, 14, 15)
2 (16, 17, 18, 19, 20, 21, 22, 23)
3 (24, 25, 26, 27, 28, 29, 30, 31)
4 (64, 65, 66, 67, 68, 69, 70, 71)
5 (72, 73, 74, 75, 76, 77, 78, 79)
6 (80, 81, 82, 83, 84, 85, 86, 87)
7 (88, 89, 90, 91, 92, 93, 94, 95)
MEMORY
PA SIZE BOUND
0x0 512K _sys_
0x80000 1536K _sys_
0x200000 94M _sys_
0x6000000 32M _sys_
0x8000000 96M _sys_
0xe000000 32M primary
0x10000000 28416M ------------------------------> Free Physical memory
0x700000000 4G primary
IO
DEVICE PSEUDONYM BOUND OPTIONS
pci@400 pci_0 yes
pci@500 pci_1 yes
PD-bash#
#
3.Create a new Guest domain using the below command.
PD-bash# ldm add-domain ua1 PD-bash# ldm list-domain NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 8 4128M 0.3% 17m ua1 inactive ------ PD-bash#
4.Add 8 vcpus to guest domain ua1.
PD-bash# ldm add-vcpu 8 ua1 PD-bash# ldm list-domain NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 8 4128M 0.5% 17m ua1 inactive ------ 8 PD-bash#
5.Add 4G memory to logical domain ua1.
PD-bash# ldm add-memory 4G ua1 PD-bash# ldm list-domain NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 8 4128M 0.4% 18m ua1 inactive ------ 8 4G PD-bash#
6.Create a new virtual NIC on top the virtual switch and assigned to ua1. List the logical domain bindings to verify the configuration.
PD-bash# ldm add-vnet vnet0 primary-vsw0 ua1
PD-bash# ldm list-bindings ua1
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
ua1 inactive ------ 8 4G
UUID
1e8baa72-a123-6184-f724-feebad1585eb
CONTROL
failure-policy=ignore
DEPENDENCY
master=
NETWORK
NAME SERVICE ID DEVICE MAC MODE PVID VID MTU LINKPROP
vnet0 primary-vsw0 0 00:14:4f:fb:54:92 1
PD-bash#
7.Now its time to add the new disks to logical domain “ua1” . Here I am using “/dev/dsk/c4t0456RTE000005400002d0s2” LUN for ua1 domain .
8.First i am allocating the LUN to virtual disk server.
PD-bash# ldm add-vdiskserverdevice /dev/dsk/c4t600144F0B8E706DA00005300F4350005d0s2 vol0@primary-vds0
PD-bash# ldm list-services vds0
LDom "vds0" was not found
PD-bash# ldm list-services
VCC
NAME LDOM PORT-RANGE
primary-vc0 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:fa:12:0e nxge1 0 switch@0 1 1 1500
VDS
NAME LDOM VOLUME OPTIONS MPGROUP DEVICE
primary-vds0 primary vol0 /dev/dsk/c4t0456RTE000005400002d0s2
PD-bash#
9.Now bind the virtual disk to logical domain “ua1” which you have created in step 8 .
PD-bash# ldm add-vdisk vdisk0 vol0@primary-vds0 ua1
PD-bash# ldm list-bindings ua1
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
ua1 inactive ------ 8 4G
UUID
1e8baa72-a123-6184-f724-feebad1585eb
CONTROL
failure-policy=ignore
DEPENDENCY
master=
NETWORK
NAME SERVICE ID DEVICE MAC MODE PVID VID MTU LINKPROP
vnet0 primary-vsw0 0 00:14:4f:fb:54:92 1
DISK
NAME VOLUME TOUT ID DEVICE SERVER MPGROUP
vdisk0 vol0@primary-vds0 0
PD-bash#
10.The same way you can map the ISO image file to guest domain using the below set of commands.
PD-bash# ldm add-vdiskserverdevice /export/home/sol-10-u10-ga2-sparc-dvd.iso
iso0@primary-vds0
PD-bash# ldm add-vdisk iso0 iso0@primary-vds0 ua1
PD-bash# ldm list-bindings ua1
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
ua1 inactive ------ 8 4G
UUID
1e8baa72-a123-6184-f724-feebad1585eb
CONTROL
failure-policy=ignore
DEPENDENCY
master=
NETWORK
NAME SERVICE ID DEVICE MAC MODE PVID VID MTU LINKPROP
vnet0 primary-vsw0 0 00:14:4f:fb:54:92 1
DISK
NAME VOLUME TOUT ID DEVICE SERVER MPGROUP
vdisk0 vol0@primary-vds0 0
iso0 iso0@primary-vds0 1
PD-bash#
11.Just bind the logical domain to the primary domain.
PD-bash# ldm list-domain NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 8 4128M 0.4% 26m ua1 inactive ------ 8 4G PD-bash# PD-bash# ldm bind-domain ua1 LDom ua1 started PD-bash# ldm list-domain NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 8 4128M 0.7% 30m ua1 bind ------ 5000 8 4G PD-bash#
12.Set the auto-boot is false to logical domain “ua1” for Operating system installation.
PD-bash# ldm set-variable auto-boot\?=false ua1
13.Boot/start the logical domain “ua1”.
PD-bash# ldm start-domain ua1 LDom ua1 started PD-bash# ldm list-domain NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- SP 8 4128M 0.7% 30m ua1 active -t---- 5000 8 4G 12% 1s PD-bash#
14. Take the console of the logical domain “ua1” .It uses the console port 5000 (see step:13)
ok boot iso0
PD-bash# telnet 192.168.2.11 5000
Trying 1192.168.2.11...
Connected to 192.168.2.11.
Escape character is '^]'.
Connecting to console "ua1" in group "ua1" ....
Press ~? for control options ..
{0} ok
15. List the devices to boot.
{0} ok devalias
iso0 /virtual-devices@100/channel-devices@200/disk@1
vdisk0 /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
16.Boot the system from iso.
{0} ok boot iso0
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...
|
You have successfully created the guest domain and assigned the resources to it. You have also mapped the virtual disks to the virtualdisk server and mapped to the guest domain or logical domain. In the end of the article ,we have see how to access the console of the guest domains and mapped the ISO file for OS installation.
Hope this article is informative to you .Please share it in social networks. Thank you for visiting UnixArena.
hajee says
Friends, I’m in middle of the implementation highly appreciate your input,
Thanks a lot.
Regards,
Hajee
Syed Mohamed jamin says
Hi ,
Really this help us lot to create the ldom’s in our environment…
Can you Please brief about LDC in ldom… expecting clear explanation… Thanks in advance
Thanks & Regards,
Syed
hajee says
Hi, Getting following error while starting os boot: Please suggest.
NOTE: If you choose to customize, you should understand file systems, their
intended purpose on the disk, and how changing them may affect the operation
of the system.
File sys/Mnt point Disk/Slice Size
========================================================================
/ c0d0s0 6992 MB
swap c0d0s1 2051 MB
overlap c0d0s2 307210 MB
/export/home c0d0s7 298166 MB
Esc-2_Continue Esc-3_Go Back Esc-4_Remote Mounts Esc-5_Exit Esc-6_Help
– Profile ———————————————————————-
The information shown below is your profile for installing Solaris software.
It reflects the choices you’ve made on previous screens.
============================================================================
Installation Option: Initial
Boot Device: c0d0
Root File System Type: UFS
Client Services: None
Locales: Saudi Arabia (UTF-8)
System Locale: C ( C )
Software: Solaris 10, Entire Distribution
File System and Disk Layout: / c0d0s0 6992 MB
swap c0d0s1 2051 MB
/export/home c0d0s7 298166 MB
—–Esc-2_Begin Installation Esc-4_Change Esc-5_Exit Esc-6_Help——-
Esc-2_Begin Installation Esc-4_Change Esc-5_Exit Esc-6_Help
Preparing system for Solaris install
Configuring disk (c0d0)
– Creating Solaris disk label (VTOC)
ERROR: Could not create Solaris disk label (VTOC)
ERROR: Could not label disks
ERROR: Could not update disks with new configuration
mkdir: “/a/var/sadm/launcher”: Read-only file system
Could not update disks with new configuration
Fatal Error
Solaris installation program exited.
***********Failing********************************************
Deepa Sreenivasan says
Use filesystem as ZFS instead of UFS.
Deepa Sreenivasan says
Select Root Filesystem type as ZFS instead of UFS.