[GUIDE] Virtualizing unRAID in KVM on openSUSE 13.1 (64Bit) <--- Completed 12/19


Recommended Posts

  • Replies 159
  • Created
  • Last Reply

Top Posters In This Topic

Nice guide, a couple of comments

 

* in post 2 you start with "create a new virtual machine" and show a GUI but you never say which app to launch to provide that GUI

* why do you say don't plug the drives in? Is it to 100% remove any remote possibility of data loss or is there some step in there that will trash them

 

Sent from my Nexus 7 using Tapatalk

 

 

Link to comment

* in post 2 you start with "create a new virtual machine" and show a GUI but you never say which app to launch to provide that GUI

 

Thanks! I will clarify.

 

* why do you say don't plug the drives in? Is it to 100% remove any remote possibility of data loss or is there some step in there that will trash them

 

If you have your unRAID drives powered on or the unRAID USB Flash Drive during the installation of openSUSE...

 

By DEFAULT... IT WILL FORMAT or REPARTITION or DELETE at least one drive and sometimes more... Which ones? I don't know.

 

By DEFAULT... IT WILL INSTALL GRUB (The Bootloader) TO /dev/sda and who knows if that is an unRAID drive or the drive you want to install GRUB too.

 

Unless you are a Linux PRO (and when I mean PRO installing Ubuntu a couple of times DOESN'T COUNT.)... You would be wise to spend the minute or two it takes to unplug the power cables from your unRAID Hard Drives. Otherwise, you WILL LOSE ALL THE DATA ON ONE DRIVE... possible more.

 

[glow=red,2,300]NOW IS NOT THE TIME TO BE BRAVE, ADVENTUROUS, A REBEL, CUT CORNERS OR BE UNDER THE INFLUENCE OF DRUGS OR ALCOHOL.[/glow]

 

Consider yourself warned.

Link to comment

[glowUNDER THE INFLUENCE OF DRUGS OR ALCOHOL.[/glow]

 

Well shit, never gonna make it through this project now....

 

You might be onto something.

 

A Six Pack will take some of the edge off and probably make the install go smoother. Or at the very least... you won't care as much if doesn't work or something goes wrong.

 

We could have used that today.  :)

Link to comment

This might be a stupid question, but is vt-d support required? I see a mention of it in the first post but wanted to confirm before attempting. My current hardware is not vt-d supported but I was trying to find a way to run xbmc and unraid on the same computer. From reading through all the other threads, I would assume vt-d is a requirement for all visualization but I just started reading about virtualization a week ago.

Link to comment

This might be a stupid question, but is vt-d support required? I see a mention of it in the first post but wanted to confirm before attempting. My current hardware is not vt-d supported but I was trying to find a way to run xbmc and unraid on the same computer. From reading through all the other threads, I would assume vt-d is a requirement for all visualization but I just started reading about virtualization a week ago.

You need at least vtx for Virtualization. Vtd is needed if you also require/want pass through

 

Sent from my GT-I9305 using Tapatalk

 

 

Link to comment

I'm getting stuck in the last steps. I can load the unraid.kvm (it starts fine without pastrough) but when I add a pci sata controller and try to start again (after a shutdown) it gives an error.

 

Error starting domain: internal error: process exited while connecting to monitor: char device redirected to /dev/pts/2 (label charserial0)

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: PCI region 0 at address 0xf7c18000 has size 0x400, which is not a multiple of 4K.  You might experience some performance hit due to that.

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: No IOMMU found.  Unable to assign device "hostdev0"

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: Device initialization failed.

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: Device 'kvm-pci-assign' could not be initialized

 

I see my processor is detected as a sandy bridge but its a 3470t and the cpu features are not detected? Any idea? :-\

Link to comment

I'm getting stuck in the last steps. I can load the unraid.kvm (it starts fine without pastrough) but when I add a pci sata controller and try to start again (after a shutdown) it gives an error.

 

Error starting domain: internal error: process exited while connecting to monitor: char device redirected to /dev/pts/2 (label charserial0)

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: PCI region 0 at address 0xf7c18000 has size 0x400, which is not a multiple of 4K.  You might experience some performance hit due to that.

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: No IOMMU found.  Unable to assign device "hostdev0"

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: Device initialization failed.

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: Device 'kvm-pci-assign' could not be initialized

 

I see my processor is detected as a sandy bridge but its a 3470t and the cpu features are not detected? Any idea? :-\

 

Grumpy...is this the same error we were seeing when we tried to pass the vid card?

 

John

Link to comment

I'm getting stuck in the last steps. I can load the unraid.kvm (it starts fine without pastrough) but when I add a pci sata controller and try to start again (after a shutdown) it gives an error.

 

Error starting domain: internal error: process exited while connecting to monitor: char device redirected to /dev/pts/2 (label charserial0)

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: PCI region 0 at address 0xf7c18000 has size 0x400, which is not a multiple of 4K.  You might experience some performance hit due to that.

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: No IOMMU found.  Unable to assign device "hostdev0"

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: Device initialization failed.

qemu-system-x86_64: -device pci-assign,configfd=26,host=00:1a.0,id=hostdev0,bus=pci.0,addr=0x9: Device 'kvm-pci-assign' could not be initialized

 

I see my processor is detected as a sandy bridge but its a 3470t and the cpu features are not detected? Any idea? :-\

 

which motherboard you have? the motherboard has to support IOMMU as well and you need to turn it on in the bios to pass through hardware as far as i know

Link to comment

I see my processor is detected as a sandy bridge but its a 3470t and the cpu features are not detected? Any idea? :-\

 

As the other user stated. Sure your CPU does VT-D but does your motherboard support VT-D and IOMMU?

 

If that is a mVidia Video Card, that isn't going to work unless you have Linux Kernel 3.12 with VFIO (and upsteam QEMU) or it's needs to be an nVidia Quattro Series.

Link to comment

grumpy, on your guide:

 

NOTE: The location of the default storage folder (/lib/var/libvirt/images). When you download the KVM-unRAID.vhd above you need to place it in the /lib/var/libvirt/images folder or change the location of your default folder to point it to where you put the KVM-unRAID.vhd.

 

I believe this should read /var/lib/libvirt/images

Link to comment

[*]

[*]

I tried Arch and Xenserver before, passthrough works fine on Xenserver, but have other issues. (xenserver is nice but can't do much else) Arch, I get stuck last step with bootloader install, before the reboot I do have /boot/grub folder but after I reboot I don't have a /boot/grub folder anymore (/boot folder is empty) can't update grub to see the Xen kernel, I think uefi is messing things up (altho as in the tutorial I don't choose an uefi bootloader). In both cases followed the tutorial to the finest 100% letter.

 

I simply tried only to pass trough 1 sata card, as soon as I add a pci device it doesn't want to start gives that error.

 

I have an asrock z77 extreme 4, no problems before with Xenserver.

 

I'm not very experienced with Linux, but want to try Xen/KVM, I can't help to wonder tho, If more people choose this route and start using Arch Gentoo etc, and run Unraid  as VM, how long would it take until for example a Linux update or software messes up their install, and people can't easily use their Unraid VM anymore. And yes people should just stick to bare Unraid if they want to be safe, but GPU passthrough is a really nice feature on powerful machines.

 

I do would like to get Xen working, tried 7x Arch install, 1x Gentoo, Mint (no systemd :( ) is next.

 

Also on Gentoo I don't have this folder /var/lib/libvirt/images I added the Unraid kvm from my download folder.

Link to comment

Arch, I get stuck last step with bootloader install, before the reboot I do have /boot/grub folder but after I reboot I don't have a /boot/grub folder anymore (/boot folder is empty) can't update grub to see the Xen kernel, I think uefi is messing things up (altho as in the tutorial I don't choose an uefi bootloader). In both cases followed the tutorial to the finest 100% letter.

There is an issue with Arch and the bootloader because grub was updated and the install ISO has not been updated yet (ISO is updated monthly and your install grabs the latest version of grub).

 

Do this:

 

echo GRUB_DISABLE_SUBMENU=y >> /etc/default/grub

 

Then you can update grub correctly.

 

grub-mkconfig -o /boot/grub/grub.cfg

 

I simply tried only to pass trough 1 sata card, as soon as I add a pci device it doesn't want to start gives that error.

 

I have an asrock z77 extreme 4, no problems before with Xenserver.

Once you fix grub... There are several of us who can assist with Arch / Xen if you have issues. Considering you know Gentoo, it would simple for me to help you since you are an Experienced Linux user / Pro.

 

I have the same motherboard and I flip between KVM and Xen often (all done through the grub bootloader) so I know it works with both.

 

I'm not very experienced with Linux, but want to try Xen/KVM, I can't help to wonder tho, If more people choose this route and start using Arch Gentoo etc, and run Unraid  as VM, how long would it take until for example a Linux update or software messes up their install, and people can't easily use their Unraid VM anymore. And yes people should just stick to bare Unraid if they want to be safe, but GPU passthrough is a really nice feature on powerful machines.

 

If you snapshots, it's easy to revert to things before the update with one command. I normally run off a snapshot for a few / days or a week before I apply the changes permanently (with one command).

 

Also, you do not have to update. unRAID is running on Slackware 13.1 which is almost 4 years old and Tom has only updated the Kernel and a few packages here or there.

 

Also on Gentoo I don't have this folder /var/lib/libvirt/images I added the Unraid kvm from my download folder.

 

I am a fan of Gentoo but I would say it is the most difficult Linux Distro out there. Well I take that back... I think Slackware is more difficult because the package manager sucks and there is no documentation online about anything or user examples and not many people use it. That aside... Without a doubt, Gentoo is more complicated and requires you to really know your stuff. Like setting up libvirt / virt-manager. In Gentoo it doesn't set the path or a default folder like openSUSE and most Linux Distros do.

 

Try again with Arch and actually come here and post where you have problems and I (or others) will get you over them. Again, your grub problem was not you. It is a bug in arch due to grub. The fix is above.

Link to comment

If you snapshots, it's easy to revert to things before the update with one command. I normally run off a snapshot for a few / days or a week before I apply the changes permanently (with one command).

a bug in arch due to grub. The fix is above.

 

Install opensuse with bitrfs if you want to be able to revert your system changes easily.  My pci passthrough is a failure so far, and once I totally hosed the system.  It would boot, but go into a totally unresponsive state.  Couldn't even bring up the system file manager.  After many failed attempts to fix it and many reboots later, I was finally able to get an active terminal window.

 

# snapper list

 

- gave me this list of snapshots that the system had automatically taken and provided me with a backup point.

Type   | #  | Pre # | Date                            | User | Cleanup  | Description                | Userdata
-------+----+-------+---------------------------------+------+----------+----------------------------+---------
single | 0  |       |                                 | root |          | current                    |         
single | 1  |       | Fri 20 Dec 2013 06:45:01 AM MST | root | timeline | timeline                   |         
pre    | 2  |       | Fri 20 Dec 2013 06:48:28 AM MST | root | number   | zypp(packagekitd)          |         
post   | 3  | 2     | Fri 20 Dec 2013 07:10:19 AM MST | root | number   |                            |         
pre    | 4  |       | Fri 20 Dec 2013 07:15:50 AM MST | root | number   | yast services-manager      |         
post   | 5  | 4     | Fri 20 Dec 2013 07:16:25 AM MST | root | number   |                            |         
pre    | 6  |       | Fri 20 Dec 2013 07:16:32 AM MST | root | number   | yast lan                   |         
post   | 7  | 6     | Fri 20 Dec 2013 07:19:33 AM MST | root | number   |                            |         
pre    | 8  |       | Fri 20 Dec 2013 07:19:36 AM MST | root | number   | yast host                  |         
post   | 9  | 8     | Fri 20 Dec 2013 07:20:15 AM MST | root | number   |                            |         
pre    | 10 |       | Fri 20 Dec 2013 07:20:25 AM MST | root | number   | yast firewall              |         
post   | 11 | 10    | Fri 20 Dec 2013 07:20:51 AM MST | root | number   |                            |         
pre    | 12 |       | Fri 20 Dec 2013 07:21:02 AM MST | root | number   | yast sudo                  |         
post   | 13 | 12    | Fri 20 Dec 2013 07:22:52 AM MST | root | number   |                            |         
pre    | 14 |       | Fri 20 Dec 2013 07:23:26 AM MST | root | number   | yast users                 |         
post   | 15 | 14    | Fri 20 Dec 2013 07:24:59 AM MST | root | number   |                            |         
pre    | 16 |       | Fri 20 Dec 2013 07:25:11 AM MST | root | number   | yast xen                   |                                                            
post   | 17 | 16    | Fri 20 Dec 2013 07:25:27 AM MST | root | number   |                            |                                                            
pre    | 18 |       | Fri 20 Dec 2013 07:26:28 AM MST | root | number   | yast sw_single             |                                                            
pre    | 19 |       | Fri 20 Dec 2013 07:26:33 AM MST | root | number   | zypp(y2base)               |                                                            
post   | 20 | 19    | Fri 20 Dec 2013 07:26:41 AM MST | root | number   |                            |                                                            
post   | 21 | 18    | Fri 20 Dec 2013 07:26:42 AM MST | root | number   |                            |                                                            
pre    | 22 |       | Fri 20 Dec 2013 07:41:14 AM MST | root | number   | yast /usr/bin/virt-manager |                                                            
post   | 23 | 22    | Fri 20 Dec 2013 07:41:16 AM MST | root | number   |                            |                                                            
single | 24 |       | Fri 20 Dec 2013 07:45:01 AM MST | root | timeline | timeline                   |                                                            
single | 25 |       | Fri 20 Dec 2013 08:45:01 AM MST | root | timeline | timeline                   |                                                            
single | 26 |       | Fri 20 Dec 2013 09:45:01 AM MST | root | timeline | timeline                   |                                                            
single | 27 |       | Fri 20 Dec 2013 10:45:01 AM MST | root | timeline | timeline                   |                                                            
single | 28 |       | Fri 20 Dec 2013 11:45:01 AM MST | root | timeline | timeline                   |         
single | 29 |       | Fri 20 Dec 2013 01:15:01 PM MST | root | timeline | timeline                   |         
single | 30 |       | Fri 20 Dec 2013 02:15:01 PM MST | root | timeline | timeline                   |         
single | 31 |       | Fri 20 Dec 2013 03:15:01 PM MST | root | timeline | timeline                   |         
single | 32 |       | Fri 20 Dec 2013 04:15:01 PM MST | root | timeline | timeline                   |    

 

# snapper undochange 26..32

 

takes me back in time by 4 snapshots and reverts the system to as it was 4 hours ago....

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.