This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
docs:vserver [2013-11-26 10:30] arekm |
docs:vserver [2014-02-20 15:42] glen [Running 32 bit vserver on an 64 bit host] |
||
---|---|---|---|
Line 579: | Line 579: | ||
==== Running 32 bit vserver on an 64 bit host ==== | ==== Running 32 bit vserver on an 64 bit host ==== | ||
- | With recent PLD util-vserver package you can create 32-bit guest systems inside a 64-bit host. First you need to prepare a new distribution definition skeleton: | ||
+ | With recent [[package>util-vserver]] package you can create 32-bit guest systems inside a 64-bit host. | ||
+ | To specify arch during guest creation, use ''-d'' option, and to change what ''uname'' returns, use arguments ''--personality linux_32bit --machine i686'': | ||
- | <file># mkdir -p /etc/vservers/.distributions/pld-th-i686/poldek/repos.d | + | <file># vserver test build --context <num> -n test -m poldek -- -d pld-th-i686 --personality linux_32bit --machine i686 |
</file> | </file> | ||
- | Then copy your repository configuration to ''/etc/vservers/.distributions/pld-th-i686/poldek/repos.d/pld.conf'' and change the architecture and source paths to your liking. When configuration is ready, create a new guest vserver using the ''-d'' command line option: | ||
- | + | If you need to set ''uts'' parameters afterwards, you can just echo them: | |
- | + | <file> | |
- | <file># vserver test build --context <num> -n test -m poldek -- -d pld-th-i686 | + | # echo linux_32bit >> /etc/vservers/test/personality |
+ | # echo i686 > /etc/vservers/test/uts/machine | ||
</file> | </file> | ||
- | Later to force i686 32bit use: | ||
- | |||
- | |||
- | <file># echo linux_32bit >> /etc/vservers/test/personality | ||
- | # echo i686 > /etc/vservers/test/uts/machine | ||
- | </file> | ||
- | however, you can do that at vserver build time using arguments ''--personality linux_32bit --machine i686''. | ||
Line 1154: | Line 1148: | ||
</file> | </file> | ||
For these to work you need at least util-vserver-0.30.216-1.pre2955.3 (that .3 is important) and turn on per subsys support by doing: | For these to work you need at least util-vserver-0.30.216-1.pre2955.3 (that .3 is important) and turn on per subsys support by doing: | ||
- | |||
<file># mkdir /etc/vservers/.defaults/cgroup | <file># mkdir /etc/vservers/.defaults/cgroup | ||
# touch /etc/vservers/.defaults/cgroup/per-ss | # touch /etc/vservers/.defaults/cgroup/per-ss | ||
+ | </file> | ||
+ | |||
+ | ===== cgroups mountpoint ===== | ||
+ | |||
+ | if you have cgroups mounted somewhere else, you can inform vserver of that (it searching in ''/sys/fs/cgroup'' by default) | ||
+ | |||
+ | <file> | ||
+ | none /dev/cgroup cgroup cpuset,cpu,cpuacct,devices,freezer,net_cls 0 0 | ||
+ | </file> | ||
+ | |||
+ | you need to tell vserver where it mounted: | ||
+ | <file> | ||
+ | # cat /etc/vservers/.defaults/cgroup/mnt | ||
+ | /dev/cgroup | ||
</file> | </file> |