Transcript

Introduction, Requirements and Configuring for the Zone Installation

>> Mick:  Hello and welcome to SkillBuilders. This is a tutorial concerning the installation of Solaris Kernel Zones. 

 

[pause]

 

Zones are an integrated part of the Solaris operating system which is owned and developed by Oracle. Both Solaris 10 and Solaris 11 support zones which up till now have been very lightweight virtual machines using the same kernel as is running on the host system known as the global zone. These are also sometimes referred to as containers. 

 

However, since Solaris 11.2, kernel zones have been available which allows you to run independent versions of the operating system with their own kernel within the global zone. This is the first time this has been possible, so you can maintain zones at different software level, different patch level, if you like, along with other facilities such as the ability to suspend and resume them perhaps on the same or different machine so you can migrate kernel zones, assuming you can allocate shared storage between systems. 

 

[pause]

 

You do need fairly up-to-date, fairly powerful hardware to support this. In terms of SPARC servers which are another Oracle product line, you need anything between a T4 and T7 or an M7. Note the firmware revisions that are detailed on this page. 

 

You can also run kernel zones on Intel architecture assuming that the resources are sufficient and you would need to make sure that the BIOS/EFI has CPU virtualization enabled. You also need a fair amount of RAM and a minimum of 8 gigabytes is recommended for the host system or global zone, if you like. 

 

[pause]

 

You do need software package installed which we can see on the right-hand side. Let me introduce you to Solaris 11.3 system called BUZZ. Solaris 11.3 is the latest version of the Oracle Solaris software. I’m logged in as root which some of you may argue against but of course, if your best practice is to use pseudo, then you can use that. Let’s have a look, make sure the package is installed. 

 

[pause]

 

There we can see the output from the package list command and if you look over to the right-hand side, note the information under the IFO heading, I in that first column means the package is installed. If it were not, then if you look on the left-hand side, you can do the package install brand Solaris kz command to install it. 

 

[pause]

 

You may also want to check to make sure that your system actually does support kernel zones. And the way to do that is to type virtinfo. And there we can see non-global zones are supported which is the normal, if you like, run-of-the-mill zones and kernel zones are supported as well. If that doesn’t come out then you cannot install a new kernel zones. 

 

[pause]

 

Note how the example on the bottom on the left-hand page there shows that you can even run kernel zones on a VMware guest running Solaris 11, 11.2, or 3 but you need to enable nested virtual machines within your ESXI VMware host. 

 

[pause]

 

You may also need to do a bit of tweaking with the Solaris memory management to limit the size of something called the ZFS ARC cache. ARC cache is where if caching read data from disk in memory and it’s called the Adaptive Replacement or Adaptive Responsive Cache. It uses a lot of free memory to be as efficient as possible, which theoretically will free up if something else requires it. 

 

[pause]

 

It might be an issue however that the speed with which the memory is actually freed up so you might have to set a kernel parameter which I’ll show you towards the end of the session rather than getting involved in it now. 

 

Now let’s begin configuring our kernel zone over on buzz here. And we would use the zone CFG command to do that, which might be familiar to some of you who have configured ordinary zones in the past. I’m going to call this zone kzone1. 

 

[pause]

 

Get the option correct. 

 

[pause]

 

When I do create -t that’s specifying a type of zone. Normally, for one of the mill zone I just type “create.” This is known as a branded zone so it’s a little bit out of the ordinary and it’s called sys Solaris kzone. There’s very little in fact required to configure the zone. 

 

[pause]

 

Believe it or not, that’s all I need to do. I could use other parameters, for example, to specify alternative storage, to specify additional resource controls like RAM and like CPU and another things but just to create a basic kernel zone, that’s all you need to do. Okay. 

 

By default if you look down on the slide here on the left-hand side, using Solaris 11.3 and that by default will give a template size of 4 bit virtual CPUs and 4 gigs of RAM. So that doing sys Solaris kz, I could in fact do sys Solaris kz minimal which will cut things down to one 1 VCPU and 1 gig of RAM. 

 

Also, the system we use, ZFS emulated volume. For more information on that then have a look at Solaris documentation and it will use ZFS emulated volume by default as its disk device which will set 18 gigs. Again, that can be changed and I’ll give you an example very shortly.

Copyright SkillBuilders.com 2017

×
Transcript

Demonstration: Installing the Kernel Zone

>> Mick:  Having configured the zone, we can now install it and we have a number of choices that we can use to configure the zone. 

 

Firstly, we can do something called a direct install where we don’t need any external media and it would take the current package settings from the global zone. We could use an ISO image of Solaris 11 and we could install from that. So we could do a basic straightforward install of a completely independent machine or we could use something called a unified archive which is another new Solaris 11 feature, which is an image of a system taken for backup or cloning purposes and which will be the subject of a later tutorial. 

 

[pause]

 

Now we’re going to install the zone. 

 

[pause]

 

Keeping our fingers’ crossed that everything is okay. If there are problems with memory like the ARC cache for example, or we don’t have sufficient resource, that won’t be apparent until we’ve actually tried to boot the zone having installed it. And I can show you an example of some of the errors that you may get. So the zone install will click along for about 15 minutes and so I’ll pause the recording for now and come back in a few minutes time. So you should see me re-appear fairly instantly. 

 

[pause]

 

Okay, the zone installation here on the right-hand side in the terminal window seems to be progressing fairly nicely. Over on the left-hand side here is just a couple of notes about the storage that I can go through while the installation is progressing. 

 

By default the system will allocate a ZFS emulated volume under this location here, rpool/VARSHARE/zones/kzone1/disk0 and the install signs would be 18 gigabytes. If you look just above here you can see a zoneadm install command that specifies an alternate size of 15 gigabytes. 

 

It’s possible to allocate alternative storage of course which you may want to do on an external device which may also be a shared device like a SAN lan or SCSI lan or maybe even an NFS mounted file system. 

 

[pause]

 

Being able to configure alternative storage is an important thing and it’s a slight technical challenge. It’s a little bit different to normal run of the mill zones and those sort of techniques together with full details of Solaris Kernel Zones are covered on our Solaris New Features Training and also the Solaris 11 Advanced Administration Course. Just move on a little bit more. 

 

Once we finish the install, we then boot the zone and we can log into the console device where we will then be asked to do system configuration. 

 

[pause]

 

The installation’s done now if you look on the right-hand side you can see it took nearly 900 seconds, just very slightly short of 15 minutes. So we can get on and boot the new zone and configure it.

Copyright SkillBuilders.com 2017

×
Transcript

Demonstration: How to Boot the Zone

>> Mick:  When we start to boot, we can also then connect to the console device and the reason I’m doing the command as you can see there on the right-hand side, the semi-colon and then the z log in. The z log in happens immediately. The prompt comes back from the boot command and I don’t miss anything coming out on the console. 

 

[pause]

 

That’ll continue for a while. The numbers that you can see racking up there are something called the service management facility, SMF that is, service manifest imports. All the system services – Chrome, printing what have you, NFS server etc., etc. All the system services that run on the system are defined in XML files which are imported once only the first time the system is booted after an install. 

 

Once the system is configured itself it may actually reboot. While that’s going on, there we can see and it’s consistency in the boot archive. That’s a fairly standard thing for some reason but it will come back and reboot perfectly okay. I don’t know whether it’s a bug or whether it’s just a feature. 

 

[pause]

 

While it’s happening, let me show you another terminal window. Here’s a kernel zone boot after an install on a machine that doesn’t have the operating system management tweaks that I talked about and I’ll describe very shortly and you can see it’s failed. There’s not enough space. There may be but maybe the ZFS ARC cache didn’t get trimmed quickly enough. 

 

The system is now coming up. The system has now entered the configuration tool. If I press F2, I can then enter my machine name. I’ll call it woody (without a capital, actually). F2. Manually configure the network. 

 

[pause]

 

I won’t bother with DNS at the moment or any other name services. Continue quickly with the rest of the configuration. 

 

I’m in England. Date and time. Keyboard, very important. UK English, otherwise, my pipes and my quotes will get mixed up. Root password. I don’t want an optional account. I don’t want to register with Oracle or [3:03 inaudible] and I don’t need to specify a proxy server because I’m not registering with Oracle. 

 

That’s the configuration completed. Now when I press F2, it goes back to the remainder of the boot process for my new zone and very shortly that will come up with the log in prompt and I can log in and start configuring, start adding my applications and so forth. 

Copyright SkillBuilders.com 2017

×
Transcript

Tips, Helpful Hints and Best Practices

>> Mick:  We’re almost finished but just a couple of little tips. Here’s how you can install using pre-configuration rather than going through that process I just showed you on the screen. I can actually create and XML file containing all that config data using the sysconfig utility. 

 

Secondly, I can actually install the zone using an ISO so I can do a full normal Solaris install. 

 

Then lastly, I can use something called the unified archive but I would’ve created another zone or another system in order to deploy the system that I’ve just done. 

 

And then lastly, here’s some information about the memory management tweak that I showed you earlier. At one time, you could actually set the size of the ARC cache or you could limit the size of the ARC cache. But Oracle now recommend instead using this hint parameter that you can see. Set use the reserve hint PCT = and then the percentage of the RAM. This is supposed to inform Solaris that you need at least 60% of the system reserved for applications. 

 

There’s a lot more to it and there might be considerations on any given server about what is available and what is not. There’s a little reference if you log into my Oracle support. You can look for this document ID, 1663862.1 and that will tell you all about it or alternatively just Google that set user_reserve_hint_pct=60 and you’ll easily find the link to my Oracle support. 

 

[pause]

 

That just about wraps up the tutorial presented to you by SkillBuilders who have vast resources for Oracle expertise as well as Solaris and Linux. I hope you enjoyed that tutorial. Look out for more. 

 

Lastly, just to let you know that if you’re going to use Solaris in any sort of commercial sense, you do need an appropriate license. You can use it for demonstration and development purposes on one system but for commercial use, you need to purchase Premier Support. Thank you very much for your time.

 

 

Copyright SkillBuilders.com 2017

×
Free Online Registration Required

The tutorial session you want to view requires your registering with us.

It’s fast and easy, and totally FREE.

And best of all, once you are registered, you’ll also have access to all the other 100’s of FREE Video Tutorials we offer!

 

×