Solaris10 zone virtualization instance Configuration

Source: Internet
Author: User

Description

(1) The solaris zone is equivalent to solaris virtualization. It is also one of oracle's virtualization solutions on the solaris platform.
(2) solaris zone is divided into sparse root zone and full root zone. Simply put, sparse root zone shares programs and files in the host file system, and the core files and libraries are read-only, the occupied space is small. A solaris operating system file is completely copied in the root region, and the operating system is completely independent. This document creates a complete root zone.

1. Create a zfs file system directory and prepare to create a zone

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013236323-0.png "height =" 88 "/>

Create an rpool/vmtest01-zfs file system and mount it to/vmtest01.

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013235S3-1.png "height =" 191 "/>

2. Create vmtest01 full zone (1) the configuration process is as follows:
[Root @ node2:/] # zonecfg-z vmtest01vmtest01: this region is not configured. Use 'create' to start configuring the new region. Zonecfg: vmtest01> zonecfg: vmtest01> create-bzonecfg: vmtest01> set zonepath =/strong: vmtest01> set autoboot = strong: vmtest01> set scheduling-class = strong: vmtest01> zonecfg: vmtest01> add netzonecfg: vmtest01: net> set physical = e100020.zonecfg: vmtest01: net> set address = 192.168.233.200zonecfg: vmtest01: net> set defrouter = Supervisor: vmtest01: net> endzonecfg: vmtest01> zonecfg: vmtest01> add capped-memoryzonecfg: vmtest01: capped-memory> set physical = 512 Mzonecfg: vmtest01: capped-memory> set swap = 1024 Mzonecfg: vmtest01: capped-memory> set locked = 512 Mzonecfg: vmtest01: capped-memory> endzonecfg: vmtest01> zonecfg: vmtest01> commitzonecfg: vmtest01> exportcreate-bset zonepath =/vmtest01set autoboot = trueset parent-class = FSSset ip-type = sharedadd netset address = paiphysical = includefrouter = 192.168.233.2endadd capped-memoryset physical = 512 mendical name = zone. max-swapadd value (priv = privileged, limit = 1073741824, action = deny) endadd rctlset name = zone. max-locked-memoryadd value (priv = privileged, limit = 536870912, action = deny) endzonecfg: vmtest01> verifyzonecfg: vmtest01> exit [root @ node2:/] #

After creation, the vmtest01.xml configuration file is created in the/etc/zone directory.

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/201323O29-2.png "height =" 670 "/>

(2) Start copying and installing the File System

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013235K0-3.png "height =" 198 "/>

(3) Start vmtest01 Virtual Machine

The status of the vmtest01 VM is displayed.

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013235F1-4.png "height =" 127 "/>

CONFIGURED) INCOMPLETE is not complete) INSTALLED is INSTALLED) READY) RUNNING is RUNNING) SHUTTING_DOWN is disabled) DOWN when the standard non-global area is started, the region goes through the following status: CONFIGURED-> INSTALLED-> READY-> RUNNING
(4) log on to the vmtest01 VM console for system configuration.

Install the SDK step by step until the installation is complete.

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/201323CE-5.png "height =" 441 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013233D9-6.png "height =" 243 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013232934-7.png "height =" 299 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013235462-8.png "height =" 294 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013236413-9.png "height =" 294 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/201323CD-10.png "height =" 292 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013236219-11.png "height =" 295 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013235645-12.png "height =" 300 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013233395-13.png "height =" 299 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013233Q2-14.png "height =" 298 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/20132314L-15.png "height =" 299 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013236062-16.png "height =" 298 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013232116-17.png "height =" 295 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013232945-18.png "height =" 295 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013234A1-19.png "height =" 201 "/>

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013233203-20.png "height =" 331 "/>

(5) log out of the VM

Input ~. Press enter to exit.

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013232404-21.png "height =" 190 "/>

3. zone VM management

(1) view virtual machines

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013235915-22.png "height =" 123 "/>

(2) Start, pause, and restart

Start ZONE

# zoneadm -z vmtest01 boot

Prepare ZONE, do not start

# zoneadm -z vmtest01 ready

ZONE downtime

# zoneadm -z vmtest01 halt

Restart ZONE

# zoneadm -z vmtest01 reboot
(3) Virtual Machine entry and exit

1) enter the VM

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013234247-23.png "height =" 127 "/>

2) Input ~. Log out of the VM

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px; "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131227/2013231C0-24.png "height =" 95 "/>

(4) Virtual Machine Deletion
[Root @ node2:/] # zoneadm-z vmtest01 uninstall are you sure you want to uninstall the region vmtest01 (y/[n])? Y The ZFS File System in this region has been destroyed. [Root @ node2:/] #
(5) Delete the virtual machine configuration file
[Root @ node2:/] # zonecfg-z vmtest01 delete are you sure you want to delete the region vmtest01 (y/[n])? Y [root @ node2:/] #

4. Example of creating a sparse root area
# zonecfg -z vmtest01zonecfg:vmtest01> createzonecfg:vmtest01> set zonepath=/vmtest01zonecfg:vmtest01> set autoboot=truezonecfg:vmtest01> set scheduling-class=FSSzonecfg:vmtest01> remove inherit-pkg-dir dir=/libzonecfg:vmtest01> remove inherit-pkg-dir dir=/platformzonecfg:vmtest01> remove inherit-pkg-dir dir=/sbinzonecfg:vmtest01> remove inherit-pkg-dir dir=/usrzonecfg:vmtest01> add netzonecfg:vmtest01:net> set physical=e1000g0zonecfg:vmtest01:net> set address=192.168.233.200zonecfg:vmtest01:net> set defrouter=192.168.233.2zonecfg:vmtest01:net> endzonecfg:vmtest01> add capped-memoryzonecfg:vmtest01:capped-memeory> set physical=512Mzonecfg:vmtest01:capped-memeory> set swap=1024Mzonecfg:vmtest01:capped-memeory> set locked=512Mzonecfg:vmtest01:capped-memeory> endzonecfg:vmtest01> commitzonecfg:vmtest01> exportzonecfg:vmtest01> verifyzonecfg:vmtest01> exit# zoneadm -z vmtest01 install# zoneadm -z vmtest01 boot# zoneadm list -vi# zlogin -C vmtest01# zlogin vmtest01

This article is from the "koumm linux technology blog" blog, please be sure to keep this source http://koumm.blog.51cto.com/703525/1305008

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.