SuseVserverHowTo: Difference between revisions

From Linix VServer
Jump to navigationJump to search
imported>Mstrobert
(SuseVserverHowTo moved to Installing an openSUSE vserver guest: updated name as part of migration from oldwiki)
 
(Restored content from Wayback Machine)
Tag: Removed redirect
 
Line 1: Line 1:
#REDIRECT [[Installing an openSUSE vserver guest]]
<div id="content">
 
<span id="top"></span>
<span id="firstHeading"></span>
= Installing an openSUSE vserver guest =
 
<div id="bodyContent">
 
<span id="siteSub"></span>
=== From Linux-VServer ===
 
<div id="contentSub">
 
(Redirected from [[index.php?title=SuseVserverHowTo&redirect=no|SuseVserverHowTo]])
 
</div>
<div id="jump-to-nav">
 
Jump to: [[#column-one|navigation]], [[#searchInput|search]]
 
</div>
<div id="mw-content-text" class="mw-content-ltr" dir="ltr" lang="en">
 
Installing and running openSUSE (previously knows as SUSE Linux) as a vserver guest.
 
{| id="toc" class="wikitable toc"
|-
| <div id="toctitle">
 
<span id="contents"></span>
== Contents ==
 
 
</div>
* [[#Test_configuration|<span class="tocnumber">1</span> <span class="toctext">Test configuration</span>]]
* [[#Running_openSUSE_vservers_on_a_Debian_server|<span class="tocnumber">2</span> <span class="toctext">Running openSUSE vservers on a Debian server</span>]]
** [[#Installation|<span class="tocnumber">2.1</span> <span class="toctext">Installation</span>]]
** [[#Post_install_cleanup|<span class="tocnumber">2.2</span> <span class="toctext">Post install cleanup</span>]]
** [[#initscripts|<span class="tocnumber">2.3</span> <span class="toctext">initscripts</span>]]
 
|}
 
<span id="test-configuration"></span>
== <span id="Test_configuration" class="mw-headline">Test configuration</span> ==
 
Host:
 
* Debian Etch AMD64, Kernel 2.6.15.4-vs2.0.2-rc9, util-vserver 0.30.210 + similar patch, or
* Debian Etch AMD64, 2.6.18-4-vserver-amd64, util-vserver 0.30.212-1 + patch (see below)
 
Guest:
 
* SLES 9, or
* openSUSE 10.2
 
<span id="running-opensuse-vservers-on-a-debian-server"></span>
== <span id="Running_openSUSE_vservers_on_a_Debian_server" class="mw-headline">Running openSUSE vservers on a Debian server</span> ==
 
<span id="installation"></span>
=== <span id="Installation" class="mw-headline">Installation</span> ===
 
Debian is lacking the required rpm tools to install an openSUSE or SLES system directly via vserver build (the required apt-rpm is available in source only for apt-0.5.xx, and Debian is already at 0.6.xx).
 
Therefore, use the normal openSUSE installation procedure and then copy the system to a vserver directory:
 
* Install openSUSE on raw metal or in a virtual machine (such as [http://www.virtualbox.org/ VirtualBox]).
* Boot from CD (openSUSE or Debian - whatever you prefer), or just boot into the OS and log in as root.
* tar the whole system, copy it to the vserver host and untar it to the desired vserver location, usually <code>/var/lib/vservers/&lt;servername&gt;</code>
* Create <code>/etc/vservers/&lt;servername&gt;</code> manually, or copy it from another vserver.
 
<span id="post-install-cleanup"></span>
=== <span id="Post_install_cleanup" class="mw-headline">Post install cleanup</span> ===
 
* remove some startup service, either delete the appropriate /etc/init.d/.... links or run the following from inside the vserver:
 
<pre># chkconfig -d -f boot.swap boot.isapnp boot.idedma  boot.loadmodules \
                  boot.device-mapper boot.md boot.proc boot.shm boot.sched \
                  boot.rootfsck hotplug boot.localfs boot.crypto boot.clock \
                  boot.scpm boot.ipconfig
 
# chkconfig -d -f coldplug irq_balancer random network fbset powersaved kbd hwscan</pre>
* remove unneeded packages:
 
<pre># rpm -e irqbalance kernel-smp grub reiserfs xfsprogs raidtools ntfsprogs \
        module-init-tools mkinitrd powersave hotplug mdadm</pre>
'''Note:''' there are a number of redundant packages remaining that can not be removed due to yast2 depending on them.
 
=== <span id="initscripts" class="mw-headline">initscripts</span> ===
 
openSUSE's <code>/etc/init.d/rc</code> expects two environment variables: <code>RUNLEVEL</code> and <code>PREVLEVEL</code>. The vserver.start script fails to set those. There are a couple workarounds:
 
* Edit <code>/etc/init.d/rc</code> to set those values (not recommended (why?)). For example, inserting these lines near the top of the file:
 
<pre>PREVLEVEL=&quot;N&quot;
RUNLEVEL=&quot;$1&quot;</pre>
* Apply the following patch to <code>vserver.start</code> to set the values:
 
<pre>--- vserver.start,orig  2006-12-09 12:37:58.000000000 -0700
+++ vserver.start      2007-06-11 12:27:27.000000000 -0600
@@ -141,7 +141,7 @@
    $_VUNAME    --xid self --set -t context=&quot;$VSERVER_DIR&quot; -- \
    $_VATTRIBUTE --set &quot;${OPTS_VATTRIBUTE[@]}&quot; -- \
    $_SAVE_CTXINFO &quot;$VSERVER_DIR&quot; \
-    $_ENV -i &quot;${OPTS_ENV[@]}&quot; \
+    $_ENV -i &quot;${OPTS_ENV[@]}&quot; PREVLEVEL=&quot;N&quot; RUNLEVEL=&quot;$RUNLEVEL_START&quot; \
    $_VCONTEXT  --migrate-self --endsetup --chroot $SILENT_OPT \
    &quot;${OPTS_VCONTEXT_MIGRATE[@]}&quot; &quot;${OPTS_VCONTEXT_ENTER[@]}&quot; -- \
    &quot;${INITCMD_START[@]}&quot;
@@ -157,7 +157,7 @@
    $_EXEC_ULIMIT      &quot;$VSERVER_DIR/ulimits&quot; \
    $_CHCONTEXT_COMPAT &quot;${CHCONTEXT_OPTS[@]}&quot; &quot;${CHCONTEXT_INIT_OPTS[@]}&quot; \
    $_SAVE_CTXINFO    &quot;$VSERVER_DIR&quot; \
-    $_ENV -i &quot;${OPTS_ENV[@]}&quot; \
+    $_ENV -i &quot;${OPTS_ENV[@]}&quot; PREVLEVEL=&quot;N&quot; RUNLEVEL=&quot;$RUNLEVEL_START&quot; \
    $_CHAINECHO &quot;${_IS_FAKEINIT:+$startsync_pipe}&quot; &quot;&quot; \
    $_CAPCHROOT        &quot;${CAPCHROOT_OPTS[@]}&quot; . \
    &quot;${INITCMD_START[@]}&quot;</pre>
'''edit me:''' do we need to modify the <code>vserver.stop</code> script as well?
 
 
</div>
<div class="printfooter">
 
Retrieved from &quot;http://wiki.linux-vserver.org/index.php?title=Installing_an_openSUSE_vserver_guest&oldid=5006&quot;
 
</div>
<div id="catlinks" class="catlinks">
 
<div id="mw-normal-catlinks" class="mw-normal-catlinks">
 
[[Special:Categories|Category]]:
* [[Category:OS_guest_under_linux-vserver|OS guest under linux-vserver]]
 
 
</div>
 
</div>
<div class="visualClear">
 
 
 
</div>
 
</div>
 
</div>

Latest revision as of 00:46, 11 November 2025

Installing an openSUSE vserver guest[edit]

From Linux-VServer[edit]

(Redirected from SuseVserverHowTo)

Jump to: navigation, search

Installing and running openSUSE (previously knows as SUSE Linux) as a vserver guest.

Contents[edit]

Test configuration[edit]

Host:

  • Debian Etch AMD64, Kernel 2.6.15.4-vs2.0.2-rc9, util-vserver 0.30.210 + similar patch, or
  • Debian Etch AMD64, 2.6.18-4-vserver-amd64, util-vserver 0.30.212-1 + patch (see below)

Guest:

  • SLES 9, or
  • openSUSE 10.2

Running openSUSE vservers on a Debian server[edit]

Installation[edit]

Debian is lacking the required rpm tools to install an openSUSE or SLES system directly via vserver build (the required apt-rpm is available in source only for apt-0.5.xx, and Debian is already at 0.6.xx).

Therefore, use the normal openSUSE installation procedure and then copy the system to a vserver directory:

  • Install openSUSE on raw metal or in a virtual machine (such as VirtualBox).
  • Boot from CD (openSUSE or Debian - whatever you prefer), or just boot into the OS and log in as root.
  • tar the whole system, copy it to the vserver host and untar it to the desired vserver location, usually /var/lib/vservers/<servername>
  • Create /etc/vservers/<servername> manually, or copy it from another vserver.

Post install cleanup[edit]

  • remove some startup service, either delete the appropriate /etc/init.d/.... links or run the following from inside the vserver:
# chkconfig -d -f boot.swap boot.isapnp boot.idedma  boot.loadmodules \
                  boot.device-mapper boot.md boot.proc boot.shm boot.sched \
                  boot.rootfsck hotplug boot.localfs boot.crypto boot.clock \
                  boot.scpm boot.ipconfig

# chkconfig -d -f coldplug irq_balancer random network fbset powersaved kbd hwscan
  • remove unneeded packages:
# rpm -e irqbalance kernel-smp grub reiserfs xfsprogs raidtools ntfsprogs \
         module-init-tools mkinitrd powersave hotplug mdadm

Note: there are a number of redundant packages remaining that can not be removed due to yast2 depending on them.

initscripts[edit]

openSUSE's /etc/init.d/rc expects two environment variables: RUNLEVEL and PREVLEVEL. The vserver.start script fails to set those. There are a couple workarounds:

  • Edit /etc/init.d/rc to set those values (not recommended (why?)). For example, inserting these lines near the top of the file:
PREVLEVEL="N"
RUNLEVEL="$1"
  • Apply the following patch to vserver.start to set the values:
--- vserver.start,orig  2006-12-09 12:37:58.000000000 -0700
+++ vserver.start       2007-06-11 12:27:27.000000000 -0600
@@ -141,7 +141,7 @@
     $_VUNAME     --xid self --set -t context="$VSERVER_DIR" -- \
     $_VATTRIBUTE --set "${OPTS_VATTRIBUTE[@]}" -- \
     $_SAVE_CTXINFO "$VSERVER_DIR" \
-    $_ENV -i "${OPTS_ENV[@]}" \
+    $_ENV -i "${OPTS_ENV[@]}" PREVLEVEL="N" RUNLEVEL="$RUNLEVEL_START" \
     $_VCONTEXT   --migrate-self --endsetup --chroot $SILENT_OPT \
     "${OPTS_VCONTEXT_MIGRATE[@]}" "${OPTS_VCONTEXT_ENTER[@]}" -- \
     "${INITCMD_START[@]}"
@@ -157,7 +157,7 @@
     $_EXEC_ULIMIT      "$VSERVER_DIR/ulimits" \
     $_CHCONTEXT_COMPAT "${CHCONTEXT_OPTS[@]}" "${CHCONTEXT_INIT_OPTS[@]}" \
     $_SAVE_CTXINFO     "$VSERVER_DIR" \
-    $_ENV -i "${OPTS_ENV[@]}" \
+    $_ENV -i "${OPTS_ENV[@]}" PREVLEVEL="N" RUNLEVEL="$RUNLEVEL_START" \
     $_CHAINECHO "${_IS_FAKEINIT:+$startsync_pipe}" "" \
     $_CAPCHROOT        "${CAPCHROOT_OPTS[@]}" . \
     "${INITCMD_START[@]}"

edit me: do we need to modify the vserver.stop script as well?