Web Hosting Talk







View Full Version : HOW-TO: Vds


AtlasPC-Darren
07-02-2004, 01:21 PM
This is a quick way of setting up a VDS. We will use the Kernel: 2.4.22-8um in this. You can use any you want.

First of all, make a UML directory on the server with the following command in SSH


mkdir /uml/

Then, we need to change to the newly made directory, using the following command:


cd /uml

Then, Download the kernel via shell with the following command:

wget http://kernels.usermodelinux.org/kernels/linux-2.4.22-8um/linux

Once the Kernel (roughly 2.5MB) is downloaded, execute the following CHMOD:

chmod +x /uml/linux

At this point, the kernel is in a runnable state, but we havent got any OS to boot into, or any tools to run the UML properly!

So, next we will download the uml tools, and install them. To download them, in shell, type the following command:


wget http://nrh-up2date.org/howto/uml/packages/host/uml_utilities-20030903-1.i386.rpm

Now, we need to install these utilities with the following command:


rpm -i ./uml_utilities-20030903-1.i386.rpm

After this installtion, we are nearlly done, but we need one more item, the OS!

For this tutorial, we will just grab a copy of the Redhat OS from the UML site, so you need to type the following into shell:


wget http://aleron.dl.sourceforge.net/sourceforge/user-mode-linux/root_fs.rh-7.2-full.pristine.20020312.bz2


Once this is downloaded, simply type the following to un bzip it:


unbzip2 ./root_fs.rh-7.2-full.pristine.20020312.bz2

This will take a while to unbzip. Once it is done, we will make a test vds to ensure all is working, so we will do the following commands:


adduser vds1
passwd vds1 myfirstvds

This will add a user named: vds1 with the password: myfirstvds.

Now, we will make the UML run under that users login, so we type the following in order:


cp ./root_fs.rh-7.2-full.pristine.20020312 /home/vds1/root_fs
cp ./linux /home/vds1/linux

This will cause the files "root_fs.rh-7.2-full.pristine.20020312(which will now be named "root_fs")" and "linux" to be in the user "vds1" directory. Now, we will CHOWN it to user "vds1" so that the user can run it.


chown vds1 /home/vds1/linux
chown vds1 /home/vds1/root_fs


Now, at this point we have a VERY basic VDS setup. So, we will run it with the following command line to test if it works:


/home/vds1/linux ubd0=root_fs root=/dev/ubd0 mem=128m


The above line says: Boot the linux kernel, and the OS is in root_fs and make 128MB of ram available to the UML.

This should boot the VDS up to a running state.

I will add more in the morning on VDS Networking (as it is 3:20am here, hehe)

Enjoy!

BlikWerk
07-05-2004, 02:26 PM
Killer post, its_just_me!
Nice job, very helpful : )

probonic
07-05-2004, 03:09 PM
Don't forget too that there is quite a bit of information at http://user-mode-linux.sf.net including information on compiling the UML kernels yourself. So if you're used to compiling kernels and have some time on your hands you might want to look there.

I personally have quite a bit of experience with UML, so if anyone wants any help with any aspect of it, contact me and I will do my best to help :)

