Presentation is loading. Please wait.

Presentation is loading. Please wait.

Version 1.0 – January 27th, 2009 IT Infrastructure Engineering Author: Asim Zuberi Alcatel-Lucent: SUN Virtualization Implementations (Concepts & Details)

Similar presentations


Presentation on theme: "Version 1.0 – January 27th, 2009 IT Infrastructure Engineering Author: Asim Zuberi Alcatel-Lucent: SUN Virtualization Implementations (Concepts & Details)"— Presentation transcript:

1 Version 1.0 – January 27th, 2009 IT Infrastructure Engineering Author: Asim Zuberi Alcatel-Lucent: SUN Virtualization Implementations (Concepts & Details)

2 Good Evening! Page 2

3 Basic Concepts…

4 Basic Concepts: Sun Zones Page 4

5 Basic Concepts: Sun Zones Page 5 What is the purpose/meaning of the Russian Dolls? The technique of creating objects inside objects.

6 Basic Concepts: Sun Zones Page 6 The objective of virtualization: is to increase the level of utilization in pursuit of more value, efficiency and affordability

7 Basic Concepts: Sun Zones Page 7 Solaris Zones technology, a way to virtualize system resources and use multiple software partitions with one instance of the OS. The Solaris Containers functionality comprises two main components, Solaris Zones partitioning technology and Resource Management tools. The Solaris Zones feature enables the administrator to create separate environments for running applications, while the Resource Management framework allows for the allocation, management, and accounting of system resources such as CPU and memory. Solaris Containers functionality is hardware independent and is available on any machine that will support the Solaris 10 OS.

8 Basic Concepts: Sun Zones Page 8 Two types of zones exist: global and non-global. A machine with the Solaris Zones feature enabled has one global zone and up to 8191 non-global zones. Each zone has an ID assigned by the system when it's booted with the global zone, always listed as zone ID 0. Only the global zone contains a bootable Solaris kernel and is aware of all devices, file systems, and other zones. The global zone is also the only zone from which non-global zone configuration, installation, and management are possible. Non-global zones contain a subset of the Solaris OS installed in the global zone and possibly additional packages not installed in the global zone. Each non-global zone has its own package database listing each software package installed relative to the zone and does not share package information with the global or other non-global zones.

9 Basic Concepts: Sun Zones Page 9

10 Solaris 10 Native Zones

11 Solaris 10: Native Zones Page 11 Step 1 to Solaris Zones - Creating Zones 1.login to a system as root 2. check the current status of the zones using zoneadm command # zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared a clean system without any non-global zones installed. 3. check the interface name (e.g. ce0, ce4, gbe0, etc) 3. create a basic zone with IP address 192.168.1.1; netmask 255.255.255.0 zonecfg -z zone1 zone1: No such zone configured Use 'create' to begin configuring a new zone. zonecfg:zone1> create -b zonecfg:zone1> set autoboot=true Zonecfg:zone1> set zonepath=/zones/zone1 zonecfg:zone1> add net zonecfg::zone1> set address=192.168.1.1/24 zonecfg:zone1:net> set physical=ce0 zonecfg:zone1:net> end zonecfg:zone1> verify zonecfg:zone1> commit zonecfg:zone1> exit

12 Solaris 10: Native Zones Page 12 For autoboot to function, the zone service needs to be enabled. 'svcs' can be used to check the status. # svcs –a | grep zones online 11:33:06 svc:/system/zones:default The result above shows that the zone service is enabled. If the result is otherwise (disabled), it can be enabled using the 'svcadm' command as below # svcadm enable svc:/system/zones:default 4.Change the permissions on zones home dir # chmod 700 /zones/zone1 5. After the 'exit' step, the zone1 zone is now in 'configured' state. # zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared - zone1 configured /zones/zone1 native shared 6. The next step is to install the zone. Below is a list of steps: # zoneadm -z zone1 install

13 Solaris 10: Native Zones Page 13 Preparing to install zone. Creating list of files to copy from the global zone. Copying files to the zone. Initializing zone product registry. Determining zone package initialization order. Preparing to initialize packages on the zone. Initializing package of : percent complete: 12% 7. At this state, the state of zone1' zone is incomplete # zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared - zone1 incomplete /zones/tz native shared 8. Wait till initialize package is done, the status will change to 'installed' as shown below # zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared -zone1 installed /zones/tz native shared 9. next change the status to 'ready' using (This is like powering the server without booting up) # zoneadm -z zone1 ready 10. issue the boot command to the zone (just like powering up the server) # zoneadm -z zone1 boot

