debian+networking [message #238] |
Tue, 18 October 2005 01:20 |
douglas
Messages: 14 Registered: October 2005
|
Junior Member |
|
|
Greetings,
I've got a debian guest image running, seems to run just fine, however I can't seem to get networking working, I created both venet0 and venet0:0 and it sees them just fine when I do a ifconfig, however; the setting the gateway as 191.255.255.1 it doesn't like, could someone provide an interface file (example file) and what needs to be done in terms of routing? Thanks
-doug
|
|
|
|
|
Re: debian+networking [message #244 is a reply to message #240] |
Wed, 19 October 2005 10:17 |
nissan
Messages: 3 Registered: October 2005
|
Junior Member |
|
|
I'm totally new to OpenVZ and am looking for a VPS solution to consolidate a friend's four systems. I'm currently weighing up this product and the somewhat simpler Linux VServer Project but I only have a few days to decide.
Douglas, I'd be very grateful for an OS template for the current Debian stable, or even a few pointers to get me started.
Thanks.
|
|
|
Re: debian+networking [message #266 is a reply to message #244] |
Thu, 20 October 2005 23:32 |
|
Nissan, if you going to try migrating existing running systems into VPSs you might not need any templates at all.
What you need to do in order to migrate is (routhly):
1. Prepare an 'empty' VPS. For OpenVZ this would mean the following (assume you chose VPS ID of 123):
mkdir /vz/root/123 /vz/private/123
cd /etc/sysconfig/vz-scripts
cat ve-vps.basic.conf-sample > 123.conf
2. Stop most services on a machine to be migrated. "Most" means services such as web server, databases and the like -- so you will not loose your data. Just leave the bare minimum (including ssh).
3. Copy all your data from the machine to an OpenVZ box. Say you'll be using VPS with ID of 123, then all the data should be placed to /vz/private/123/ directory (so there will be directories such as /vz/private/123/bin, etc, var and so on).
4. Set some VPS parameters. You have to add OSTEMPLATE=xxx line to /etc/sysconfig/vz-scripts/123.conf, where xxx would be distro name (like 'debian-3.0') for vzctl to be able to make changes specific for this distro.
Also, you have to supply an IP for a new VPS:
vzctl set 123 --ipadd x.x.x.x --save
5. You have to edit some files inside a VPS. For example, virtual server does not have real ttys, so you have to disable getty in /etc/inittab (/vz/private/123/etc/inittab). Also, link /etc/mtab to /proc/mounts. There might be other adjustments needed.
6. Try to start your new VPS:
vzctl start 123
If anything goes wrong, try to find out why and fix. If you have enough Linux experience, it can be handled.
Kir Kolyshkin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: debian+networking [message #327 is a reply to message #323] |
Sat, 12 November 2005 04:16 |
douglas
Messages: 14 Registered: October 2005
|
Junior Member |
|
|
I use debootstrap. Located at http://ftp.debian.org/debian/pool/main/d/debootstrap/deboots trap_0.2.45-0.2.tar.gz No problems, just networking needs to be setup (in the .conf) also to fix debian you need to ln -s /etc/mtab to something in /proc I think, I don't remember the dir, if you or sw guys remember can you post it so we have a reference? I try to find out.
debootstrap allows you to download and bootstrap a debian system (minimal) on the fly downloading the current files/updates. Its a nice package.
These are most of the packages required, (99%)
required="base-files base-passwd bash bsdutils coreutils libacl1 libattr1 debconf debconf-i18n liblocale-gettext-perl libtext-wrapi18n-perl libtext-charwidth-perl debianutils diff dpkg dselect libblkid1 e2fsprogs e2fslibs libcomerr2 libss2 libuuid1 findutils grep gzip hostname libcap1 libc6 libdb1-compat libdb3 libncurses5 libnewt0.51 libpam-modules libpam-runtime libpam0g libperl5.8 libpopt0 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-base procps sed slang1a-utf8 initscripts sysvinit sysv-rc tar util-linux whiptail libgcc1 gcc-3.3-base libstdc++5"
base="adduser apt apt-utils libdb4.2 at base-config aptitude libsigc++-1.2-5c102 bsdmainutils console-common console-tools libconsole console-data cpio cron dhcp-client ed exim4 exim4-base exim4-config exim4-daemon-light libgcrypt11 libgnutls11 libgpg-error0 libopencdk8 libtasn1-2 fdutils gettext-base groff-base ifupdown info klogd libssl0.9.7 liblzo1 zlib1g liblockfile1 libpcre3 libwrap0 logrotate mailx man-db libgdbm3 manpages nano net-tools netbase netkit-inetd iputils-ping nvi ppp pppconfig pppoe pppoeconf libpcap0.7 sysklogd tasksel libtextwrap1 tcpd telnet libtext-iconv-perl wget $additional"
Theres a few more to look futher, install debootstrap source and look in /usr/lib/debootstrap/scripts/ and take a look at sarge. The script it called by debootstrap located in /usr/sbin I believe.
Currently we are still testing but so far it runs pretty normal with a few minor cosmestic issues.
debootstrap installas a simple as
debootstrap sarge /vz/private/VIED
Douglas Wheet
VSFX.com
[Updated on: Sat, 12 November 2005 04:27] Report message to a moderator
|
|
|
Re: debian+networking [message #329 is a reply to message #327] |
Sat, 12 November 2005 16:49 |
KriS83
Messages: 12 Registered: October 2005
|
Junior Member |
|
|
Hi,
It's a "ln -s /proc/mounts /etc/mtab"
Quote: |
Currently we are still testing but so far it runs pretty normal with a few minor cosmestic issues.
|
You should also edit /etc/inittab and comment out or remove the following lines:
#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6
Quote: |
debootstrap installas a simple as
debootstrap sarge /vz/private/VIED
|
Correct, though I used:
debootstrap sarge /vz/private/VEID http://ftp.debian.de/debian
Basicly, my networking here works fine.
Though simple "telnet localhost 25" do not work
nmap also fails. withe the following error:
# nmap localhost
Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2005-12-11 17:44 UTC
sendto in send_ip_packet: sendto(4, packet, 28, 0, 127.0.0.1, 16) => Invalid argument
Sleeping 15 seconds then retrying
So long
KriS
P.S: I've had a look at the vzpkgcache script to try to modify it to get it to create a ostemplate just like it does with fedora,
but as it is not really created for anyother program other than "rpm" this will not be easy. Maybe when I find some time, I'll give it a go
[Updated on: Sat, 12 November 2005 16:53] Report message to a moderator
|
|
|
Re: debian+networking [message #330 is a reply to message #329] |
Sat, 12 November 2005 20:26 |
douglas
Messages: 14 Registered: October 2005
|
Junior Member |
|
|
I filed a bug about this. its a bug for vzctl I guess for debian.
Bug #67
inside /etc/sysconfig/vz-scripts/dists/scripts I believe is where debian-add_ip.sh is
loopback device needs to be added.
Under VENET_DEV=venet0 I added LOOPBACK=lo like so
LOOPBACK=lo
FAKEGATEWAY=191.255.255.1
FAKEGATEWAYNET=191.255.255.0
CFGFILE=/etc/network/interfaces
HOSTFILE=/etc/hosts
Then right under
# Auto generated loopback venet0 intefaces
I changed this
auto ${VENET_DEV}
to
auto ${VENET_DEV} ${LOOPBACK}
A few more lines down
iface ${VENET_DEV} inet static
address 127.0.0.1
netmask 255.255.255.255
broadcast 0.0.0.0
up route add -net ${FAKEGATEWAY} netmask 255.255.255.255 dev ${VENET_DEV}
up route add default gw ${FAKEGATEWAY}
I added after "up route add default gw ${FAKEGATEWAY}"
iface ${LOOPBACK} inet loopback
Essentially all I did was tell the debian-add_ip.sh to bring up LO like it should be. This will fix your problem about ping localhost
-doug
VSFX.com
[Updated on: Sat, 12 November 2005 20:28] Report message to a moderator
|
|
|