I have come to the conclussion that the issue is with the installation on my OMV server. I have it working fine, locally, on my desktop (Debian Wheezy), so will just use it there for now. I will probably try again with OMV, once it has migrated to Wheezy.
[HowTo] Run OMV as a KVM/qemu/libvirt host
- jensk
- Closed
-
-
Hi, i am new to the forum but have been lurking around for a while.
Today i was managing to solve the same problem reported by stu and got luck, thought to register to report a solution.This input/output error while connecting through ssh is due to a missing package:
After that i was able to login via SSH from within the host and another machine as well using virt-manager.
Hope this helps!
Cheers.
-
Thank you! That did the trick, now I will just have to re-read this thread, to start putting VM machines on my OMV.
Issue appears to be SOLVED.
-
-
As I understand it KVM is almost entirely kernel based when it comes to the latest features. I use VGA passthrough and consequently want those patches in the 3.16+ kernels. I'm adept at compiling a kernel but before I did I wondered if there were any gotchas with updating the kernel manually and not using a backports kernel...
I'm running 1.0 for testing purposes for the Linux Action Show so any help is greatly appreciated.
-
You shouldn't run into much problems if you know how to recompile your kernel to the latest. You know you can recycle the kernel config from your actual system, with that you should be good to go.
Greetings
David -
Hello,
I had some problems with the system shutdown because a few services of Open Media Vault were needed in the virtual machines.
These were already terminated before the VM's were shut down.
For this I have created a shutdown script, which shuts down the VM's before all the necessary services.
Maybe not solved quite well in some places, but it works!!Maybe it helps one or the other.
Bash
Display More#!/bin/sh ### BEGIN INIT INFO # Provides: libvirt-shutdown # Required-Start: # Required-Stop: $local_fs $network $remote_fs $syslog nfs-common nfs-kernel-server samba mysql libvirt-guests libvirtd # Default-Start: # Default-Stop: 0 1 6 # Short-Description: Shutdown VM # Description: Shutdown Libvirt VM before all other needed services # Shutdown VM's before openmediavault shutdown # Hard Poweroff after configured delay # Author: Sven Berger / sven@berger-lembeck.de # Rewamped # Version: 0.5 ### END INIT INFO # wait before shut off vm waitmax x 5s waitmax=30 # wait between every vm waitbetween=5 # Log File logfile=/var/log/libvirt-shutdown if [ ! -f "$logfile" ] then touch $logfile fi # case "$1" in start|"") ;; stop) for i in $(virsh list | grep running | awk -F " " '{print $2}' | sort -ur) do logger -t libvirt-shutdown "Shutdown: "$i echo `date` " libvirt-shutdown: Shutdown: "$i >> $logfile virsh shutdown $i & sleep $waitbetween done virshlist=1 wait=0 until [ $virshlist -eq 0 ] || [ $wait -eq $waitmax ] do sleep 5 wait=$(( $wait +1 )) virshlist=0 logger -t libvirt-shutdown "Waitung for Shutdown: "$(( $wait * 5 ))" Seconds" echo `date` " libvirt-shutdown: Waitung for Shutdown: "$(( $wait * 5 ))" Seconds" >> $logfile for vm in `virsh list | grep running | awk -F " " '{print $2}' | sort -ur`; do virshlist=$(( $virshlist +1 )) done done if [ $wait -eq $waitmax ] then for i in $(virsh list | grep running | awk -F " " '{print $2}' | sort -ur) do logger -t libvirt-shutdown "Shut-Off: "$i echo `date` " libvirt-shutdown: Shut-Off: "$i >> $logfile virsh destroy $i & done cat $logfile | mail -s "libvirt-shutdown" root else logger -t libvirt-shutdown "All VM's gracefully shutdown" echo `date` " libvirt-shutdown: All VM's gracefully shutdown" >> $logifle fi ;; *) echo "Usage: ${0:-} {start|stop}" >&2 exit 1 ;; esac exit 0
Copy it to/etc/init.d/libvirt-shutdown
and make it executable withchmod +x /etc/init.d/libvirt-shutdown
After that a
update-rc.d libvirt-shutdown defaults
And the VM's will be shutdown bafore all configured services.
With "waitmax" it is possible to set the time, as a multiple of 5 seconds, the script will wait before it will terminate the VM's hard.
If anyone has any suggestions, let me know
greetings
der-brumm-baer -
-
Considering Debian remove VirtualBox from their source because VirtualBox change SeaBIOS for another non-free BIOS And you can't neasting with VirtualBox; It might be interesting replacing VirtualBox by KVM into the next OMV version.
-
Considering Debian remove VirtualBox from their source because VirtualBox change SeaBIOS for another non-free BIOS And you can't neasting with VirtualBox; It might be interesting replacing VirtualBox by KVM into the next OMV version.
They did?? Looks like it is still there to me. Anyone is free to write a kvm plugin now. I prefer to use Proxmox and run OMV on Proxmox.
Codeapt-cache policy virtualbox virtualbox: Installed: (none) Candidate: 5.0.24-dfsg-1~bpo8+1 Package pin: 5.0.24-dfsg-1~bpo8+1 Version table: 5.0.24-dfsg-1~bpo8+1 500 100 http://httpredir.debian.org/debian/ jessie-backports/contrib amd64 Packages 4.3.36-dfsg-1+deb8u1 500 500 http://security.debian.org/ jessie/updates/contrib amd64 Packages
-
They did?? Looks like it is still there to me. Anyone is free to write a kvm plugin now. I prefer to use Proxmox and run OMV on Proxmox.
Hello ryecoaaron
If I understand you use proxmox and OMV is a virtual machine.What is your configuration and how OMV share/manage your data ? --> disk passthrough from proxmox to OMV VM ? share from proxmox to OMV VM ? iscsi target ? other ?
Thanks, sorry for my bad english
-
-
What is your configuration and how OMV share/manage your data ? --> disk passthrough from proxmox to OMV VM ? share from proxmox to OMV VM ? iscsi target ? other ?
Yes, I use proxmox. I pass the data disks through to the OMV VM. I also have virtual disks assigned to the OMV VM that are on SSDs for speed.
-
Ok thanks, I use same configuration with KVM.
Did snapshot/live backup works with proxmox on this VM ?
In my case, virsh does not support live backup with a virtio disk.
-
Proxmox uses the same kvm as virsh. So, no, they don't work. I don't think you can do snapshots with passthrough drives. Never tried with scsi/sata/etc. There isn't much changing on my OMV OS drive to need snapshots.
-
-
OK
In fact I am trying to create a live backup policy for all VM.
Did you backup your VM ? If yes how ?offline ?
tomorrow I will try to upgrade from debian wheezy (stable OMW) to jessie with OMW 3. --> apt-get dist-upgrade must work, and thanks to virtualisation and you !
Thanks
-
Did you backup your VM ? If yes how ?offline ?
Yep. I shut it down and back it up.
-
someone manage smart with OMV VM ?
In my case I must manualy enable smart into hypervisor host, my kvm passthrough don't transfert smart data to OMV VM.
-
-
Smart and spindown passthrough works with scsi driver only. However, for good performance, you need to use the virtio driver. So you need to choose: performance and SMART/spindown are handled by the host, or handle SMART/spindown in OMV, but suffer low performance.
The only other way is to pass through the PCI SATA controller, which gives direct access to the SATA controller from the OMV VM. I haven't tried this, because my Proxmox system drive is on the same SATA controller as the data drives, so I don't think that would work in my case.
-
For a general purpose and when I only have one physical machine I prefer OMV than proxmox.
The only thing I found not optimal is the VirtualBox part (which I used and being make me happy for a very long time before I decided to switch KVM).So.
If anyone decide to use KVM instead of VirtualBox on is OMV, the methodology described by @jensk still pretty accurate
here you will find the update I made to make KVM running into OMV4.1. Install libvirt, kvm et cie
apt -y install qemu-kvm bridge-utils libvirt-daemon libvirt-daemon-system2. Configure your Bridge interface
NOTE1: If you want to configure the bridge via commandline, I would recommand to have no config in the WebUI under System -> Network -> Interfaces
NOTE2: Replace ip, netmask broadcast, gateway, YOUR_INTERFACE et cie
you could find these info with the command ip or ifconfig
ip a s|grep -A3 -m1 MULTICASTnano /etc/network/interface
Bash: /etc/network/interfaces
Display Moreauto lo iface lo inet loopback auto YOUR_INTERFACE iface YOUR_INTERFACE inet manual auto br0 iface br0 inet static address 192.168.100.42 network 192.168.100.0 netmask 255.255.255.255 broadcast 192.168.100.255 gateway 192.168.192.1 dns-nameservers 8.8.8.8 bridge_ports YOUR_INTERFACE bridge_fd 0 bridge_hello 0 bridge_maxage 0 bridge_stp off
I would recommend to reboot instead of service networking restartDon't forget, all the extra configuration @jensk do in his original post is worth it, I just didn't want to duplicate the info
3. Managing the VM
Now you could manage them with virsh (https://linux.die.net/man/1/virsh)
But if, like me you like GUI you could use Virtual-Manager on you're desktop/laptop
apt -y install virt-manager virt-vieweron the server (OMV) side you need to be sure to have a netcat (nc) accepting the -U parameters
apt remove --purge netcat
apt -y install netcat-openbsdthat's it!
Jonathan
-
Interesting thread, but I'm wondering why OMV is set up this way. It appears OMV is running on "bare metal" and KVM has been installed into that (Debian) system.
In my own setup, I'm running KVM in Ubuntu18.04 (which I like better than Debian) and then running OMV as a guest VM. For the most part, this seems to work and makes it easy to isolate OMV.
Wondering what people think the pros and cons are of this. Anyone doing it the way I am?
Eric
-
-
Wondering what people think the pros and cons are of this. Anyone doing it the way I am?
I run OMV on a few Proxmox (kvm) installs and it works very well. This thread started because people wanted to run kvm on OMV without virtualizing OMV because it makes the storage situation easier.
-
I run OMV on a few Proxmox (kvm) installs and it works very well. This thread started because people wanted to run kvm on OMV without virtualizing OMV because it makes the storage situation easier.
Hi Ryecoaaron
Can you please make a tutorial that do exacly what you told, Intall OMV in proxmox?
Thank you
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!