dqh
07-09-2004, 03:54 AM
warning: ./uml_utilities-20030903-1.i386.rpm: V3 DSA signature: NOKEY, key ID cbe5ddc7
:( i can't setup?

AtlasPC-Darren
07-11-2004, 12:10 AM
Originally posted by dqh
warning: ./uml_utilities-20030903-1.i386.rpm: V3 DSA signature: NOKEY, key ID cbe5ddc7
:( i can't setup?

Just ignore that, its just a warning because we didnt use a MD5 key:)

It should work for you still...

Steven
07-13-2004, 12:45 AM
[root@35130 vds1]# ./linux ubd0=root_fs root=/dev/ubd0 mem=128m
Checking for the skas3 patch in the host...not found
Checking for /proc/mm...not found
Segmentation fault
[root@35130 vds1]#


On fedora

The Kid
07-27-2004, 11:31 AM
whats vds???

probonic
07-27-2004, 11:38 AM
Originally posted by The Kid
whats vds???

Virtual Dedicated Server - software that allows you to partition a physical server into several "virtual" servers which give complete root access and a share of the physical host's CPU and memory resources.

User Mode Linux (UML) is just one way of doing VDS/VPS.

The Kid
07-27-2004, 11:59 AM
so is it like a mini-dedicated server? and if it has complete root, cant it delete your account and others that it doesnt own on ur server as well?

Steven
07-27-2004, 05:04 PM
Originally posted by The Kid
so is it like a mini-dedicated server? and if it has complete root, cant it delete your account and others that it doesnt own on ur server as well?

No its like running a operating system inside an operating system.

netswitch
07-29-2004, 01:34 PM
Works nice, do you still plan to write a networking how to ?

Also what is the root password ? :D

ck2004
07-29-2004, 02:00 PM
is that have any GUI Interface for customer , can UML limit cpu ,ram , harddisk , network usage?

Shoey
07-31-2004, 10:04 AM
Originally posted by ck2004
is that have any GUI Interface for customer , can UML limit cpu ,ram , harddisk , network usage?

I also wanted to ask these questions..

mygethosted
08-02-2004, 08:58 PM
good guide, waiting for the networking guide now

Icarus22
08-03-2004, 01:14 PM
great post! Thanks!

AtlasPC-Darren
08-06-2004, 01:23 PM
To ensure that my guides are accurate, i had a test server which I lost the funds to trial everything on. So, until I can make up the funds, I cannot post the Networking Section sorry. :(

bangsters
08-27-2004, 10:46 PM
any update on this? i mean the networking tutorial? :)

Semi-Server
09-02-2004, 08:28 PM
I saw someone post wonder what is the root password. Here is how to set/get it:

1) Shut down the VDS if you have it running
2) Mount the device as a loop (ex: mount root_fs /mnt -o loop)
3) chroot /mnt
4) This is now like you're logged into root. Just type passwd root and set a root password
5) Type exit
6) Run the VDS and Login :D

Hope this helps.

- John

netswitch
09-05-2004, 05:23 AM
thanks for this info :)

VapoRub
10-02-2004, 01:45 AM
its_just_me,

Do you need a sponsor of a VDS for you to trial those things on?

clementd
10-05-2004, 05:36 AM
User Mode Linux (UML)

i have install User Mode Linux rpm 2.4.19.5um-0 and cn not get it to work!

AtlasPC-Darren
10-05-2004, 11:38 AM
Well, I could post the 2nd half of the howto, but i havent had linux erver access for a while, so i cant confirm my actions are correct..

clementd.. please explain what yu did exactly? :)

clementd
10-06-2004, 10:11 AM
Hi thanks for the How to, got me started!

i had to replace the kernel and now it work ok on fedora Core2
keep up the good work!

ANMMark
10-16-2004, 09:41 PM
What about control panels?

If you seperate the server into virtual server partitions, can you get the CP, such as CPanel/WHM to copy over as well?

AtlasPC-Darren
10-17-2004, 08:36 AM
You will need to install the cp individually, or you can intergrate it into the OS image :)

ANMMark
10-17-2004, 11:32 AM
or you can intergrate it into the OS image


Any instructions or tips on that? (cpanel)

markhard
12-18-2004, 01:15 AM
How to change the size of UML disk quota?

i already succeed installing UML, but the disk quota size is very small, i don't have any free space to install other software in the UML.

thank you

Nissim Cohen
12-23-2004, 04:16 PM
CPU Limit?
HD Space?

Thank You VERY VERY VERY MUCH!
Nissim Cohen.

ISPAndrewC
01-02-2005, 09:30 PM
To manage the VPS space you have to increase the image space.

