LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-13-2007, 09:07 PM   #1
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
OpenVZ virtualization in Slackware


Hello, I'm trying to get OpenVZ up and running on my Slackware box and all the instructions are for debian based distros. I was hoping I could get a few translations from any one who is multilingual.

First of all, I've been following these instructions to install. I have allready compiled the 2.6.18 kernel with the openvz patch and have my Slack box up and running with it.

Now the instructions say I need to send some parameters to the kernel to get everything to work right. It says to configure GRUB like so:
Code:
title Fedora Core (2.6.8-022stab029.1)
       root (hd0,0)
       kernel /vmlinuz-2.6.8-022stab029.1 ro root=/dev/sda5 quiet rhgb vga=0x31B
       initrd /initrd-2.6.8-022stab029.1.img
Is this just basicly telling me to add these kernel parameters (quiet rhgb vga=0x31B) to my lilo.conf? Anyone know the correct syntax off the top of their heads?

Next, it talks about configuring sysctl.
Code:
##/etc/sysctl.conf
##
# On Hardware Node we generally need
# packet forwarding enabled and proxy arp disabled
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
# Enables the magic-sysrq key
kernel.sysrq = 1
# TCP Explict Congestion Notification
#net.ipv4.tcp_ecn = 0
# we do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
I don't really know what sysctl is, but this kind of looks like /proc stuff. Will echoing these values into the <I forget the actual term, proc file system?> acomplish the same thing? If I did that, I would have to add the commands to the rc.local or somthing?

Other then those things, is there anything anyone would like to share that can make my life easier? I'm sure I could find these answers myself, but I'm not sure I know enough about all this to make sure I found the best answer.

Thanks!
...aaron
 
Old 02-13-2007, 09:21 PM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I wouldn't add that to grub.conf ... looks like those instructions are specific to Fedora Core. They require some translation ... I'll have to look into it a bit ... just a min.
 
Old 02-13-2007, 09:30 PM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Ok, well this one should work (if you're using grub):

Code:
title OpenVZ (2.6.8-022stab029.1)
        root (hd0,0)
        kernel /vmlinuz-2.6.8-022stab029.1 ro root=/dev/sda5
        initrd /initrd-2.6.8-022stab029.1.img
now, remember only to add this entry, leave other entries in there alone in case it fails. Also, that "root (hd0,0)" might not be appropriate for your system. If you already have an entry in grub.conf for slack, copy that and modify it to look something like this.

as for

Quote:
There are a number of kernel parameters that should be set for OpenVZ to work correctly. These parameters are stored in /etc/sysctl.conf file. Here is the relevant part of the file; please edit it accordingly.

Code:
# On Hardware Node we generally need
# packet forwarding enabled and proxy arp disabled
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
# Enables the magic-sysrq key
kernel.sysrq = 1
# TCP Explict Congestion Notification
#net.ipv4.tcp_ecn = 0
# we do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
If there is a '/etc/sysctl.conf' then edit it as they say ... if not, then I suppose you may need to make one and put that stuff in there.

Other than that, not sure what to do with '/sbin/service vz start', you might have to run that after the kernel boots.

Last edited by H_TeXMeX_H; 02-13-2007 at 09:32 PM.
 
Old 02-15-2007, 12:18 PM   #4
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
Thanks for the help! Still haven't gotten it working yet, but I feel you got me on the right track now.

Quote:
Originally Posted by H_TeXMeX_H
Ok, well this one should work (if you're using grub):

Code:
title OpenVZ (2.6.8-022stab029.1)
        root (hd0,0)
        kernel /vmlinuz-2.6.8-022stab029.1 ro root=/dev/sda5
        initrd /initrd-2.6.8-022stab029.1.img
now, remember only to add this entry, leave other entries in there alone in case it fails. Also, that "root (hd0,0)" might not be appropriate for your system. If you already have an entry in grub.conf for slack, copy that and modify it to look something like this.
I am actually using lilo, but this grub menu listing looks a lot clearner so I think I get what I'm supposed to do now. Basicly I just need to boot up Linux with my custom kernel, which I am doing allready with lilo. So this part should be ok.


Quote:
Originally Posted by H_TeXMeX_H
If there is a '/etc/sysctl.conf' then edit it as they say ... if not, then I suppose you may need to make one and put that stuff in there.
I know I remembered seeing these settings being set a different way somewere, and it hit me when I read what the settings were a little closer.

Code:
#!/bin/sh
# /etc/rc.d/rc.ip_forward:  start/stop IP packet forwarding

# Start IP packet forwarding:
ip_forward_start() {
  if [ -f /proc/sys/net/ipv4/ip_forward ]; then
    echo "Activating IPv4 packet forwarding."
    echo 1 > /proc/sys/net/ipv4/ip_forward
  fi
}

# Stop IP packet forwarding:
ip_forward_stop() {
  if [ -f /proc/sys/net/ipv4/ip_forward ]; then
    echo "Disabling IPv4 packet forwarding."
    echo 0 > /proc/sys/net/ipv4/ip_forward
  fi
}

# Restart IP packet forwarding:
ip_forward_restart() {
  ip_forward_stop
  sleep 1
  ip_forward_start
}

case "$1" in
'start')
  ip_forward_start
  ;;
'stop')
  ip_forward_stop
  ;;
'restart')
  ip_forward_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac
So I turned on this init script, and this too should now be ok (hopefully).

Quote:
Originally Posted by H_TeXMeX_H
Other than that, not sure what to do with '/sbin/service vz start', you might have to run that after the kernel boots.
This is just one of the OpenVZ binaries that I was able to compile from source.

Unfortunatly, there's a lot more to it then just telling it to "start", but now that I got this part figured out, I'm no longer at a mental road block.

I'll post back if I have any updates.

Thanks again,
...aaron

Last edited by drkstr; 02-15-2007 at 12:19 PM.
 
Old 02-18-2007, 12:20 PM   #5
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
Well I at least have it sorta working now. One of the problems I was having was a missing init script that is only included when you download the precompiled binaries. I was able to get the VE running after moving the init script to /etc/rc.d/rc.openvz, and creating a Slackware template from reading this guide (in addition to the packages they say to install, I also had to install l/libtermcap and l/glibc. I could have just been doing somthing wrong however).

Now my problem is running software in the VE (sshd in particular), but the is more an issue of configuring the Slackware template with the correct kernel settings and libs.

Any ways, thanks again for thr help!
...aaron
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: OpenVZ Virtualization Software Available for Sun UltraSPARC T1 Processor LXer Syndicated Linux News 0 01-03-2007 05:03 AM
LXer: OpenVZ virtualization powers up Power LXer Syndicated Linux News 0 10-15-2006 12:54 PM
LXer: OpenVZ Virtualization Software Available for Power LXer Syndicated Linux News 0 10-13-2006 06:21 PM
LXer: Debian Linux Adds OpenVZ Virtualization Software LXer Syndicated Linux News 0 08-04-2006 08:54 AM
LXer: OpenVZ User Community Enthusiastic About Operating System Virtualization Project LXer Syndicated Linux News 0 05-21-2006 02:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration