📜 ⬆️ ⬇️

We continue games with experimental T2000 - stage, we share power

Today I will continue to describe the tests, on the Sun Fire T2000 server already familiar to us from the previous post. It is necessary to try how painlessly the installation on such a fresh Oracle Oracle VM (formerly Ldom) machine will be and the launch of Solaris in it. So to say a training run before official work. Someone may need a detailed manual.

Well, let's start, first we need to download this package, this can be done from the official Oracle website (may require registration), or from here - p12569204_210_SOLARIS64 (1) .zip
, flooded for the lazy.
It is imperative to check if your hardware meets the Oracle criteria (firmware, version of Solaris, etc.). For readers, I will cover:

  root @ T2000 # cat / etc / release 
                    Oracle Solaris 10 9/10 s10s_u9wos_14a SPARC
      Copyright (c) 2010, Oracle and / or its affiliates.  All rights reserved.
                             Assembled 11 August 2010

 root @ T2000 # prtdiag -v
 ......................
 ============================ FW Version ==================== ========
 Version
 -------------------------------------------------- ----------
 System Firmware 6.7.10 2010/07/14 16:35

 ======================= System PROM revisions =======================
 Version
 -------------------------------------------------- ----------
 OBP 4.30.4.b 2010/07/09 13:48
 ........................................

Well, suppose that everything is in order, we have downloaded the necessary software and are ready to install, naturally we need to prepare the place where the guest OS virtual disk will be located. To do this, I allocated a little space on 2 disks. I combined them into a mirror pool.
Zfs

  root @ T2000 # zpool list
 NAME SIZE ALLOC FREE CAP HEALTH ALTROOT
 OracleVM 29.8G 9.54G 20.2G 32% ONLINE -
 mainpool 38G 10.8G 27.2G 28% ONLINE -

 root @ T2000 # df -h |  grep OracleVM
 OracleVM 29G 9.5G 20G 33% / OracleVM

You see, the space on it is a previously created image file (which will be our virtual disk), the file was created using the dd command, it looked like this:
')
root@T2000 # dd if=/dev/zero of=/OracleVM/image bs=1024 count=10000000

Installing Oracle VM is more than simple, unpacking the downloaded archive, go to the Install folder and see there is the only script that we run:

  root @ T2000 # ./install-ldm
 root @ T2000 # svcs -a |  grep ldmd
 online 16:51:52 svc: / ldoms / ldmd: default
 root @ T2000 # ldm list
 NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
 primary active -nc-- SP 16 8064M 0.1% 49m


The result tells us that everything went well. So you can proceed to the next steps, this is where the most interesting begins. The first is configuring the services of our VM, these are three services:
vcc - virtual console
vds - virtual disk
vsw - virtual switch
To do this, enter the following commands, in the future it will be clear the use of all options and arguments.

  root @ T2000 # ldm add-vcc port-range = 5000-5100 primary-vcc0 primary
 root @ T2000 # ldm add-vds primary-vds0 primary
 root @ T2000 # ldm add-vsw net-dev = e1000g1 primary-vsw0 primary
 root @ T2000 # ldm list-services primary
 VCC
     NAME LDOM PORT-RANGE
     primary-vcc0 primary 5000-5100

 VSW
     NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE INTER-VNET-LINK
     primary-vsw0 primary 00: 14: 4f: f9: 29: 98 e1000g1 0 switch @ 0 1 1 1500 on         

 Vds
     NAME LDOM VOLUME OPTIONS MPGROUP DEVICE
     primary-vds0 primary         

As a result, we successfully assigned virtual devices to our primary domain. We now turn to the allocation of physical resources for the guest domain. We know the parameters of our server, but to make sure once again that we have, we enter the command:

  root @ T2000 # prtdiag
 System Configuration: Sun Microsystems sun4v Sun Fire T200
 Memory size: 8064 Megabytes

 ================================ Virtual CPUs ================ ================


 CPU ID Frequency Implementation Status
 ------ --------- ---------------------- -------
 0 1000 MHz SUNW, UltraSPARC-T1 on-line  
 1 1000 MHz SUNW, UltraSPARC-T1 on-line  
 2 1000 MHz SUNW, UltraSPARC-T1 on-line  
 3 1000 MHz SUNW, UltraSPARC-T1 on-line  
 4 1000 MHz SUNW, UltraSPARC-T1 on-line  
 5 1000 MHz SUNW, UltraSPARC-T1 on-line  
 6 1000 MHz SUNW, UltraSPARC-T1 on-line  
 7 1000 MHz SUNW, UltraSPARC-T1 on-line  
 8 1000 MHz SUNW, UltraSPARC-T1 on-line  
 9 1000 MHz SUNW, UltraSPARC-T1 on-line  
 10 1000 MHz SUNW, UltraSPARC-T1 on-line  
 11 1000 MHz SUNW, UltraSPARC-T1 on-line  
 12 1000 MHz SUNW, UltraSPARC-T1 on-line  
 13 1000 MHz SUNW, UltraSPARC-T1 on-line  
 14 1000 MHz SUNW, UltraSPARC-T1 on-line  
 15 1000 MHz SUNW, UltraSPARC-T1 on-line  

 ======================= Physical Memory Configuration ========================
 Segment Table:
 -------------------------------------------------- ------------
 Base Segment Interleave Bank Contains
 Address Size Factor Size Modules
 -------------------------------------------------- ------------
 0x0 8 GB 4 2 GB MB / CMP0 / CH0 / R0 / D0
                                              MB / CMP0 / CH0 / R0 / D1
                                     2 GB MB / CMP0 / CH1 / R0 / D0
                                              MB / CMP0 / CH1 / R0 / D1
                                     2 GB MB / CMP0 / CH2 / R0 / D0
                                              MB / CMP0 / CH2 / R0 / D1
                                     2 GB MB / CMP0 / CH3 / R0 / D0
                                              MB / CMP0 / CH3 / R0 / D1

This is sufficient information so that we can configure the primary system to accommodate the guest.

root@T2000 # ldm set-vcpu 8 primary
Crypto unit 2 was removed from domain primary

Next will follow the commands that I will describe below.

root@T2000 # ldm start-reconf primary
Initiating a delayed reconfiguration operation on the primary domain.
All configuration changes for other domains are disabled until the primary
domain reboots, at which time the new configuration for the primary domain
will also take effect.
root@T2000 # ldm set-memory 4G primary
root@T2000 # ldm add-config initial
root@T2000 # ldm list-config
factory-default
initial [current]


After entering the data commands, we received a new configuration download our server. Next, we need to reboot in order to continue our setup.

root@T2000 # shutdown -y -g0 -i6

In the boot process, we already see that the RAM, as we ordered 6GB. Then we finish our network:

  root @ T2000 # ifconfig -a
 lo0: flags = 2001000849 <UP, LOOPBACK, RUNNING, MULTICAST, IPv4, VIRTUAL> mtu 8232 index 1
         inet 127.0.0.1 netmask ff000000 
 e1000g0: flags = 1000843 <UP, BROADCAST, RUNNING, MULTICAST, IPv4> mtu 1500 index 2
         inet 192.168.0.241 netmask ffffff00 broadcast 192.168.0.255
         ether 0: 14: 4f: ae: 88: 14 
 root @ T2000 # ifconfig vsw0 plumb
 root @ T2000 # dladm show-link
 vsw0 type: non-vlan mtu: 1500 device: vsw0
 e1000g0 type: non-vlan mtu: 1500 device: e1000g0
 e1000g1 type: non-vlan mtu: 1500 device: e1000g1
 e1000g2 type: non-vlan mtu: 1500 device: e1000g2
 e1000g3 type: non-vlan mtu: 1500 device: e1000g3
 root @ T2000 # ifconfig vsw0 dhcp start
 root @ T2000 # ifconfig -a
 lo0: flags = 2001000849 <UP, LOOPBACK, RUNNING, MULTICAST, IPv4, VIRTUAL> mtu 8232 index 1
         inet 127.0.0.1 netmask ff000000 
 e1000g0: flags = 1000843 <UP, BROADCAST, RUNNING, MULTICAST, IPv4> mtu 1500 index 2
         inet 192.168.0.241 netmask ffffff00 broadcast 192.168.0.255
         ether 0: 14: 4f: ae: 88: 14 
 vsw0: flags = 1004843 <UP, BROADCAST, RUNNING, MULTICAST, DHCP, IPv4> mtu 1500 index 3
         inet 192.168.0.233 netmask ffffff00 broadcast 192.168.0.255
         ether 0: 14: 4f: f9: 29: 98 

From the output, you can see how we connected the virtual network and told it to get ip via dhcp.
Check virtual terminal services:

root@T2000 # svcs -a | grep vntsd
online 17:20:25 svc:/ldoms/vntsd:default


Making sure everything works, go to the hardware configuration for the guest OS, operations are similar to configuring the primary system

root@T2000 # ldm add-domain VMtest
root@T2000 # ldm add-vcpu 4 VMtest
root@T2000 # ldm add-memory 2G VMtest
root@T2000 # ldm add-vnet vnet1 primary-vsw0 VMtest
root@T2000 # ldm add-vdsdev /OracleVM/image vol1@primary-vds0
root@T2000 # ldm add-vdisk vdisk1 vol@primary-vds0 VMtest
root@T2000 # ldm set-var auto-boot\?=true VMtest
root@T2000 # ldm set-var boot-device=vdisk1 VMtest

All these configurations of our guest domain are hidden in these few lines, we will explain them one by one:
1 - add a domain and call it
2 - add processors to the domain
3 - add RAM
4 - add a virtual network created before and call it vnet1
5 - associate a previously created file as a device
6 - add this device as a virtual disk
7.8 - we tell the guest system to boot from it.

Next, we fix everything that happened by linking devices to the domain. And check it all out.

  root @ T2000 # ldm bind-domain VMtest

 root @ T2000 # ldm list-domain VMtest
 NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
 VMtest bound ------ 5000 8 2G             
 root @ T2000 # ldm list-bindings VMtest
 NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
 VMtest bound ------ 5000 8 2G             

 UUID
     7b0130b5-f955-c92e-ca1e-e83aeb583e35

 MAC
     00: 14: 4f: f8: 4b: 59

 HOSTID
     0x84f84b59

 CONTROL
     failure-policy = ignore
     extended-mapin space = off

 DEPENDENCY
     master = 

 CORE
     CID CPUSET
     1 (10, 11)
     2 (12, 13, 14, 15)
     3 (18, 19)

 VCPU
     VID PID CID UTIL STRAND
     0 10 1 100%
     1 11 1 100%
     2 12 2 100%
     3 13 2 100%
     4 14 2 100%
     5 15 2 100%
     6 18 3 100%
     7 19 3 100%

 MEMORY
     RA PA SIZE            
     0x8000000 0x108000000 2G

 VARIABLES
     auto-boot? = true
     boot-device = vdisk1

 NETWORK
     NAME SERVICE ID DEVICE MAC MODE PVID VID MTU LINKPROP  
     vnet1 primary-vsw0 @ primary 0 network @ 0 00: 14: 4f: fb: b5: bb 1 1500            
         PEER MAC MODE PVID VID MTU LINKPROP  
         primary-vsw0 @ primary 00: 14: 4f: f9: 29: 98 1 1500 

 DISK
     NAME VOLUME TOUT ID DEVICE SERVER MPGROUP       
     vdisk1 vol1 @ primary-vds0 0 disk @ 0 primary                      

 Vcons
     NAME SERVICE PORT
     VMtest primary-vcc0 @ primary 5000  

Now it's the turn of the installation of the Solaris itself directly on the piece of iron, for this I will use a live DVD drive, but the installation from the ISO image is also supported.
In order for our guest hardware to intercept the DVD drive, it is initially necessary to disable the service controlling it in the primary domain.

root@T2000 # svcadm disable volfs
root@T2000 # ldm unbind VMtest
root@T2000 # ldm add-vdsdev /dev/dsk/c1t0d0s2 dvd_vol@primary-vds0
Path /dev/dsk/c1t0d0s2 is not valid on service domain primary
root@T2000 # ldm add-vdsdev -q /dev/dsk/c1t0d0s2 dvd_vol@primary-vds0
root@T2000 # ldm add-vdisk vdisk_dvd_media dvd_vol@primary-vds0 VMtest


In these commands, we specify the guest OS, that now it will be used as a live DVD disc, and we do it with the q key, because sometimes without it. Next, we bind the iron to the guest domain again, but also using the q option and start.

root@T2000 # ldm bind -q VMtest
root@T2000 # ldm start VMtest
LDom VMtest started


Next we need to connect via telnet to the port designated in advance and continue the installation.

  root @ T2000 # telnet localhost 5000
 Trying 127.0.0.1 ...
 Connected to localhost.
 Escape character is '^]'.

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

 {0} ok 
 {0} ok devalias
 vdisk_dvd_media / virtual-devices @ 100 / channel-devices @ 200 / disk @ 1
 vdisk1 / virtual-devices @ 100 / channel-devices @ 200 / disk @ 0
 vnet1 / 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 boot vdisk_dvd_media: f
 Boot device: / virtual-devices @ 100 / channel-devices @ 200 / disk @ 1: f File and args: 
 SunOS Release 5.10 Version Generic_120011-14 64-bit
 Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.
 Use is subject to license terms. 


And then, if everything goes well, we will get another OS on our hardware.
Thank you all for your attention.

Source: https://habr.com/ru/post/126667/


All Articles