# zfs create poolForZones/zonesaya
# zfs set mountpoint=/zonesaya poolForZones/zonesaya
# zpool status -z
# chmod 700 /zonesaya
# zonecfg -z zonesaya
zonesaya: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zonesaya> create
zonecfg:zonesaya> set zonepath=/zonesaya
zonecfg:zonesaya> set autoboot=true
zonecfg:zonesaya> add net
zonecfg:zonesaya:net> set address=10.140.1.25
zonecfg:zonesaya:net> set physical=ce0
zonecfg:zonesaya:net> end
zonecfg:zonesaya> add fs
zonecfg:zonesaya:fs> set dir=/cdrom
zonecfg:zonesaya:fs> set special=/cdrom
zonecfg:zonesaya:fs> set type=lofs
zonecfg:zonesaya:fs> add options [ro,nodevices]
zonecfg:zonesaya:fs> end
zonecfg:zonesaya> add dedicated-cpu
zonecfg:zonesaya:dedicated-cpu> set ncpus=3
zonecfg:zonesaya:dedicated-cpu> end
zonecfg:zonesaya> add capped-memory
zonecfg:zonesaya:dedicated-cpu> set physical=1gb
zonecfg:zonesaya:dedicated-cpu> set swap=256gb
zonecfg:zonesaya:dedicated-cpu> set locked=256gb
zonecfg:zonesaya:dedicated-cpu> end
zonecfg:zonesaya> add fs
zonecfg:zonesaya:fs> set dir=/mnt
zonecfg:zonesaya:fs> set special=/dev/dsk/c0t0d0s2
zonecfg:zonesaya:fs> set raw=/dev/rdsk/c0t0d0s2
zonecfg:zonesaya:fs> set type=ufs
zonecfg:zonesaya:fs> add options [nodevices,logging]
zonecfg:zonesaya:fs> end
zonecfg:zonesaya> commit
zonecfg:zonesaya> verify
zonecfg:zonesaya> commit
zonecfg:zonesaya> exit
# zoneadm -z zonesaya install
# zoneadm -z zonesaya boot
# zlogin -C zonesaya
----------------------------------------------------------------
edit exist value:
zonecfg:my-zone> select rctl name=zone.cpu-shares
--------------------------------------------------------------
bash-3.00# dladm show-link
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
bash-3.00# dladm show-dev
e1000g0 link: up speed: 10 Mbps duplex: half
e1000g1 link: unknown speed: 0 Mbps duplex: half
e1000g2 link: unknown speed: 0 Mbps duplex: half
e1000g3 link: unknown speed: 0 Mbps duplex: half
---------------------------------------------------------------------
http://developers.sun.com/solaris/articles/application_in_zone.html
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment