rockstor / rockstor-core

Linux/BTRFS based Network Attached Storage(NAS)
http://rockstor.com/docs/contribute_section.html
GNU General Public License v3.0
557 stars 138 forks source link

[Enhancement] Libvirt KVM + DRBD support out of the box #1112

Open alazare619 opened 8 years ago

alazare619 commented 8 years ago

Would like to see LibVirt KVM support + DRBD this would put it in competition with FreeNAS and Unraid more directly.

alazare619 commented 8 years ago

I've looked into DRBD and Xen support but do to a conflict in kernel demands they will likely never work. Unless rockstor can use the xenserver kernel currently yum wont allow it. However LibVirt would likely be better with LXC/Docker. This can currently be achieved VIA yum in its current state but I think it should be included out of the box with a simple html NONVC webgui for management. DRBD would be a huge bonus as well. This would allow Virt Machines to be live migrated machine to machine thats based on each machine having local software raid. No san needed anymore and it would take the strain off of the net work with NAS as each machine would have local VM. Using DRBD alot of older machines would live longer as well. HP G6 1U's for instance has 6 2.5" SAS drives 3 of them stacked you can easly have a HA setup and live migrate VM's using DRBD between each machine without local storage. Without having direct access to the kixstart file I can't add it to it. But it does work I can verify.

schakrava commented 8 years ago

This is a very interesting use case @alazare619 , thanks for creating this issue. I have two questions for you.

  1. Have you setup this up manually on Rockstor?
  2. Could you share instructions or documentation links to setup and experiment?
alazare619 commented 8 years ago

I'm actually working on this setup at the moment I can get libvirt functioning I haven't worked on DRBD yet but I'll report back with my findings.

alazare619 commented 8 years ago

following http://www.server-world.info/en/note?os=CentOS_7&p=kvm i'm able to easly get KVM going I can remotely manage it via libvirt using virtmanager (it uses libvirt extensions) there are some existing libvirt web managers out there for instance https://github.com/retspen/webvirtmgr and the "continuation" with more features it links. but im sure you would rather write your own ui.

I'm using successfully ATM. http://www.webmin.com/cinstall-kvm.html

alazare619 commented 8 years ago

Pretty basic setup. After initial install of Rockstor I did the following.

  1. yum -y update
  2. Followed this till the end http://www.server-world.info/en/note?os=CentOS_7&p=kvm
  3. yum -y install wget
  4. wget http://cloudmin.virtualmin.com/gpl/scripts/cloudmin-kvm-redhat-install.sh
  5. chmod +x cloudmin-kvm-redhat-install.sh
  6. ./cloudmin-kvm-redhat-install.sh at that point I had a fully functioning management interface for kvm ontop of rockstor however it would be alot better if you could intergrate your own management using the existing tools built into kvm and libvirt. maybe look into webvirt or other similiar tools that are opensource or read on the libvirt exposed API.
alazare619 commented 7 years ago

Wanted to update this. Last few months I have been working on getting this alot more functional.

I have successfully been able to get oVirt (Red hat GlusterFS KVM w/ Webui and Docker Management) running in parallel with Rockstor. This has allowed me to store VM's on btrfs volumes along with many other features to many to list. I will link to a forum post when I have time to write this up. Along with possibly writing a KS file once I locate a few files that will need to be edited as Rockstor and oVirt both want to run on 443 by default.