1. create a directory for the root of your non-global zone, mkdir /export/zones/mmvzone1.
chown root:root /export/zones/mmvzone1; chmod 700 /export/zones/mmvzone1
2. create a 1G partition for the non-global zone root file system
3. add filesystems to any volumes you have created from steps above
4. mount your additional space for the root of your new zone (add to vfstab in global zone 0)
Zoneconfig
- zonecfg –z mmvzone 1
- create
- set zonepath=/mmvzone1
- set autoboot=true
- add inherit-pkg-dir
- set dir=/opt
- end
- add net
- set address=[IP-ADDRESS]
- set physical=hme0
- end
- (could add a device here, but don’t believe it necessary for right now, we’ll see what we get by default)
- add rctl
- set name=zone.cpu-shares
- add value (priv=privileged,limit=20,action=none)
- end
- add attr
- set name=comment
- set type=string
- set value=”First test zone”
- end
- verify
- commit
- exit
Zoneadm
1. zoneadm –z mmvzone1 verify
2. zoneadm –z mmvzone1 install a. if you get an error message during install check the state
b. zoneadm –z mmvzone1 list –v
c. if state is “configured” make corrections specified in the messateg and install the zone again
d. if state is “incomplete” remove the zonec. if state is “configured” make corrections specified in the messateg and install the zone again
e. zoneadm –z mmvzone uninstall
f. make corrections and install the zone again
3. zoneadm list –iv
a. should report the zone is “installed”f. make corrections and install the zone again
3. zoneadm list –iv
4. zoneadm –z mmvzone1 ready
5. zoneadm list –v
a. should report the zone is “ready”
6. zoneadm –z mmvzone1 boot
7. zoneadm list –v
a. should report the zone is “running”
zlogin
8. zlogin –C mmvzone1
a. hit return
b. select 3 DEC VT100
c. enter hostname for the zone
d. hit esc-2 to continue
e. hit esc-2 to continue
f. be sure NO is checked for kerberos security
g. hit esc-2 to continue
h. hit esc-2 to continue
i. select DNS for name service
j. esc-2 to continue
k.enter abcd.com for domain
l. esc-2 to continue
m. enter [IP-ADDRESS] for the first IP
n. enter [IP-ADDRESS] for the second IP
o. esc-2 to continue
p. enter abcd.com for search domain
q. esc-2 to cont
r. confirm information
s. esc-2 to cont
t. choose NO for new name service information
u. esc-2 to cont
v. select americas for time zone
w. esc-2 to cont
x. select united states
y. esc-2
z. select central time
aa. esc-2
bb. confirm information
cc. esc-2
dd. enter root password
ee. esc-2 to continue
ff. zone should reboot
9. if a mistake is made you can zlogin –S mmvzone1 /usr/sbin/sys-unconfig (allows you to re-run the sysidcfg stage and correct and problems)
10. to disconnect from the console use “~.”
Additional zonecfg
1. following zone initialization to add additional filesystem resources and resource controls follow the following instructions
2. create the directories in the zone you are going to modify
3. zonecfg –z mmvzone2
4. add fs
5. set dir=/export/home
6. set special=/dev/md/dsk/d51
7. set raw=/dev/md/rdsk/d51
8. set type=ufs
9. set options=logging
10. end
11. verify
12. commit
13. exit
14. bounce the zone
Login
1. zlogin –C mmvzone1
2. zlogin –l c1196 mmvzone1
2. zlogin –l c1196 mmvzone1
Commands
1. ps with –Z
2. ipcs, pgrep, ptree, prstat with –z zonename option
Halt/Shutdown
zoneadm –z mmvzone1 halt
Boot
zoneadm –z mmvzone1 boot
Reboot
zoneadm –z mmvzone1reboot
Grow FileSystem
1. from the global machine
2. growfs –M /zoneroot/root/filesystem /dev/md/rdsk/device
updating resources on the fly for a zone
must run the following command from the global zone
prctl –n zone.cpu-shares –v
No comments:
Post a Comment