ShakeSpear
Posts: 85
Joined: Sat Aug 30, 2014 2:34 am

KVM?

Wed Mar 11, 2015 9:35 pm

Hey guys. Before you say anything, I want to let you know that I am still learning about this. I am a networking student and this is just so fascinating! Anyways. I have a home brewed web server and its running flawlessly, as an experiment, I want to do the server re-installation thing that services like online.net have. I have no idea what it is called but I did talk to a friend a long time ago and he said something about KVM so I wanted to know more about it. What came up on Google wasn't really helpful because it didn't explain what it did right or it wasn't what I am looking for.

So if I want to reinstall a server via its web-ui (or even through command line), what steps do I have to take to do this without having to pull out the sd card each time and do it manually. There has to be a way to do this any other way.

yoyellow
Posts: 12
Joined: Mon Mar 11, 2013 10:29 am

Re: KVM?

Thu Mar 12, 2015 10:55 am

You mean like virtualization ? the RPI has very limited resources and virtualization needs quite a bit to run smoothly.

Maybe a better bet will be something like virtualbox on a normal computer or laptop.

ShakeSpear
Posts: 85
Joined: Sat Aug 30, 2014 2:34 am

Re: KVM?

Thu Mar 12, 2015 11:16 pm

Well I dont want to virtualize anything. All I will be doing is SSHing into the server. That is it. No need for graphical interface of any kind.

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: KVM?

Fri Mar 13, 2015 6:37 am

I am pretty sure your friend meant virtualization .
KVM means Kernel-based virtual machine.

It's how "resetting" is handled on many commercial
serverfarms, you just need to delete a single file to reset a
whole virtual machine .

You do realize that virtualization has nothing to do with
graphical interfaces ? Both your host and guest systems might
only be accessible via SSH (AFAIK this even the most common setup).


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
DougieLawson
Posts: 40825
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: KVM?

Fri Mar 13, 2015 8:59 am

ghans wrote:I am pretty sure your friend meant virtualization .
KVM means Kernel-based virtual machine.
Except when it means "keyboard, video & mouse".
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

amigaholic
Posts: 25
Joined: Tue Mar 10, 2015 10:20 am

Re: KVM?

Fri Mar 13, 2015 1:16 pm

DougieLawson wrote:
ghans wrote:I am pretty sure your friend meant virtualization .
KVM means Kernel-based virtual machine.
Except when it means "keyboard, video & mouse".
This.

You can use a RPi as a KVM server, no problem. You can even use one as a platform to browse to the web admin interfaces of an HP iLO or Dell iDRAC platform (or equivalent IBM / Intel out-of-band management interface) if you want to - you would just need to ensure your Pi is running an RDP service (apt-get install xrdp) and a web browser.

Set up your firewall/router to forward your RDP / SSH traffic to your Pi, and you can RDP/SSH to the Pi from anywhere on the Internet (be sure to use a non-standard port number and apply some good login credentials on your Pi to reduce the risk of hack attacks), and have remote out-of-band management access to your servers/routers/firewalls/access points/whatevers.

