June 28, 201412 yr So finally I could get it working, the idea was to create a machine where I could store my media, use XBMC, and run sabnzbd, couchpotato and nzbdrone. I've never used any Linux related OS before, so everything I did generally I barely knew what I was doing but I think I learned a little of everything at the end. I owe thanks to IronicBadger and grumpybutfun for their guides and to many others that posted their ways to do things. Setup: Dom0 – Arch Linux KVM (libvirtd and quemu) XBMC with HDMI on i5 4430 HD4600 (Running from USB drive in order to passthrough SATA) DomU1 – unRAID 6.0 - Dockers (Sensei73 sab, drone, couch) PCI Passthrough of MB SATA controller CPU: i5 4430 MB: Gigabyte B85N GPU: none (Intel HD4600) RAM: 8Gb HDD: 4TB 3.5", 1TB 3.5", 80GB 2.5"(from old laptop) First I installed Arch on my 8GB pendrive, in order to do this I used another pendrive with Arch netboot image to boot and install. I followed Ironic's guide: http://blog.ktz.me/?p=131 Observations: I had to disable UEFI boot from my BIOS, this solved a problem where I couldn't access syslinux.cfg later because it was in another partition I made and mounted the partitions manually, /boot (512mb) /root (4GB) /home (the rest) Installed syslinux bootloader (just BIOS not UEFI) Then I followed his post install tasks: http://blog.ktz.me/?p=380 Then install libvirtd and qemu: http://blog.ktz.me/?p=403 Observations: Couldn't use the virt-manager, it required me to install gnome or other and I didn't had enough disk space after the install so I discarded this I downloaded the un RAID_KVM_5.0.4.vhd and opened it on my windows 8 pc and changed the content to unraid 6 beta 6 and ran the make bootable .bat Network bridge from this guide: http://blog.ktz.me/?p=120 At this point I was able to test my HVM of unRAID6, I modified a .xml from here: http://lime-technology.com/forum/index.php?topic=33859.0 Changed name to UNRAID Changed the hard disk path to my unraid.vhd and changed the type to 'vpc' Deleted the Virtfs 9p shares part I used the command: virsh create unraid.xml it booted ok, so now only needed to passthrough the SATAs Enable PCI Passthrough: This is where everything got confusing, I had to do this: https://bbs.archlinux.org/viewtopic.php?id=162768 In that guide I enabled vfio for my SATA controller (that I wanted to passthrough to unRAID) but I had problems of something about a "iommu_group", I found out this guide: https://www.kernel.org/doc/Documentation/vfio.txt and used it to identify the iommu_group devices and did the vfio thing to all of them. Another issue was that when I put intel_iommu=on on my syslinux.cfg , then XBMC couldn't passthrough HD audio to my AVR Receiver, video got stucked and everything bad, this got fixed by using intel_iommu=on,igfx_off My syslinux.cfg looks like this: LABEL archpci TEXT HELP Boot Arch Linux with pci passthrough ENDTEXT MENU LABEL Arch Linux PCI Passthrough LINUX /boot/vmlinuz-linux quiet ipv6.disable=1 intel_iommu=on,igfx_off pci-stub.ids=8086:8c02 APPEND root=PARTUUID=bae1b7a8-74f8-4cf6-9891-cb91329fded6 rootfstype=ext4 rw rootflags=rw,relatime,data=ordered cgroup_disable=memory INITRD /boot/initramfs-linux.img where pci-stubs.ids is my SATA controller, and from the guide of vfio when I put lspci -k I can see the whole iommu group of devices in vfio state. with this done, I had to follow this guide to modify the unraid.xml : https://www.suse.com/documentation/sles11/book_kvm/data/sec_libvirt_config_pci_virsh.html# So I had to add this under <devices> <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x00' slot='0x1f' function='0x02'/> </source> </hostdev> after that I was able to boot unraid6 with SATA passthrough :D :D :D Now for sabnzbd, couchpotato, etc. I am using dockers: I don't have a paid licence of unraid, so I configured my array like this: 4TB and 1TB on array, no parity, I left out the 80GB HDD to use for dockers, for this first I followed this guide to format it (command line method ): http://lime-technology.com/forum/index.php?topic=33806.0 Then the Quick Start Guide to learn how to use it: http://lime-technology.com/forum/index.php?topic=33805.0 I'm using sensei73's dockers, because eschultz didn't had nzbdrone and I couldn't get needo's to work. So that was my experience, I hope is useful for someone to make a more detailed guide. I don't know if any of this steps is useless or I miss something, I spec you gurus to tell me that, but I'm just glad It's working wonderfully, just some minor issues: Everytime I reboot, I have to use: systemclt start libvirtd, in order to use virsh commands (yes I've tried "systemctl enable") I need a way to autostart dockers Also I don't know if dockers is the right way to use this apps, I did it like this because I think that having direct access to the array they will work better I wan't to add steam to my Arch in order to use the streaming from my gaming notebook to my TV, but cant get it to work maybe Im missing a desktop GUI or something but I need a light one
June 30, 201412 yr Couple of thoughts / suggestions for you based on what you shared above: First off, nice setup and it says a lot of your Linux skills to be able to do all that (even using guides). Then install libvirtd and qemu: http://blog.ktz.me/?p=403 Observations: Couldn't use the virt-manager, it required me to install gnome or other and I didn't had enough disk space after the install so I discarded this. You could install virt-manager or any GUI application without a desktop and use X Forwarding to your Windows / Mac PC. (See: Run Linux GUI Applications On Your Windows / Mac via SSH + X11 Forwarding Also, libvirt is great and all but it's really designed to manage all kinds of hypervisors and house it in a single database. Since you are running KVM, you might find qtemu or aqemu easier than libvirt. Instead of libvirt telling QEMU what it should do, skip that step and use QEMU directly. Network bridge from this guide: http://blog.ktz.me/?p=120 Bridge should work fine (even if you are running multiple NICs) but if you are sticking your Apps out on the web or want to segment traffic better between VMs / Host... Check out OpenvSwitch as an alternative. Docker is great and all but I would just stick all your Apps in a VM (Ubuntu, Arch, Debian, etc.) or run them straight on the Host (which is what I finally did after I got bored with a VM doing it). For example, my Host is where my MySQL database is (which several Host / VM apps use) and so is Sickbeard, CouchPotato, etc.
June 30, 201412 yr Everytime I reboot, I have to use: systemclt start libvirtd, in order to use virsh commands (yes I've tried "systemctl enable") I need more info to help you with this. 1. Did you set up libvirt for ssh, tcp or both? 2. Did you edit the following file and make this change? /etc/conf.d/libvirtd From: LIBVIRTD_ARGS="-p /var/run/libvirtd.pid" To: LIBVIRTD_ARGS="-p /var/run/libvirtd.pid --listen" 3. What is the user and group in /etc/libvirt/qemu.conf? 4. What is the output of systemctl status libvirtd? I need a way to autostart dockers Docker is more trouble than it is worth considering you are already using Virtualization. I'd use a VM instead or just load the apps on the Host.
July 1, 201412 yr Author Thanks for your suggestions grumpy 1. Did you set up libvirt for ssh, tcp or both? both 2. Did you edit the following file and make this change? /etc/conf.d/libvirtd yes, I added --listen and cheked it 3. What is the user and group in /etc/libvirt/qemu.conf? user = "root" group = "root" 4. What is the output of systemctl status libvirtd? After a reboot: [root@DeltaServer ~]# systemctl status libvirtd -l ? libvirtd.service - Virtualization daemon Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled) Active: failed (Result: start-limit) since Tue 2014-07-01 11:27:45 CLT; 38s ago Docs: man:libvirtd( http://libvirt.org Process: 626 ExecStart=/usr/bin/libvirtd $LIBVIRTD_ARGS (code=exited, status=6) Main PID: 626 (code=exited, status=6) Jul 01 11:27:45 DeltaServer systemd[1]: Failed to start Virtualization daemon. Jul 01 11:27:45 DeltaServer systemd[1]: libvirtd.service start request repeated too quickly, refusing to start. Jul 01 11:27:45 DeltaServer systemd[1]: Failed to start Virtualization daemon. After reboot and using systemctl start libvirtd: [root@DeltaServer ~]# systemctl status libvirtd -l ? libvirtd.service - Virtualization daemon Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled) Active: active (running) since Tue 2014-07-01 11:39:42 CLT; 2s ago Docs: man:libvirtd( http://libvirt.org Main PID: 841 (libvirtd) CGroup: /system.slice/libvirtd.service ??841 /usr/bin/libvirtd -p /var/run/libvirtd.pid --listen ??961 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf Jul 01 11:39:43 DeltaServer dnsmasq[961]: compile time options: IPv6 GNU-getopt DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC Jul 01 11:39:43 DeltaServer dnsmasq-dhcp[961]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h Jul 01 11:39:43 DeltaServer dnsmasq-dhcp[961]: DHCP, sockets bound exclusively to interface virbr0 Jul 01 11:39:43 DeltaServer dnsmasq[961]: reading /etc/resolv.conf Jul 01 11:39:43 DeltaServer dnsmasq[961]: using nameserver 192.168.1.1#53 Jul 01 11:39:43 DeltaServer dnsmasq[961]: read /etc/hosts - 3 addresses Jul 01 11:39:43 DeltaServer dnsmasq[961]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses Jul 01 11:39:43 DeltaServer dnsmasq-dhcp[961]: read /var/lib/libvirt/dnsmasq/default.hostsfile Jul 01 11:39:43 DeltaServer libvirtd[841]: libvirt version: 1.2.5 Jul 01 11:39:43 DeltaServer libvirtd[841]: Domain id=2 name='UNRAID' uuid=a1e40383-2dfb-47f7-9cf6-589fc9679aa6 is tainted: high-privileges Docker is more trouble than it is worth considering you are already using Virtualization. I'd use a VM instead or just load the apps on the Host. I considered this but I don't know how to give the app access to the array path, and I tought that at least for sabnzb it's better to have direct access to the array folders (since it downloads and unpacks a lot of GB), also I noticed that XBMC doesn't have NFS, NFS is enabled in unRAID for the disk and share, currently I'm using SMB on XBMC to access my media on the array.
Archived
This topic is now archived and is closed to further replies.