Installation of the control domain
Start with Installation guide and go until a physical partition is on and running.
Go to the console and
ok> boot
Reference on the open-boot is here:
http://docs.oracle.com/cd/E19455-01/816-1177-10/index.html
several simple commands:
ok> printenv auto-boot?
ok> printenv boot-device
ok> devalias
ok> show-devs
ok> show-disks
ok> show-nets
To set openboot parameter, auto-boot for example, from xscf:
XSCF> setpparparam -p 0 -s bootscript "setenv auto-boot? true"
The command may be completed only when PPAR is powered off.
To check and set auto-boot parameter from Solaris command shell:
# eeprom auto-boot?
auto-boot?=false
# eeprom auto-boot?=true
After Solaris initial configuration is over, try to connect through ssh.
You may get the following error:
Client and server could not agree on a common cipher: client "aes256-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se,aes192-cbc,rijndael192-cbc,aes128-cbc,rijndael128-cbc,blowfish-cbc,3des-cbc", server "aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour". The server cipher list can be controlled using the "Ciphers" option, see sshd_config(4) for more information.
On this you edit sshd_config
# vi /etx/ssh/sshd_config
adding to the end the following line:
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,aes192-cbc,aes256-cbc,arcfour,arcfour128,arcfour256,3des-cbc,blowfish-cbc
run
# svcadm restart ssh
In Solaris 11 all system properties are set with svccfg command. For example to change hostname you need:
(http://docs.oracle.com/cd/E23824_01/html/E24456/vol1preface-11.html#scrolltoc)
$ svccfg -s system/identity:node listprop config
config application
config/enable_mapping boolean true
config/ignore_dhcp_hostname boolean false
config/loopback astring
config/nodename astring myname
$ svccfg -s system/identity:node setprop config/nodename="myname.net.ru"
$ hostname
myname
$ svccfg -s system/identity:node refresh
$ hostname
myname.net.ru
Configuring additional physical network interfaces
list the available network interfaces
#dladm show-phys
after performing configuration you may inspect new link connect parameters with the same command.
configure IPv4 on a network interface:
#ipadm create-ip net1
#ipadm create-addr -T static -a local=192.168.105.171/28 net1/addr
check link status:
#dladm show-link
LINK MEDIA STATE SPEED DUPLEX DEVICE
net1 Ethernet up 1000 full igb1
net3 Ethernet unknown 0 unknown igb3
To create vlan interface (http://docs.oracle.com/cd/E23824_01/html/821-1458/fpjve.html):
#dladm create-vlan -l net0 -v 600 net0_600,
where after -v option goes vlan tag number and in the end of the command goes a user-defined vlan name
# dladm show-vlan
LINK VID OVER FLAGS
net0_600 600 net0 -----
#ipadm create-ip net0_600
#ipadm create-addr -T static -a 172.22.0.5/24 net0_600
Install additional software packages
Software packages are maintained with pkg command. New packages are installed and updated from a publisher. Current publisher is displayed by command
#pkg publisher
and by default it is set to http://pkg.oracle.com/solaris/release
M10 was supplied with rather new OS package versions that are absent in the public Solaris 11 repository http://pkg.oracle.com/solaris/release.
So we need to change the publisher to
http://pkg.oracle.com/solaris/support.
In order to complete the publisher change we go to https://pkg-register.oracle.com with a metalink credential bound to the M10 support identifier and
request for a certificate and a key.
Consequent actions are described on the cite, brief command list:
sudo mkdir -m 0755 -p /var/pkg/ssl
$ sudo cp -i ~/Desktop/Oracle_Solaris_11_Support.key.pem /var/pkg/ssl
$ sudo cp -i ~/Desktop/Oracle_Solaris_11_Support.certificate.pem /var/pkg/ssl
$ sudo pkg set-publisher \
-k /var/pkg/ssl/Oracle_Solaris_11_Support.key.pem \
-c /var/pkg/ssl/Oracle_Solaris_11_Support.certificate.pem \
-G '*' -g https://pkg.oracle.com/solaris/support/ solaris
Create users and ensure automounted home directories
adduser -d /export/home/oracle -s /bin/bash -g oinstall -G dba -m oracle
$ cat /etc/auto_home
#
# <license text removed>
#
# Home directory map for automounter
#
oracle localhost:/export/home/&
+auto_home
Making mirror for the root filesystem
Check that root zpool is not already configured for mirroring
# zpool status rpool
pool: rpool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c2t50000394F8098DFAd0s0 ONLINE 0 0 0
Ensure that the second (empty) disk that we are going to attach to the mirror has SMI label (the partition table should be the same as disk 0 partition table).
To convert the second disk label to SMI run
# format -e
choose partition, then label and SMI label type.
Attach the second disk to the root zpool:
# zpool attach rpool c2t50000394F8098DFAd0s0 c2t50000394E8393BCAd0s0
and wait until resilvering process finish
# zpool status rpool
or
# zpool status -lx
Configuring logical domain
Before installing operating system on ldom it is important to know version of XCP for the physical server.
Go to XSCF and execute:
XSCF> version -c xcp
example output:
BB#00-XSCF#0 (Master)
XCP0 (Current): 2051
XCP1 (Reserve): 2051
M10 release notes contains compatibility notes for different XCP versions.
For 2015 we need Solaris 11/1 or Solaris 10/13
1. Configure control domain
check that logical domains service is on:
#svcs ldmd
if not then enable it:
#svcadm enable ldmd
Configure logical primary domain
add neccessary virtual devices, such as:
- vdiskserver - virtual disk server
# ldm add-vds primary-vdc0 primary
- vswitch - virtual switch service
# ldm add-vsw net-dev=net0 primary-vsw0 primary
- vconscon - virtual console concentrator service
# ldm add-vcc port-range=5000-5100 primary-vcc0 primary
# svcadm enable svc:/ldoms/vntsd
check that all the virtual devices are added:
# ldm list-services primary
configure resources of the control domain:
# ldm set-core 2 primary
# ldm set-memory 8G primary
# ldm list-bindings primary
and do not forget to safe configuration:
# ldm add-spconfig primary
------------------------------------------
Configure logical guest domain
create a file for a logical disk drive:
#dd if=/dev/zero of=/home/oracle/ldvol/vd1 count=10000 bs=1048576
mkfile command also may be used to create a file for a disk drive:
# mkfile 100g /ldoms/domain/test/fdisk0
# ldm add-domain ldom-db1
# ldm set-core 2 ldom-db1
# ldm add-memory 32G ldom-db1
# ldm add-vnet vnet0 primary-vsw0 ldom-db1
# ldm add-vdsdev /home/oracle/ldvol/vd1 vd1@primary-vdc0
# ldm add-vdisk vdisk1 vd1@primary-vdc0 ldom-db1
# ldm set-variable auto-boot?=false ldom-db1
If operation system for the ldom will be installed from an ISO image, we need to
configure virtual cd drive, for example:
#ldm add-vdsdev /home/oracle/SPARC_SOLARIS_10_8.iso cd-iso@primary-vdc0
#ldm add-vdisk s10-cd cd-iso@@primary-vdc0 ldev-db1
Get list of configured logical domains:
#ldm list-domain
then bind abd start the ldom:
#ldm bind-domain ldom-db1
#ldm start-domain ldom-db1
Connect to the started domain with
#telnet localhost port
where port is ont of the ports assigned to the virtual console concentrator
So as auto-boot was set to false, we should get open-boot prompt:
ok>
and boot from our ISO image to start OS installation:
ok> boot s10-cd
To organize network connection between guest and control domains:
on the control domain list network interface devices:
# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net1 Ethernet up 1000 full igb1
net3 Ethernet unknown 0 unknown igb3
net2 Ethernet unknown 0 unknown igb2
net0 Ethernet up 1000 full igb0
net4 Ethernet up 1000 full vsw0
We see that net4 alias corresponds to the virtual switch (vsw0)
We need to plumb net4 and designate it an IP address:
# dladm create-vlan -l net4 -v 600
(-v option indicates VLAN tag)
create untagged IP interface
# ipadm create-ip net4
# ipadm create-addr -T static -a 192.168.2.100/24 net4/ipv4
create IP interface for VLAN 600
# ipadm create-ip net600004
# ipadm create-addr -T static -a 192.168.1.100/24 net600004/ipv4
If additional tagged interface needed for the guest doman, than on the master domain add a virtual switch:
#ldm add-vsw net-dev=net0 pvid=1 vid=200 vsw200 primary
For guest domain bind tagged vnet interface
#ldm add-vnet pvid=200 net0 vsw0 ldom-db1
And inside of the guest domain:
#dladm show-dev
example output:
vnet0 link: up speed: 0 Mbps duplex: unknown
vnet1 link: unknown speed: 0 Mbps duplex: unknown
#ifconfig vnet1 plumb
#ifconfig vnet1 172.17.0.57 netmask 255.255.255.0
#ifconfig vnet1 up
Mount cdrom in ldom:
mount -F hsfs -o ro /dev/dsk/c0d1s2 /mnt
Manage configurations
save new configuration to SP
# ldm add-config initial
configurations are saved into
/var/opt/SUNWldm/
save configuration to XML file:
# ldm list-constraints -x > ldom-config.xml
ldmd does not automatically update configurations on the SP. ldmd keeps its own internal "current" config which is more or less mirrored in the autosave configuration. When ldmd's configuration is the same as the booted on SP config, if you do 'ldm list-spconfig' it will show as [current]. If you modify that config, i.e. the internal ldmd config is different than the SP config, 'ldm list-spconfig' will show it as [next poweron], which unfortunately is somewhat misleading in this case, as you're not going to necessarily get the "updated" config on next poweron unless you do an 'ldm add-spconfig'. Also
note that "factory-default" cannot be modified on the SP.
The information about the state of all guests is in the ldmd database: /var/opt/SUNWldm/ldom-db.xml, which is separate from the SP configs and autosave configs. I'm not 100% sure, but I think some state information within the database is causing the ldmd internal config for the booted "factory-default" config to be modified at start-of-day in the case above, and that's why you're seeing it marked as [next poweron] after reboot.
The autosave information is updated at the same time as the internal ldmd "current" config is updated. But, again, to see it via 'ldm list-spconfig -r', it has to be an explicitly named spconfig, via 'ldm add-spconfig <name>'. I think this would all be much clearer had you simply done the 'ldm add-spconfig MYCONFIGNAME' suggested above, as "factory-default" ends up being special-cased for several things.
|