If your server is a home-brew web server (by which I mean you've built a server running on PC hardware - normal motherboard/processor/memory/disks from PC spares) then you likely won't have an out-of-band management card, and won't be able to monitor the console / GUI of your server as it reboots.

For services like online.net - they have a datacentre full of servers which they lease to customers. They can lease you a whole dedicated server, if you want to pay for one, or for their cheaper packages, they will virtualize, using something like VMWare or Virtualbox, or some open-source equivalent (I'm not sure what open-source alternatives exist). They will have some tools available to allow their customers to reboot the VMs they pay online.net for.

To simulate this, it might be that you could install the free version of VMWare on your homebrew web server, and build your web server on a VM on that server. You could then use your Pi as an out-of-band management tool to allow you to access the VMWare web interface for management purposes. That way, the Pi doesn't need to do anything other than run X and a web browser (something a Pi 2 handles beautifully), and your web server only has a small amount of extra overhead (it has to run the VMWare hypervisor as well as the guest OS and its web services).

Hope this is of some help!

(um, unless your home-brew web server *is* your Raspberry Pi (rather than cobbled-together PC hardware running a server OS and a web service like Apache2 or IIS), in which case, you won't be doing any virtualization on the Pi at all)

phineyboy
Posts: 24
Joined: Sun Dec 21, 2014 1:54 am

Re: KVM?

Sun Mar 15, 2015 2:50 am

I don't know about virtualization and VMware but if you need help to get to your Pi over Internet using RDP/SSH then you might like to try http://www.raspberrypi.org/documentatio ... taccess.md

ShakeSpear
Posts: 85
Joined: Sat Aug 30, 2014 2:34 am

Re: KVM?

Sun Mar 15, 2015 5:59 pm

amigaholic wrote:
DougieLawson wrote:
ghans wrote:I am pretty sure your friend meant virtualization .
KVM means Kernel-based virtual machine.
Except when it means "keyboard, video & mouse".
This.

You can use a RPi as a KVM server, no problem. You can even use one as a platform to browse to the web admin interfaces of an HP iLO or Dell iDRAC platform (or equivalent IBM / Intel out-of-band management interface) if you want to - you would just need to ensure your Pi is running an RDP service (apt-get install xrdp) and a web browser.

Set up your firewall/router to forward your RDP / SSH traffic to your Pi, and you can RDP/SSH to the Pi from anywhere on the Internet (be sure to use a non-standard port number and apply some good login credentials on your Pi to reduce the risk of hack attacks), and have remote out-of-band management access to your servers/routers/firewalls/access points/whatevers.

If your server is a home-brew web server (by which I mean you've built a server running on PC hardware - normal motherboard/processor/memory/disks from PC spares) then you likely won't have an out-of-band management card, and won't be able to monitor the console / GUI of your server as it reboots.

For services like online.net - they have a datacentre full of servers which they lease to customers. They can lease you a whole dedicated server, if you want to pay for one, or for their cheaper packages, they will virtualize, using something like VMWare or Virtualbox, or some open-source equivalent (I'm not sure what open-source alternatives exist). They will have some tools available to allow their customers to reboot the VMs they pay online.net for.

To simulate this, it might be that you could install the free version of VMWare on your homebrew web server, and build your web server on a VM on that server. You could then use your Pi as an out-of-band management tool to allow you to access the VMWare web interface for management purposes. That way, the Pi doesn't need to do anything other than run X and a web browser (something a Pi 2 handles beautifully), and your web server only has a small amount of extra overhead (it has to run the VMWare hypervisor as well as the guest OS and its web services).

Hope this is of some help!

(um, unless your home-brew web server *is* your Raspberry Pi (rather than cobbled-together PC hardware running a server OS and a web service like Apache2 or IIS), in which case, you won't be doing any virtualization on the Pi at all)

This is exactly what I mean. Frankly, my load balancer is an Intel Inspiron 530 and I can use it as an RDP. I also own a RPi2, so controlling my Pi's won't be an issue. I have 6 Raspberry Pi B models, one RPi2 and one 32 Bit PC using as a load balancer running debian.

So I literally just need a guide or directions. I am going to try and make sense out of what you said and hopefully it will work.

And it is in fact home brewed :) i appreciate this information! Thank you!


I just want to be able to reinstall the server without physically being at the the Pi's. Again, Raspberry Pi Model B are the servers/nodes.

Bruny
Posts: 159
Joined: Fri Feb 06, 2015 5:22 pm

Re: KVM?

Wed Mar 18, 2015 5:51 pm

ShakeSpear wrote:So if I want to reinstall a server via its web-ui (or even through command line), what steps do I have to take to do this without having to pull out the sd card each time and do it manually. There has to be a way to do this any other way.
I still don't see how that is possible :?

ShakeSpear
Posts: 85
Joined: Sat Aug 30, 2014 2:34 am

Re: KVM?

Wed Mar 18, 2015 6:19 pm

Okay. Maybe I am over thinking it too much. I am sure this would be possible on a Pi 2. It is pretty powerfulcompare to Pi b/b+

ShakeSpear
Posts: 85
Joined: Sat Aug 30, 2014 2:34 am

Re: KVM?

Wed Mar 18, 2015 6:25 pm

I did have a crazy idea though, and since all hope is [somewhat] lost, I amjust going to spit it out.

Basically, since it booting from a SD Card is set, if there was a way to boot from a USB stick after it boots from the SD Card, then once the system from the USB is up, the SD Card can be mounted as a normal USB, and then one can simply reinstall an image or even a custom image (on the USB drive) that has a function to do multi-booting.

I am pretty sure that would work, but I don't know if there is a way to boot from the USB, otherwise, I am almost 100 percent postive there could be a tool to reformat and write to an SD Card via terminal.

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: KVM?

Wed Mar 18, 2015 8:14 pm

There is nothing stopping you devising a system where
you load everything in RAM , unmount the SD card and then
re-image the SD card fully.

There are already systems which run purely in RAM after boot ,
you now need to completely code up a system where the card
can be automatically rewritten.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

ShakeSpear
Posts: 85
Joined: Sat Aug 30, 2014 2:34 am

Re: KVM?

Wed Mar 18, 2015 8:31 pm

I dont think that's what I meant.

You are booting from SD Card a normal raspbian image (custom image meaning it has your scripts and such not like built from scratch), once it is booted, it then uses your magical script or what have you to load an operating system from the USB.

Something like this: http://www.berryterminal.com/doku.php/berryboot

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: KVM?

Wed Mar 18, 2015 8:41 pm

And what shall the system do to the SD card ? Re-image it ?


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

ShakeSpear
Posts: 85
Joined: Sat Aug 30, 2014 2:34 am

Re: KVM?

Wed Mar 18, 2015 8:42 pm

Basically. With no survivors. A clean installation.

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: KVM?

Wed Mar 18, 2015 8:50 pm

Well , the approach is basically the same. Ensure
you can unmount the SD card (works nicely when
you have an USB rootfs) and then actually do it.
Now you can do what you want : Reimage or trash
the SD card etc.

Good luck coding this up. Might even be a nice feature to add
to BerryBoot (would make it very similiar to NOOBS though).

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

ShakeSpear
Posts: 85
Joined: Sat Aug 30, 2014 2:34 am

Re: KVM?

Wed Mar 18, 2015 8:51 pm

Yeah. I still dont think you get it but I think I know what to look for, I will post what I find back in this thread when I do

Return to “Networking and servers”