14 Solaris 10: Native Zones Page 14 11. command below will connect to the console # zlogin -C zone1 12.Since this is the first time that this zone is being booted up, some initial configurations needs to be performed 13.After the reboot, the root prompt will appear and ready for login 14. Checking the interface # ifconfig -a ce0: flags=1000843 mtu 1500 index 2 inet 192.168.1.2 netmask ffffff00 broadcast 135.1.211.255 ether 0:14:4f:ad:46:e2 ce0:1: flags=1000843 mtu 1500 index 2 zone zone1 inet 192.168.1.1 netmask ffffff00 broadcast 135.1.211.255 ce0:2: flags=1000843 mtu 1500 index 2 zone zone3 inet 192.168.1.3 netmask ffffff00 broadcast 135.1.211.255

15 Solaris 10: Native Zones Page 15 15. To shutdown the zone, issue the command (assuming from global zone): # zlogin zone1 shutdown -y -i0 -g0 (remember the console terminal you've? Look at that and you'll see the interesting following) # zoneadm –z zone1 halt

16 Solaris 10: Native Zones Lessons Learned From Experience Page 16 zonecfg:zone1> create –b The -b option would make non-global zone completely independent of the global zone. Also known as whole root zone. By default, zonecfg:zone1> create command creates spares root zones by inheriting following package dirs: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr

17 Solaris 10: Native Zones Lessons Learned From Experience Page 17 zonecfg:zone1> set zonepath=/zones/zone1 Set zonepath=/zones/zone1 on a dedicated LUN or Disk. Create a ufs filesystem on /zones/zone1 Encapsulate the /zones/zone1 under VRTS control for redundancy or clustering.

18 Solaris 10 Branded Zones

19 Solaris 10: Branded Zones ( Solaris 8 ) Page 19 Creating the Image for Directly Migrating Solaris 8 Systems Into Zones s8-system # flarcreate -S -n s8-system /net/s10system/export/s8-system.flar Determining which filesystems will be included in the archive... Creating the archive... cpio: File size of "etc/mnttab" has increased by 435 2068650 blocks 1 error(s) Archive creation complete.

20 Solaris 10: Branded Zones (Solaris 8) Page 20 Installing the Solaris 8 Migration Assistant 1.0 Software on the Solaris 10 Host System global# patchadd -G 127111-01 patchadd -p | grep 127111-01 Install the packages SUNWs8brandr and SUNWs8brandu in the following order. # pkgadd -d /path/to/media SUNWs8brandr # pkgadd -d /path/to/media SUNWs8brandu

21 Solaris 10: Branded Zones (Solaris 8) Page 21 zonecfg -z zone2 zonecfg:zone2> create -t SUNWsolaris8 zonecfg:zone2> set zonepath=/zones/zone2 zonecfg:zone2> set autoboot=true zonecfg:zone2> add net zonecfg:zone2:net> set address=10.6.10.23/23 zonecfg:zone2:net> set physical=bge0 zonecfg:zone2:net> end zonecfg:zone2> add fs zonecfg:zone2:fs> set type=lofs zonecfg:zone2:fs> set special=/share/zone/zone2 zonecfg:zone2:fs> set dir=/export/shared zonecfg:zone2:fs> end zonecfg:zone2> add attr zonecfg:newzone:attr> set name=hostid zonecfg:zone2:attr> set type=string zonecfg:newzone:attr> set value=8325f14d zonecfg:zone2:attr> end zonecfg:zone2> verify Commit the zone configuration for the zone. zonecfg:zone2> commit zonecfg:zone2> exit global# zonecfg -z zone2 info

22 Solaris 10: Branded Zones (Solaris 8) Page 22 global# zoneadm -z zone2 install -u -a /net/server/s8_image.flar global# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared - zone2 configured /export/home/zone2 solaris8 shared global# zoneadm -z my-zone uninstall global# zoneadm list -cv global# zoneadm -z zone2 boot global# zoneadm list –v

23 Solaris 10: Branded Zones (Solaris 9) Page 23 Installing the Solaris 9 Migration Assistant 1.0 Software on the Solaris 10 Host System global# patchadd -G 127111-01 patchadd -p | grep 127111-01 Install the packages SUNWs9brandr and SUNWs9brandu in the following order. # pkgadd -d /path/to/media SUNWs9brandr # pkgadd -d /path/to/media SUNWs9brandu # pkgadd –d /path/to/media SUNWs9brandk

24 Solaris 10: Branded Zones (Solaris 9) Page 24 zonecfg -z zone3 zonecfg:zone3> create -t SUNWsolaris9 zonecfg:zone3> set zonepath=/zones/zone3 zonecfg:zone3> set autoboot=true zonecfg:zone3> add net zonecfg:zone3:net> set address=10.6.10.23/23 zonecfg:zone3:net> set physical=bge0 zonecfg:zone3:net> end zonecfg:zone3> add fs zonecfg:zone3:fs> set type=lofs zonecfg:zone3:fs> set special=/share/zone/zone3 zonecfg:zone3:fs> set dir=/export/shared zonecfg:zone3:fs> end zonecfg:zone3> add attr zonecfg:newzone:attr> set name=hostid zonecfg:zone3:attr> set type=string zonecfg:newzone:attr> set value=8325f14d zonecfg:zone3:attr> end zonecfg:zone3> verify Commit the zone configuration for the zone. zonecfg:zone3> commit zonecfg:zone3> exit global# zonecfg -z zone3 info

