1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE topic
|
---|
3 | PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
---|
4 | <topic xml:lang="en-us" id="solaris-zones">
|
---|
5 | <title>Configuring a Non-Global Zone for Running <ph conkeyref="vbox-conkeyref-phrases/product-name"/></title>
|
---|
6 |
|
---|
7 | <body>
|
---|
8 | <p>
|
---|
9 | After installing <ph conkeyref="vbox-conkeyref-phrases/product-name"/> in the global zone
|
---|
10 | (see <xref href="install-solaris-host.dita#install-solaris-host"/> for the installation instructions)
|
---|
11 | the first step required to run <ph conkeyref="vbox-conkeyref-phrases/product-name"/> in a
|
---|
12 | non-global zone is to modify the zone's configuration to be able to access the
|
---|
13 | <ph conkeyref="vbox-conkeyref-phrases/product-name"/> device nodes located in the global zone.
|
---|
14 | This is done by performing the following steps as a zone administrator in the global zone.
|
---|
15 | </p>
|
---|
16 | <pre xml:space="preserve">global$ zonecfg -z <varname>vboxzone</varname>
|
---|
17 | </pre>
|
---|
18 | <p>
|
---|
19 | Replace <varname>vboxzone</varname> with the name of the
|
---|
20 | non-gloabl zone where you plan to run <ph conkeyref="vbox-conkeyref-phrases/product-name"/>.
|
---|
21 | </p>
|
---|
22 | <p>
|
---|
23 | Use <userinput>zonecfg(8)</userinput> to add the <codeph>device</codeph> resource
|
---|
24 | and the <codeph>match</codeph> property for each
|
---|
25 | <ph conkeyref="vbox-conkeyref-phrases/product-name"/> device node in the global
|
---|
26 | zone to the non-global zone as follows:
|
---|
27 | </p>
|
---|
28 | <pre xml:space="preserve">zonecfg:vboxzone> add device
|
---|
29 | zonecfg:vboxzone:device> set match=/dev/vboxdrv
|
---|
30 | zonecfg:vboxzone:device> end
|
---|
31 | zonecfg:vboxzone> add device
|
---|
32 | zonecfg:vboxzone:device> set match=/dev/vboxdrvu
|
---|
33 | zonecfg:vboxzone:device> end
|
---|
34 | zonecfg:vboxzone> exit</pre>
|
---|
35 | <p>
|
---|
36 | On Oracle Solaris 11 if you plan to use VMs configured to use a USB device, e.g. a USB
|
---|
37 | pointing device or a USB pass-through device, you should also pass through the
|
---|
38 | <filepath>/dev/vboxusbmon</filepath> device using the steps above.
|
---|
39 | </p>
|
---|
40 | <p>
|
---|
41 | Oracle Solaris 11 doesn't support sparse root zones so you will need to
|
---|
42 | loopback mount <filepath>/opt/VirtualBox</filepath> from the
|
---|
43 | global zone into the non-global zone at the same path. This is
|
---|
44 | done using <userinput>zonecfg(8)</userinput> to set the <codeph>dir</codeph>
|
---|
45 | attribute and the <codeph>special</codeph> attribute for this directory.
|
---|
46 | For example:
|
---|
47 | </p>
|
---|
48 | <pre xml:space="preserve">zonecfg:vboxzone> add fs
|
---|
49 | zonecfg:vboxzone:fs> set dir=/opt/VirtualBox
|
---|
50 | zonecfg:vboxzone:fs> set special=/opt/VirtualBox
|
---|
51 | zonecfg:vboxzone:fs> set type=lofs
|
---|
52 | zonecfg:vboxzone:fs> add options [readonly]
|
---|
53 | zonecfg:vboxzone:fs> end
|
---|
54 | zonecfg:vboxzone> exit</pre>
|
---|
55 | <p>
|
---|
56 | After making the above changes using <userinput>zonecfg(8)</userinput>, reboot the zone
|
---|
57 | using <userinput>zoneadm(8)</userinput> as follows:
|
---|
58 | </p>
|
---|
59 | <pre xml:space="preserve">global$ zoneadm -z <varname>vboxzone</varname> reboot
|
---|
60 | </pre>
|
---|
61 | <p>
|
---|
62 | for the changes to take effect. You will then be able to run
|
---|
63 | <ph conkeyref="vbox-conkeyref-phrases/product-name"/> from /opt/VirtualBox within the
|
---|
64 | configured non-global zone.
|
---|
65 | </p>
|
---|
66 | </body>
|
---|
67 |
|
---|
68 | </topic>
|
---|