Thursday, April 6, 2017

Running Oracle Linux as a Logical Domain on SPARC

Running Oracle Linux as a Logical Domain on SPARC

Abstract:

With the purchase of Cray SuperServer division and their StarFire platform, Sun Microsystems introduced Physical Domains to their server line. With the introduction of the UltraSPARC T1, Sun Microsystems introduced Logical Domains and offered support for the first release of "third party" Ubuntu Linux on SPARC. Fujitsu introduced their own Linux under their SPARC platforms. Since the purchase of Sun Microsystems by Oracle, the introduction of Oracle Linux has been made.

[Courtesy: Oracle Virtualization Blog]

Presenter:

Jeff Savit
Product Management Senior Manager
Oracle Corporation

Linux in an LDom

Jeff recently published a blog about a simple installation of Oracle Linux in an LDom, with 4 cores (32 vCPU threads) and 32 Gigabytes of RAM where the virtual disk was in a ZFS dataset. Some of the highlights included steps in loading Oracle Linux in an Oracle SPARC Logical Domain.


Preparing an LDom

Solaris 11 acts as the Control Domain in an Oracle VM for SPARC environment. From the Primary or Control Domain, a Logical Domain was configured with cpu, memory, disk, dvd, and virtual nic.
primary # ldm add-domain ols                                     
primary # ldm set-core 4 ols
                                    
primary # ldm set-mem 32g ols
                                   
primary # zfs create rpool/export/home/ldoms/ols
                
primary # mkfile -n 32g /ldoms/ols/disk0.img
                    
primary # ldm add-vdsdev
/ldoms/ols/disk0.img \                  
 olsroot@primary-vds0
                                           
primary # ldm add-vdisk boot olsroot@primary-vds0 ols
           
primary # ldm add-vdsdev \
                                      
 /export/home/OL-SPARC/OL-201703262026-R6-U7-sparc-dvd.iso \
    
 oliso@primary-vds0
                                             
primary # ldm add-vdisk iso oliso@primary-vds0 ols
              
primary # ldm add-vnet pvid=123 eth0 primary-vsw0 ols
           
primary # ldm set-variable auto-boot\?=false ols
                
The Domain "ols" is assigned 4x Cores (32 vCPU threads) with 32 Gig RAM. Jeff created a ZFS filesystem in the root pool, to simplify snapshots and cloning future images. A data file to act as the root disk of the Linux instance is created, served to guests, and added to the "ols" instance. An Oracle Linux installation ISO was also served to guests and added as a disk to Guest "ols" (although, serving as read-only would allow for multiple simultaneous installations.) A virtual network card was added on VLAN 123 to Guest "ols" and attached to the primary virtual switch. With "auto-boot" disabled, an OK prompt in a virtual OpenBoot instance will appear on binding and start of the Logical Domain.


Starting the LDom

Solaris 11 acts as a Service Domain in an Oracle VM for SPARC environment. The Console for Guest Logical Domains are available from a Service Domain, the Primary Domain normally "serves" a virtual console. A virtual console is not available until a iis bound to a domain.
primary# ldm bind ols                                           
primary# ldm start ols               
                           

primary# ldm list                                               
NAME      STATE  FLAGS  CONS VCPU MEMORY UTIL NORM UPTIME       
primary   active -n-cv- UART 16   32G    0.5% 0.5% 69d 10h 45m  

ols       active -n---- 5000 8    32G   
0.5% 0.5%  1d  1h  5m   
Normally, the virtual console ports start their numbering from 5000 and increment.

Acquiring Virtual Console

The first virtual console for guests start at 5000, the second virtual console assigned would be 5001, etc. Telnet to the localhost console port assigned to the Guest Domain will provide access to the SPARC OpenBoot
primary# telnet localhost 5000                                     
...                                                                
SPARC T5-2, No Keyboard                                            
Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.38.6, 32.0000 GB memory available, Serial #xxxxxxxx.    
Ethernet address 0:14:4f:f8:96:25, Host ID: xxxxxxxx.              
{0} ok
                                                            

Media bound to the domain can now be booted from the ok prompt.

Boot Oracle Linux from ISO

The available device aliases can be listed and an attempt to boot from the  installation media.

{0} ok devalias                                                                 
boot                     /virtual-devices@100/channel-devices@200/disk@0        
iso                      /virtual-devices@100/channel-devices@200/disk@1        
eth0                     /virtual-devices@100/channel-devices@200/network@0     
net                      /virtual-devices@100/channel-devices@200/network@      
disk                     /virtual-devices@100/channel-devices@200/disk@1        
virtual-console          /virtual-devices/console@1                             
name                     aliases                                                
{0} ok boot iso                                                                 
Boot device: /virtual-devices@100/channel-devices@200/disk@1  File and args:    
                                                                                
                             GRUB Welcome to GRUB!                              
                          GNU GRUB  version 2.02~beta3                          
 +----------------------------------------------------------------------------+ 
 |*Install linux using text mode (use DHCP)                                   | 
 | Install linux using VNC (graphical) mode (use DHCP)                        | 
 | Rescue mode (use DHCP)                                                     | 
 |                                                                            | 
 |                                                                            | 
 |                                                                            | 
 +----------------------------------------------------------------------------+ 
      Use the ^ and v keys to select which entry is highlighted.                
      Press enter to boot the selected OS, `e' to edit the commands             
      before booting or `c' for a command-line.                                 
      The highlighted entry will be executed automatically in 0s.               

In Conclusion:

Oracle Linux is now a viable platform under SPARC. The SPARC Silicon in Software, such as the DAX Query Accelerators, Decompression Engines, Crypto Engines, etc. are made fully available by the Solaris 11 based Oracle VM for SPARC instance. The Linux Guest Domains can be live migrated just like any Solaris 10 or Solaris 11 Guest Domains.




No comments:

Post a Comment