25 Solaris 10: Branded Zones ( Solaris 9 ) Page 25 Creating the Image for Directly Migrating Solaris 8 Systems Into Zones s9-system # flarcreate -S -n s9-system /net/s10system/export/s9-system.flar Determining which filesystems will be included in the archive... Creating the archive... cpio: File size of "etc/mnttab" has increased by 435 2068650 blocks 1 error(s) Archive creation complete.

26 Solaris 10: Branded Zones (Solaris 9) Page 26 global# zoneadm -z zone3 install -u -a /net/server/s9_image.flar global# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared - zone3 configured /export/home/zone3 solaris9 shared global# zoneadm -z my-zone uninstall global# zoneadm list -cv global# zoneadm -z zone3 boot global# zoneadm list –v

27 Solaris 10: Branded Zones (Solaris 8 & 9) Page 27

28 Solaris 10: Branded Zones (Solaris 10 unsupported) Page 28 1. Create the directory structure: /usr/lib/brand/solaris10 /usr/lib/brand/solaris10/mods /usr/lib/brand/solaris10/files /usr/lib/brand/solaris10/files/patches 2. Copy the files from the native brand and the Solaris 9 brand (paths are relative from /usr/lib/brand/), as shown in Table 1. SourceDestination native/config.xmlsolaris10/config.xml native/platform.xmlsolaris10/platform.xml native/postclonesolaris10/postclone solaris9/s9_installsolaris10/s10_install solaris9/s9_servicetagsolaris10/s10_servicetag solaris9/s9_supportsolaris10/s10_support solaris9/s9_p2vsolaris10/s10_p2v solaris9/s9_systemsolaris10/s10_system solaris9/mods/S20_install_patchessolaris10/mods/S20_install_patches solaris9/mods/S3*_*solaris10/mods/S3*_* solaris9/files/patches/ordersolaris10/files/patches/order

29 Solaris 10: Branded Zones (Solaris 10 unsupported) Page 29 3. Edit the information in the following files: a. In config.xml: Replace brand name=native with brand name=solaris10. Replace /usr/lib/lu/lucreatezone -z %z with /usr/lib/brand/solaris10/s10_install %z %R %*. Replace with a:d:DhpsuvV. Replace with /usr/lib/brand/solaris10/s10_support verify. b. In platform.xml, create an additional entry for the loopback mounting of the /usr file system (which is necessary for applying the modifications later on) during bootup by adding the following: c. In s10_install, s10_servicetag and s10_system, replace all occurrences of Solaris9 and s9 with Solaris10 and s10, respectively. d. In s10_p2v: Replace all occurrences of Solaris9 and s9 with Solaris10 and s10, respectively. Comment out the part concerning the s9_preload.so.1 library, since this library is not required for Solaris 10 zones.

30 Solaris 10: Branded Zones (Solaris 10 unsupported) Page 30 4. Now that the brand has been created, a Solaris 10 branded zone can be configured: zonecfg -z 10_zone01 create set autoboot=true set zonepath=/zones/zone4 set brand=solaris10 add net set physical=hme0 set address=10.0.0.1/24 end remove inherit-pkg-dir verify commit The configured zone can now be installed using a flash archive (/tmp/solaris10.flar): zoneadm -z 10_zone01 install -p -a /tmp/solaris10.flar

31 Solaris 10: Branded Zones (Solaris 10 unsupported) Page 31 4. Now that the brand has been created, a Solaris 10 branded zone can be configured: zonecfg -z 10_zone01 create set autoboot=true set zonepath=/zones/zone4 set brand=solaris10 add net set physical=hme0 set address=10.0.0.1/24 end remove inherit-pkg-dir verify commit The configured zone can now be installed using a flash archive (/tmp/solaris10.flar): zoneadm -z 10_zone01 install -p -a /tmp/solaris10.flar

32 Solaris 10: Zones Migration Page 32 zoneadm –z zone1 halt zoneadm –z zone1 detach cd /zones tar cvf zone1.tar zone1 gzip -9 zone1.tar scp zone1.tar.gz root@remotehost:/zones scp /etc/zones/zone1.xml root@remotehost:/etc/zones/zone1.xmlroot@remotehost:/etc/zones/zone1.xml On the remote host: cd /zones gzip –c –d zone1.tar.gz | tar xvf – zonecfg –z zone1 create –a /zones/zone1 commit exit

