I created a zone like this using memory-caps:

zonecfg -z zone-a
zonecfg:zone-a> add capped-memory
zonecfg:zone-a:capped-memory> set swap=512m
zonecfg:zone-a:capped-memory> set physical=512m
zonecfg:zone-a:capped-memory> end
zonecfg:zone-a> exit

When I try to use this configuration to create a new zone (aka import) I get an error:

# zonecfg -z zone-a export | sed 's/zone-a/zone-b/'|zonecfg -z zone-b -f -
On line 23:
The capped-memory resource or a related resource control already exists.
On line 24:
Cannot set a resource-specific property from the global scope.
On line 25:
The end command only makes sense in the resource scope.

This is the zone configuration:

# zonecfg -z zone-a export
0 create -b
1 set zonepath=/zones/zone-a
2 set autoboot=false
3 set ip-type=shared
4 add inherit-pkg-dir
5 set dir=/lib
6 end
7 add inherit-pkg-dir
8 set dir=/platform
9 end
10 add inherit-pkg-dir
11 set dir=/sbin
12 end
13 add inherit-pkg-dir
14 set dir=/usr
15 end
16 add device
17 set match=/dev/*dsk/c2t0d0s*
18 end
19 add rctl
20 set name=zone.max-swap
21 add value (priv=privileged,limit=536870912,action=""
22 end
23 add capped-memory
24 set physical=512M
25 end


The problem is quite clear. Zonecfg tries to add two memory-caps, but there can be only one.
SWAP caps is implemented as RCTL, phsical caps as RCAP managed by the global rcapd thus the strange output.
Maybe however it would have been better, to hide the implementaion von zonecfg completly, or to separate them.

Konstantin Gremliza

zones-discuss mailing list

Reply via email to