Configure Host for LDOM
Installing guest domains Oracle Virtual server LDOM
If you are starting with a new SPARC System upgrade the firmware
There are many ways to skin a cat, Depending what you want accomplish. If you wan tto be able to live migrate your VM to another Host, choose option B below. Option C is preferred with one LUN and many VM but does not allow live migration. Easiest setup but not recommended for production is option A.
A-Create disk file in a Large LUN. You can have many VM's on this LUN.
1. create a disk image file
# mkfile -n 30g /vmdsk/disk0.img
2. define vdisk to be done in each server from the pool
# ldm add-vdsdev /vmdsk/disk0.img vol0@vds0
B-for faster IO and best redundancy one LUN per VM
from luxadm probe get logical path
2. define vdisk to be done in each server from the pool
# ldm add-vdsdev /dev/rdsk/c0t60A9800044314F6C54244648362D3048d0s2 vol1@vds0
C- use zfs with zpool on LUN no live migration
zpool create ldompool /dev/rdsk/c3t500A098188567155d5
zfs create ldompool/somass
zfs create -V 30g ldompool/somass/OSsomass
Now that you decided how to use your storage we setup the guest Domains or VM's.
Using my preferred choice allows live migration of VMs
create a guest domain named somass.
# ldm add-domain somass
add eight virtual CPUs to guest domain.
# ldm add-vcpu 2 somass
# ldm add-memory 2G somass
set properties on domain
#ldm set-var auto-boot\?=true somass
Previous section option B One LUN per VM for HA for each server on the pool
find disks with luxadm probe and use the Node WWN for luxadm display "Node WWN"
# luxadm probe
No Network Array enclosures found in /dev/es
Found Fibre Channel device(s):
Node WWN:500a098088567155 Device Type:Disk device
Logical Path:/dev/rdsk/c3t500A098188567155d0s2
Logical Path:/dev/rdsk/c3t500A098198567155d0s2
~# luxadm display 500a098088567155 | less
DEVICE PROPERTIES for disk: 500a098088567155
Vendor: NETAPP
Product ID: LUN
Revision: 820a
Serial Num: D1OlK+FYPaUI
Unformatted capacity: 512078.000 MBytes
Read Cache: Enabled
Minimum prefetch: 0x0
Maximum prefetch: 0x0
Device Type: Disk device
Path(s):
/dev/rdsk/c3t500A098188567155d0s2
Once you have match the serial numbers to the /dev/rdsk and size.
# ldm add-vdsdev /dev/rdsk/c3t500A098188567155d0s2 OSsomass@vds0
#ldm add-vdsdev /dev/rdsk/c3t500A098198567155d3s2 Datasomass@vds0
Note that all servers where the VM are to be migrated have to have the same vdsdev and vol name. You cannot copy and paste from one Host server to another Host if you are trying to do live migration, each host sees the iSCSI dev different. So the /dev/rdsk/ are different.
# ldm add-vdisk OSsomass OSsomass@vds0 somass
check for you new drives with ldm in both hosts servers for Volumes to and vsd to be the same.
#ldm ls-constraints
...
VDS
NAME VOLUME OPTIONS MPGROUP DEVICE
vds0
sol11.2 /iso/sol-11_2-text-sparc.iso
OSsomass /dev/rdsk/c3t500A098188567155d5s2
Datasomass /dev/rdsk/c3t500A098198567155d3s2
# ldm set-var boot-device=OSsomass somass
For a VLAN tags configure the tagged VLAN with vid. Configured the same for all servers to host the VM. if you are not using Vlans leave out the pvid and vid. No need for a VLAN on guest eaither.
# ldm add-vsw pvid=1 vid=3,8 net-dev=net2 chis2-vsw primary
# ldm add-vnet pvid=1 vid=3,8 vnet2 chis2-vsw somass
Once again use ldm ls-constraints to see that your setting match on both servers for live migration.
# ldm ls-constraints
DOMAIN
primary
......
VSW
NAME MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE INTER-VNET-LINK
chis2-vsw net2 1 switch@1 1 1 3,8
DOMAIN
somass
........
NETWORK
NAME SERVICE ID DEVICE MAC MODE PVID VID MTU MAXBW LINKPROP
vnet2 chis2-vsw 0 1 3,8
Check for correct VLAN to be configured and same names on VSW (virtual switch server) in both servers for live migration.
# ldm bind-domain somass# ldm list-domain somass
Install OS from iso create a temporary device and attached to VM. I download and stored the iso on a folder I can add this iso as a virtual device disk, Keep it as a device for future installations.
#ldm add-vdsdev /vmdsk/sol-11_2-text-sparc.iso iso@vds0
#ldm add-vdisk s11-dvd iso@vds0 somass
Start the guest domain
# ldm start somass
Check CONS number with
#ldm ls
NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME
somass active -n---- 5000 2 8G 0.9% 0.9%
#telnet localhost 5000
{0} ok devalias
find disk with label s11-dvd
{0} ok boot s11-dvd
Configure as it suits your needs. If you are using VLANs then you need to configure as indicated below.
On guest domain VM somass:
# dladm create-vlan -l net0 -v3
# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net3000 vlan 1500 up net0
# ipadm delete-ip net0
# ipadm create-addr -T static -a 192.168.1.3/24 net3001
remove iso after installation
#ldm remove-vdisk s11-dvd somass
user format to find drive inside vm and create a new zpool. This is Datasomass@vds0
~# format
Searching for disks...done
c1d2: configured with capacity of 2048.00GB
AVAILABLE DISK SELECTIONS:
0. c1d1 <NETAPP-LUN-820a-30.00GB>
/virtual-devices@100/channel-devices@200/disk@1
1. c1d2 <NETAPP-LUN-820a-2.00TB>
/virtual-devices@100/channel-devices@200/disk@2
Specify disk (enter its number):
#zpool create data c1d2
# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
data 1.98T 118K 1.98T 0% 1.00x ONLINE -
rpool 29.8G 10.3G 19.4G 34% 1.00x ONLINE -
#ldm migrate somass my-secondhost'
If you want to authenticate against AD
If you need to use gnome or the desktop package
Monitor your server with nagios
No comments:
Post a Comment