33 Solaris 10: Zones Administration Page 33 zoneadm –z zone1 boot zoneadm –z zone1 halt zlogin –C zone1 zonecfg –z zone1 info zoneadm -z zone1 uninstall zonecfg -z zone1 delete rm -r /zones/zone1 zonecfg -z zone1 zonecfg:zone2: add fs zonecfg:zone1:fs> set type=zfs zonecfg:zone1:fs> set special=share/zone/s8-zone zonecfg:zone1:fs> set dir=/export/shared zonecfg:zone1:fs> end zonecfg:zone1> add attr zonecfg:zone1:attr> set name=hostid zonecfg:zone1:attr> set type=string zonecfg:zone1:attr> set value=8325f14d zonecfg:zone1:attr> end zonecfg:zone1> verify zonecfg:zone1> commit zonecfg:zone1> exit

34 Solaris 10: Zones Administration Page 34 zonecfg -z zone1 zonecfg:zone2:> select fs special=/local zonecfg:zone2: >add option ro end verify commit

35 Solaris 10: Sun Virtual Farm Page 35

36 Trigence Capsules

37 Page 37 With Trigence Application Capsules, enterprises run their applications where they want, when they want and how they want. Trigence Capsule packages OS into an application capsule, creating a discrete object that defines and contains an application. A capsule is a secure environment. Decouples the application from the underlying infrastructure. Legacy Solaris vers supported: Solaris 9, Solaris 8, Solaris 7, Solaris 2.6 Trigence Capsule consists of two software components: Capsule Creator – an interactive utility that packages the desired application into capsules Capsule Controller – a lightweight component that is installed on each server enabled to run Capsule with runtime support and management interfaces.

38 Trigence Capsules Page 38 1. How to create cpio archive using the find cmd ============================================= For root; cd /; find. -depth -xdev | cpio -oc | gzip | dd of=${filename.root}.cpio.gz For var (if /var is a separate filesystem) cd /var;find. -depth -xdev | cpio -oc| gzip|dd of=${filename.var}.cpio.gz For opt (if /var is a sepate filesystem) cd /opt;find.-depth -xdev | cpio -oc | gzip |dd of=${filename.opt}.cpio.gz 2. Uncpio the archives =================== cpio –i filename.cpio

39 Trigence Capsules Page 39 Creator:

40 Trigence Capsules Page 40 Creator:

41 Trigence Capsules Page 41 Creator:

42 Trigence Capsules Page 42 Creator:

43 Trigence Capsules Page 43 Creator:

44 Trigence Capsules Page 44 Creator:

45 Trigence Capsules Page 45 Creator:

46 Trigence Capsules Page 46 alameda-tst# trictrl list Name Type Activated State =================================== =========== hostfs HostFS Docked bolt Virtualized * Started dudley Virtualized Started snarg Virtualized * Started zeus Virtualized Started Alameda-tst # ifconfig –a ce4:11: flags=1000843 mtu 1500 index 2 inet 135.1.45.2 netmask ffffff00 broadcast 135.1.45.255 ce4:12: flags=1000843 mtu 1500 index 2 inet 135.1.45.165 netmask ffffff00 broadcast 135.1.45.255 ce4:13: flags=1000843 mtu 1500 index 2 inet 135.1.45.173 netmask ffffff00 broadcast 135.1.45.255 ce4:14: flags=1000843 mtu 1500 index 2 zone charger inet 135.1.44.149 netmask ffffff00 broadcast 135.1.44.255

47 Trigence Capsules Page 47 alameda-tst# cd /capsules alameda-tst# ls bolt bolt.con.cc08w37b snarg zeus.con.cc08w21d bolt.con dudley snarg.con bolt.con.cc08w33d dudley.con.cc08w33d zeus

48 Transitive: QuickTransit

49 Page 49 Transitive's QuickTransit cross-platform virtualization allow applications created for one CPU and OS to run on different platforms. Support legacy Solaris vers: Solaris 9, Solaris 8, Solaris 7, Solaris 2.6 & Solaris 2.5.1

50 Transitive: QuickTransit Page 50 Two commands: runsparc linksparc Sample Output -bash-3.1$ uname -a Linux usilnw1asp 2.6.18-92.1.10.el5 #1 SMP Wed Jul 23 03:56:11 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux -bash-3.1$ runsparc runsparc: Warning. The current working directory is not visible from the VSE, changing to VSE "/" bash-3.00$ uname -a SunOS usilnw1asp 5.10 CO_TB08Q3BHF_BASELINE_0013 sun4u sparc SUNW,Ultra-Enterprise bash-3.00$

51 Thank You! Page 51


Download ppt "Version 1.0 – January 27th, 2009 IT Infrastructure Engineering Author: Asim Zuberi Alcatel-Lucent: SUN Virtualization Implementations (Concepts & Details)"

Similar presentations


Ads by Google