I believe it goes something like this:
Stop the UML
mv rootfs rootfs.resize
dd if=/dev/zero of=rootfs.resize bs=1k count=1 seek=8G
e2fsck -p rootfs.resize
(The above is for a previous bug in UML iirc)
resize2fs rootfs.resize
e2fsck -p rootfs.resize
Start the UML.

Can anybody verify the above?

CPU limit was always done by "nice" values when I asked about it.

DJ_Steve
03-03-2005, 05:43 AM
great post, think i might try this myself when i get another server

AtlasPC-Darren
03-03-2005, 08:56 AM
Well, a few months on, and my funds are too low to get a testserver. I will try and get one up ASAP to finally complete it. :)

DJ_Steve
03-04-2005, 04:49 AM
why was my last post removed?
what sort of spec does this testserver need its_just_me and does it matter if cpanel is on it - if not i may be able to let you borrow some room on my server for a test system

kalpin
03-04-2005, 06:24 AM
How about security issue ? can admin of vds can enhanced their own security in their vds or only super admin can do that ? Also, there is limited to kernel modification.

AtlasPC-Darren
03-04-2005, 10:01 AM
OK,

1st.. No, cpanel is not needed. :)

Secondly, the vds rootuser can make his/her vds as secure as he/she wants. With the exception of the Kernel, which only the superadmin can upgrade. :)

DJ_Steve
03-05-2005, 05:41 AM
hmmm, would messing with a VDS messup cpanel on the 'host' os at all ?

AtlasPC-Darren
03-08-2005, 09:18 AM
Originally posted by DJ_Steve
hmmm, would messing with a VDS messup cpanel on the 'host' os at all ?

No, but it requires root, so you wouldnt try it on a live machine ;)

ledjon
03-09-2005, 01:48 PM
By the way, networking has to be done (if memory serves me) via the host -- so you have to have a real ip address allocted to the host, and you pass it onto the uml instance via the command line somehow. Sorry for the vague information, but I really haven't done it in a long time. Tru the user mode linux home page -- they have documentation on all this stuff.

7de5igns
03-15-2005, 05:46 PM
very informative post. Good job.

ledjon
03-15-2005, 10:06 PM
Do I detect a bit of sarcasm? :) For those of you completely unable to google anything:

http://jdike.stearns.org/uml/networking.html

nulled
03-18-2005, 09:40 PM
Do some dedicated hosts use VPS on their Dedicated Server packages? Is there a way to tell if I am on such a machine or on a REAL dedicated server.

AtlasPC-Darren
04-02-2005, 04:58 AM
nulled, check the CPU.. if your on a UML VPS, itll say UML. :)

Ivan23
04-20-2005, 11:15 AM
http://aleron.dl.sourceforge.net/sourceforge/user-mode-linux/root_fs.rh-7.2-full.pristine.20020312.bz2%3Cbr%20/%3E


no workie :)

coolmilne
05-04-2005, 08:57 AM
good howto
thanks :)

datruesurfer
05-08-2005, 10:02 PM
Works Great :D I currently have three VPS's on one machine (Red Hat, Debian and Slackware). Still cant get the network going, however. It would be nice if one of the UML Guru's would be able to write a guide about that.

JagXJ6
05-18-2005, 03:01 PM
Originally posted by Ivan23
no workie :)
Notice the funny characters at the end of the URL?
So it was a link mistake... remove everything after ".bz2" and you'll be fine...

jsasa
06-09-2005, 11:28 PM
After running the command:
[root@ns uml]# /home/vds1/linux ubd0=root_fs root=/dev/ubd0 mem=128m

I get:

Checking for the skas3 patch in the host...not found
Checking for /proc/mm...not found
tracing thread pid = 7416
Linux version 2.4.22-8um (david@umlcoop) (gcc version 3.3 (Debian)) #2 Fri Aug 29 21:13:01 EDT 2003
On node 0 totalpages: 32768
zone(0): 32768 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: ubd0=root_fs root=/dev/ubd0 mem=128m
Calibrating delay loop... 3803.28 BogoMIPS
Memory: 125076k available
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
Checking for host processor cmov support...Yes
Checking for host processor xmm support...No
Checking that ptrace can change system call numbers...OK
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
VFS: Disk quotas vdquot_6.5.1
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS version 1.0, (C) 1999, 2000 Axis Communications AB
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
pty: 256 Unix98 ptys configured
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
SCSI subsystem driver Revision: 1.00
scsi0 : scsi_debug, Version: 0.61 (20020815), num_devs=1, dev_size_mb=8, opts=0x0
Vendor: Linux Model: scsi_debug Rev: 0004
Type: Direct-Access ANSI SCSI revision: 03
blkmtd: error: missing `device' name

Initializing software serial port version 1
mconsole (version 2) initialized on /root/.uml/Q3qJsY/mconsole
unable to open root_fs for validation
UML Audio Relay (host dsp = /dev/sound/dsp, host mixer = /dev/sound/mixer)
Initializing stdio console driver
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 8192 bind 16384)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Cannot open root device "ubd0" or 62:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 62:00

[root@ns uml]#

how do I fix this?

Scott.Mc
06-10-2005, 09:05 AM
I answered your question in another thread.

You have to boot the UML up in the users account not as root.

theredundant
07-11-2005, 09:42 PM
finally :) i know how to make a vps

llfox
07-20-2005, 12:40 AM
Wow its very well done, I have yet to see something so neat and quick.

easternBrain
07-23-2005, 05:48 AM
nice simple and a complete tutorial..
As a writer I liked the style really..

a1domainhosting
07-23-2005, 03:17 PM
We have a dedicated servers, do we need to buy the special software to create the vps? if yes how much does it costs?

migman
07-31-2005, 04:40 PM
for internet access just put and
eth0=tuntap,,,192.168.1.100
and in the VPS set as default getaway the main host IP adress.
+ give an ip adress to VPS (ifconfig eth0 IP up)
+ give a usable name server to make the resolv (/etc/resolv.conf)

and your VPS can c net and is vissible from the net

datruesurfer
07-31-2005, 04:53 PM
Originally posted by migman
for internet access just put and
eth0=tuntap,,,192.168.1.100
and in the VPS set as default getaway the main host IP adress.
+ give an ip adress to VPS (ifconfig eth0 IP up)
+ give a usable name server to make the resolv (/etc/resolv.conf)

and your VPS can c net and is vissible from the net

Yes, however that will not work if you dont have the tun kernel module compiled. To check simply run:

#modprobe tun

If you get a not found error, you will need to download and compile tun into your host kernel.

Another thing to note is that each VPS needs to have a diffrent internal IP defined in that commandline option or else traffic wont route properly. For example

VPS1: eth0=tuntap,,,192.168.1.100
VPS2: eth0=tuntap,,,192.168.1.101

jsasa
07-31-2005, 10:19 PM
How do I get all of the VDSs to start when the main OS starts and how do I get one specific VDS to start in the background?

migman
08-01-2005, 03:20 AM
jsasa: add in rc.local the command to start.

give to every VPS a id like umid=vps1 ... etc

so you can easy c if this runs using the uml_mconsole and get the proc uptime for example.

jsasa
08-01-2005, 11:47 AM
this doesn't make sense please explain in detail lol

migman
08-01-2005, 03:28 PM
your question is :How do I get all of the VDSs to start when the main OS starts
the answer ------>>>>> rc.local

what else do you need ?

vbviethosting
08-12-2005, 12:07 PM
thanks for the tutorial. Gonna try it on my new linux box. :)

OrbitMedia
08-17-2005, 02:51 PM
Are there any other step-by-step tutorial with some more recent versions of the files?

I'd sure like to install this on CentOS 4.1 (kernel 2.6.9).

The tutorial on UML's official website is the worst doc by far.

extras
08-29-2005, 06:04 PM
As I'm interested in different VPS systems,
I've searched and gathered some threads.

Are there any other helpful threads, resources?


Virtuozzo vs. VMware ESX
http://www.webhostingtalk.com/showthread.php?threadid=329390

VMware + others (Older thread, but still helpful)
http://www.webhostingtalk.com/showthread.php?threadid=133006

Xen
http://www.webhostingtalk.com/showthread.php?threadid=382753

FreeVPS ?
http://www.webhostingtalk.com/showthread.php?threadid=426666

VPS Benchmarks
http://www.webhostingtalk.com/showthread.php?threadid=409584

VPS vs. Dedicated Benchmark
http://www.webhostingtalk.com/showthread.php?threadid=308055

cPanel on VPS
http://www.webhostingtalk.com/showthread.php?threadid=432907

Tomcat on VPS
http://www.webhostingtalk.com/showthread.php?threadid=427595

Windows 2003 VPS
http://www.webhostingtalk.com/showthread.php?threadid=423762

Detecting, knowing which VPS you are on
http://www.webhostingtalk.com/showthread.php?threadid=424762

Installing Unix remotely
http://www.webhostingtalk.com/showthread.php?threadid=422400

datruesurfer
08-30-2005, 11:22 PM
I'm planning on making a basic Virtuozzo guide one of these days.

NWSTech
09-09-2005, 09:00 AM
hey all, i wouldnt suppose someone would be willing to help me out getting a UML system up and running, ive got to the point of getting the os up, but no matter what i do i cant get it to access the net at all, i can get incomming network but not outgoing, any ideas

funtoosh
09-17-2005, 04:35 PM
You need to add default route and also probalby change the ip in the vps.

Regards

Cyberpunk
09-18-2005, 01:11 PM
How could a vds be set up on a centos box with whm/cpanel? Would another licence be required or could it utilise the one for the server?

I'm tempted to try this howto.

NWSTech
09-19-2005, 03:47 AM
if your planning on installing cpanel/whm onto the vps aswell you'll need a cpanel license for it too(you can buy VPS cpanel licenses for about $15) but if your not installing cpanel on it you dont need any licenses

Shaw Networks
10-25-2005, 09:49 PM
Excellent tutorial! I've been able to execute it without a single hitch :)

jalapeno55
10-29-2005, 07:09 PM
How do you allocate the amount of cpu that can be used by each UML user?

jalapeno55
10-29-2005, 07:14 PM
Do I need to create LVM partitions for the different UML servers?
:stan:

datruesurfer
10-29-2005, 07:38 PM
Do I need to create LVM partitions for the different UML servers?
:stan:


No, thats the beauty of UML. The kernel simply mounts the EXT-3 filesystem you download and boots it.

To my knowledge you cant allocate CPU resources in UML, but it is possible in Virtuozzo.

jalapeno55
10-29-2005, 08:37 PM
No, thats the beauty of UML. The kernel simply mounts the EXT-3 filesystem you download and boots it.

To my knowledge you cant allocate CPU resources in UML, but it is possible in Virtuozzo.
Will Xen or FreeVPS or openVPS allocate CPU resources? :stan:

www openvps org/Plone

AubreyI
12-03-2005, 03:35 AM
I have no clue what VPS is really worth.

ipwnzphp
10-12-2006, 11:50 PM
Segmentation fault

i get this error when i run /home/vds1/linux ubd0=root_fs root=/dev/ubd0 mem=128m

bangsters
10-12-2006, 11:51 PM
i would recommend using vmware server, free and you can use both windows and linux :)

ipwnzphp
10-12-2006, 11:53 PM
i hate vmware! what dose my error mean?

ipwnzphp
10-13-2006, 04:17 PM
any one know whats wrong i cant get it to work on a debian nor a centos 4 box!