Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Is it feasable to create a server that spawns virtual machines

  1. #1
    Join Date
    Nov 2009
    Beans
    13
    Distro
    Ubuntu 10.04 Lucid Lynx

    Is it feasable to create a server that spawns virtual machines

    I have a spare machine at home and i was wondering how much effort it would be to setup a ubuntu server that you can spawn an instance of a server in a few minutes for testing stuff, similiar to digital ocean droplets.

    I've suppose we would need to install xen or openvz, then perhaps some web interface (or ssh in and use a command) that we can use to spawn an image of ubuntu server already setup and on a brigided connection.

    basically my question is: is this feasable to setup as a weekend project? has anyone tried his?

  2. #2

    Re: Is it feasable to create a server that spawns virtual machines

    Quote Originally Posted by JTwigg View Post
    I have a spare machine at home and i was wondering how much effort it would be to setup a ubuntu server that you can spawn an instance of a server in a few minutes for testing stuff, similiar to digital ocean droplets.

    I've suppose we would need to install xen or openvz, then perhaps some web interface (or ssh in and use a command) that we can use to spawn an image of ubuntu server already setup and on a brigided connection.

    basically my question is: is this feasable to setup as a weekend project? has anyone tried his?
    I have my doubts about it being a "weekend project", but tell us more about this spare machine's resources...
    Windows assumes the user is an idiot.
    Linux demands proof.

  3. #3
    Join Date
    Nov 2009
    Beans
    13
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Is it feasable to create a server that spawns virtual machines

    thanks for your reply
    the machine is just an old desktop. some generic micro atx board, AMD phenom quadcore, 8 gigs of ram.
    i still might try this sometime, if not as a proof of concept.

  4. #4
    Join Date
    Aug 2013
    Beans
    76
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Is it feasable to create a server that spawns virtual machines

    You can create a KVM VM straight from the command line: http://agix.com.au/blog/?p=2730

    With that being true, all you would need to do is wire up some scripts to run the commands based on input from a web form. Digital Ocean has a lot more stuff to manage, so they obviously have a much more complicated system, but I think you could do something simple pretty easily.

    I am assuming you're just doing this for fun, btw. I wouldn't suggest such a simple answer if you're doing it for profit.

  5. #5
    Join Date
    Mar 2009
    Beans
    1,982

    Re: Is it feasable to create a server that spawns virtual machines

    Not an expert on this, but I believe the kvm command line thing is pretty much assuming you would host the VM on that box too. Which means that system should have some muscle to it. Which rules out what most home users would refer to as a 'spare machine'.

    I know you CAN move the files over to some other system, but then IMO you would run that command on the other system. It would be much faster, and much easier.

  6. #6
    Join Date
    Nov 2009
    Beans
    13
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Is it feasable to create a server that spawns virtual machines

    thanks for the link.
    yeah this is entirely for fun and will be on my home network.
    I think i will try setting up kvm then i could probably setup some php scripts and shell_exec the commands for spawning, listing removing virtual machines.
    i will play with this next weekend and report back in case anyone is interested.

  7. #7
    Join Date
    Nov 2009
    Beans
    13
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Is it feasable to create a server that spawns virtual machines

    also, if i can actually get it working, I may invest in some dedicated hardware next pay day

  8. #8
    Join Date
    Mar 2009
    Beans
    1,982

    Re: Is it feasable to create a server that spawns virtual machines

    OK with regards to buying dedicated hardware, it's well worth the effort to go look for recommended hardware that you know works.

    I tried this for the first time a few years back, wound up with a motherboard that had bugs in the virtualization firmware and to this day it's still not fixed.

    If I were doing it again, I'd look for examples in my price range with the features I like, go build the box from it and install it right away.

    Also as what I would call a hobbyist KVM administrator who uses VMs for my job, I would mention that while you CAN do all this from the command line, using virt-manager is super easy.

  9. #9
    Join Date
    Mar 2009
    Beans
    1,982

    Re: Is it feasable to create a server that spawns virtual machines

    Duplicate post. Not sure why.

  10. #10
    Join Date
    Aug 2013
    Beans
    1

    Re: Is it feasable to create a server that spawns virtual machines

    Quote Originally Posted by JTwigg View Post
    I have a spare machine at home and i was wondering how much effort it would be to setup a ubuntu server that you can spawn an instance of a server in a few minutes for testing stuff, similiar to digital ocean droplets.

    I've suppose we would need to install xen or openvz, then perhaps some web interface (or ssh in and use a command) that we can use to spawn an image of ubuntu server already setup and on a brigided connection.

    basically my question is: is this feasable to setup as a weekend project? has anyone tried his?

    Absolutely you can. I use Openvz for this, under Redhat, however you should be able to do it under ubuntu as well. Using ansible and the openvz module you can create VM's easily with one command:

    ansible VM1 -i hosts/create-mu -m openvz -a "command=create hostname=host.host.com ctid=100 ipadd=10.200.50.10 create_magic=no"

    You can then further customize the VM with ansible if needed, or create openvz templates, and use ansible to startup new VM's. It should also work with KVM, although since I don't use KVM all that often I don't know what modules are available to do so, but you can always use ansible to run the KVM creation script. Also look into ubuntu's vmbuilder.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •