Solaris Virtualization: Using Logical Domains on Solaris 11 Part Three

August 8th, 2012 | Tags: , , , , ,

In our previous articles we built the foundation of our Logical Domains environment, which then enabled us to create a Logical Domain in part two.  Now in the final article in this series we will be connecting to and performing the installation of the operating system.

Solaris Virtualization: Using Logical Domains on Solaris 11 Part One
Solaris Virtualization: Using Logical Domains on Solaris 11 Part Two

Before we start the domain, we need to bind the associated resources to the domain.  This will also show us the port that the console is running on, so that we can connect to it.

root@t4:~# ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  UART    4     4G       0.8%  2h 44m
t4-g1            inactive   ------          8     4G
root@t4:~# ldm bind-domain t4-g1
root@t4:~# ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  UART    4     4G       3.0%  2h 45m
t4-g1            bound      ------  5000    8     4G    

In the above example we can see that once we “bind-domain” this is binding specific hardware resources to the domain.  In this case we can now see that we have a port for the console connections.  For this domain it is 5000.  So if we telnet to port 5000 on the localhost we will end up connected to the console.  I personally like to connect prior to starting the domain, because I prefer to watch the boot up process, so that I know everything is working properly, this means I will have a separate ssh session which I use for telnet.

root@t4:~# telnet localhost 5000
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to t4.
Escape character is '^]'.

Connecting to console "t4-g1" in group "t4-g1" ....
Press ~? for control options ..

Start the domain.

root@t4:~# ldm start-domain t4-g1
LDom t4-g1 started

Observe boot process.  During the below boot process we can see a couple of things.  Most importantly we see that the boot fails, with a “Can’t open boot device” this is expected as we are attempting to boot from disk0 which has not been installed yet.

SPARC T4-1, No Keyboard
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.33.1, 4096 MB memory available, Serial #83496026.
Ethernet address 0:14:4f:fa:c:5a, Host ID: 84fa0c5a.

Boot device: disk0  File and args:
Bad magic number in disk label
ERROR: /virtual-devices@100/channel-devices@200/disk@0: Can't open disk label package

ERROR: boot-read fail

Evaluating:

Can't open boot device

{0} ok

We will be dumped to the ok prompt for the domain, from here we can simply select to boot from the iso that you defined earlier in the domain setup.  In my case I named the device s11.iso, so if you do a devalias you would see s11.iso as an alias to a device.

{0} ok boot s11.iso

Just a quick note, the escape character for telnet is listed as ‘^]’ in the beginning of the telnet session, this is CTRL + ] once you have returned the the telnet> prompt you can type quit.

Now in my environment I went through the install of Solaris 11, since it was the disk I had readily available, you can additionally use Soalris 10, or OpenSolaris if you so desire.

  1. Carlos Reed
    November 16th, 2012 at 10:27
    Quote | #1

    Thank you very much for the three articles.

    Following you example permited to understand the ldom concepts in a better way.

  2. Sethu
    January 23rd, 2013 at 16:05
    Quote | #2

    It was really nice. i was dreaming about it. it gave clear picture of ldom. i cannt belive i learned ldom. this took 8 months i was researching. not sure where to start. this is good article.

Comments are closed.