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 Zone for Running <ph conkeyref="vbox-conkeyref-phrases/product-name"/></title>
|
---|
6 |
|
---|
7 | <body>
|
---|
8 | <p>
|
---|
9 | Assuming that <ph conkeyref="vbox-conkeyref-phrases/product-name"/> has already been installed into
|
---|
10 | your zone, you need to give the zone access to <ph conkeyref="vbox-conkeyref-phrases/product-name"/>'s
|
---|
11 | device node. This is done by performing the following steps.
|
---|
12 | Start a root terminal and run the following command:
|
---|
13 | </p>
|
---|
14 | <pre xml:space="preserve">zonecfg -z <varname>vboxzone</varname>
|
---|
15 | </pre>
|
---|
16 | <p>
|
---|
17 | Replace <varname>vboxzone</varname> with the name of the
|
---|
18 | zone where you intend to run <ph conkeyref="vbox-conkeyref-phrases/product-name"/>.
|
---|
19 | </p>
|
---|
20 | <p>
|
---|
21 | Use <userinput>zonecfg</userinput> to add the
|
---|
22 | <codeph>device</codeph> resource and <codeph>match</codeph>
|
---|
23 | properties to the zone, as follows:
|
---|
24 | </p>
|
---|
25 | <pre xml:space="preserve">zonecfg:vboxzone>add device
|
---|
26 | zonecfg:vboxzone:device>set match=/dev/vboxdrv
|
---|
27 | zonecfg:vboxzone:device>end
|
---|
28 | zonecfg:vboxzone>add device
|
---|
29 | zonecfg:vboxzone:device>set match=/dev/vboxdrvu
|
---|
30 | zonecfg:vboxzone:device>end
|
---|
31 | zonecfg:vboxzone>exit</pre>
|
---|
32 | <p>
|
---|
33 | On Oracle Solaris 11 or later, you may also add a device for
|
---|
34 | <filepath>/dev/vboxusbmon</filepath>, similar to that shown
|
---|
35 | above.
|
---|
36 | </p>
|
---|
37 | <p>
|
---|
38 | If you are not using sparse root zones, you will need to
|
---|
39 | loopback mount <filepath>/opt/VirtualBox</filepath> from the
|
---|
40 | global zone into the non-global zone at the same path. This is
|
---|
41 | specified below using the <codeph>dir</codeph> attribute and
|
---|
42 | the <codeph>special</codeph> attribute. For example:
|
---|
43 | </p>
|
---|
44 | <pre xml:space="preserve">zonecfg:vboxzone>add fs
|
---|
45 | zonecfg:vboxzone:device>set dir=/opt/VirtualBox
|
---|
46 | zonecfg:vboxzone:device>set special=/opt/VirtualBox
|
---|
47 | zonecfg:vboxzone:device>set type=lofs
|
---|
48 | zonecfg:vboxzone:device>end
|
---|
49 | zonecfg:vboxzone>exit</pre>
|
---|
50 | <p>
|
---|
51 | Reboot the zone using <userinput>zoneadm</userinput> and you should
|
---|
52 | be able to run <ph conkeyref="vbox-conkeyref-phrases/product-name"/> from within the configured zone.
|
---|
53 | </p>
|
---|
54 | </body>
|
---|
55 |
|
---|
56 | </topic>
|
---|