[GUIDE] Virtualizing unRAID in Xen / KVM on Arch Linux


Recommended Posts

  • Replies 247
  • Created
  • Last Reply

Top Posters In This Topic

OK, I will look tonight.  The system itself has 8GB...

 

I should also not the last time I was doing this and had the same error it was on a completely different set of hardware, just noting this so we are aware it is not same hardware type issue...

 

As far as disk space, I went 10GB and single root partition as we talked about for ease. 

 

I know this is not the real answers, but it is all I have right now, so i thought to make note of it anyway...

Link to comment

you mean like the seperate package from ironic, uploaded and installed like that vs the downloaded version via pacman?

 

Yes. I tried it today and it doesn't work.

 

Be sure to check out the comments in AUR for Xen (or any package). A lot of times they post the fixes if there are issues. Didn't spend time looking at those but maybe there is an easy fix in the comments. Otherwise, load the package that is already compiled. Mine or Ironic.

 

BTW - Xen 4.4 RC1 is out but that AUR was broken the other day due to some changes on the Xen side.

Link to comment

I've tried this syntax without luck:

pacman -U https://dl.dropboxusercontent.com/u/6775695/xen-4.3.0-4-x86_64.pkg.tar.xz

 

as well as downloading it locally to my test server and running,

pacman -U xen-4.3.0-4-x86_64.pkg.tar.xz

from the directory where I have the file downloaded. Each time there's an error. In the case of the locally stored file I can't get past the dependency on bluez-4; when I download from the DropBox folder I get an error with its PGP key (or something like that). BTW, is the the right syntax??

 

When trying to compile Xen from AUR I get an error and this comment seem appropriate to the error I'm getting:

@malinas - I had the same issue and it appears it is a problem with git://xenbits.xen.org/seabios.git. I manually cloned the seabios folder using git clone http://xenbits.xen.org/git-http/seabios.git in the correct folder and restarted the Arch package build process and it's running fine now.

 

But, I can't seem to figure out what the "correct folder" is, or if I'm cloning the seabios from git properly.

 

:( :( :(

 

Link to comment

good right?

 

pacman -U xen-4.3.1-2-x86_64.pkg.tar.xz
loading packages...
resolving dependencies...
looking for inter-conflicts...

Packages (1): xen-4.3.1-2

Total Installed Size:   51.14 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
(1/1) installing xen                               [######################] 100%
===> IMPORTANT NOTICE:

In order to complete the installation, and enable Xen,
at the very least you must:
1. Edit your GRUB2 config files as specified at
    https://wiki.archlinux.org/index.php/Xen#Bootloader_Configuration
2. Issue the following commands to allow you to create and start VMs:
    systemctl enable xenstored.service
    systemctl enable xenconsoled.service
3. If you want some domains to automatically start up/shutdown, run the following:
    systemctl enable xendomains.service

For more information refer to the Wiki:
    https://wiki.archlinux.org/index.php/Xen


Note: If you are upgrading from one of the previous 4.2 xen builds, and are having issues
      with graphics card passthrough, the default device model used has changed and the
      newer model can sometimes have issues. To resolve, add (or change ) the following
      line into your domain config file:
         device_model_version = "qemu-xen-traditional"

      Also remember to rebuild your grub configuration if upgrading from a non-xen 4.3.1
           install.
Optional dependencies for xen
    xen-docs: Official Xen Documentation
    openvswitch: Optional Networking support

 

arch_1 /home # sudo systemctl enable xenstored.service
ln -s '/usr/lib/systemd/system/xenstored.service' '/etc/systemd/system/multi-user.target.wants/xenstored.service'
arch_1 /home # sudo systemctl enable xenconsoled.service
ln -s '/usr/lib/systemd/system/xenconsoled.service' '/etc/systemd/system/multi-user.target.wants/xenconsoled.service'
arch_1 /home # sudo systemctl enable xendomains.service
ln -s '/usr/lib/systemd/system/xendomains.service' '/etc/systemd/system/multi-user.target.wants/xendomains.service'
arch_1 /home # xl info
libxl: error: libxl.c:87:libxl_ctx_alloc: Is xenstore daemon running?
failed to stat /var/run/xenstored.pid: No such file or directory
cannot init xl context

 

 xl info
libxl: error: libxl.c:87:libxl_ctx_alloc: Is xenstore daemon running?
failed to stat /var/run/xenstored.pid: No such file or directory
cannot init xl context

Link to comment

I get the same results as smakovits installing the Grumpy's latest build of xen. For me, when I reboot into the xen kernel the system halts then goes into a reboot cycle pretty early in startup process. Edit-- Attached is a screen shot just before the system restarts. BTW, this test server runs OpenSUSE KVM but will only do USB-passthrough.

 

No Xen for me.  It's time for a little head scratching.......

xen-fail-screenshot-2.JPG.f20ae2833be72714210bc58ab30231c4.JPG

Link to comment

I get the same results as smakovits installing the Grumpy's latest build of xen. For me, when I reboot into the xen kernel the system halts then goes into a reboot cycle pretty early in startup process. Edit-- Attached is a screen shot just before the system restarts. BTW, this test server runs OpenSUSE KVM but will only do USB-passthrough.

 

No Xen for me.  It's time for a little head scratching.......

 

Are you doing this with the hardware in your signature? If so, PCI Passthrough will not work because the Intel Atom doesn't have VT-D and possibly the motherboard too (I didn't look it up).

 

If you are doing it with different Hardware, what is it?

Link to comment

What are you passing through? The onboard SATA or a SATA / RAID / SAS Controller?

 

I've been following your threads here; my first go was with openSUSE and KVM (on this hardware) I've not had any success with onboard SATA or add-in SATA. On-board USB pass-through works well! (note to self...update sig with add-in SATA card). HD's are single disk units.

 

I used that hardware, with a different HD, to build Arch. It was a bit of a learning curve; real back-to-basics approach, but I'm likin' it...and openSUSE, too!

 

Your tutorials have been very helpful as well as the Arch docs. Thanks!!

Link to comment

OK, updated grub, had same issue as when installing, had to rename *.new to *.cfg, no big deal, I accept it as something I need to do.  However, upon boot, the system boots out of range for the monitor for some reason.  If I reboot and select normal arch, it still works fine, so something when booting to the xen kernel jacks things up.

Link to comment

OK, updated grub, had same issue as when installing, had to rename *.new to *.cfg, no big deal, I accept it as something I need to do.  However, upon boot, the system boots out of range for the monitor for some reason.  If I reboot and select normal arch, it still works fine, so something when booting to the xen kernel jacks things up.

That sounds about the same as what I'm going through. For the time being, I went ahead and removed the Xen package using pacman.

Link to comment

I made a bit of headway on getting Xen to build on my dev/test system. I read over the quote below and it got me thinking..

@malinas - I had the same issue and it appears it is a problem with git://xenbits.xen.org/seabios.git. I manually cloned the seabios folder using git clone http://xenbits.xen.org/git-http/seabios.git in the correct folder and restarted the Arch package build process and it's running fine now.

 

I log into my ArchLinux box not as root. Under my home directory I had  already created a folder called "builds" and I "cd" into it. I issue this command, "git clone http://xenbits.xen.org/git-http/seabios.git" and stuff happens. Then I issue this command, "sudo yaourt -S xen" and the build finishes and installs Xen!

 

I modified grub as per ArchLinux-Xen guidelines and rebooted without a system lockup and decent output of the command, "xl info."

 

Now, back to work on bridging the NIC and get back to the guides posted here by grumpybutfun and ironicbadger.  Happy New Year!  :) :)

Link to comment

I made a bit of headway on getting Xen to build on my dev/test system. I read over the quote below and it got me thinking..

@malinas - I had the same issue and it appears it is a problem with git://xenbits.xen.org/seabios.git. I manually cloned the seabios folder using git clone http://xenbits.xen.org/git-http/seabios.git in the correct folder and restarted the Arch package build process and it's running fine now.

 

I log into my ArchLinux box not as root. Under my home directory I had  already created a folder called "builds" and I "cd" into it. I issue this command, "git clone http://xenbits.xen.org/git-http/seabios.git" and stuff happens. Then I issue this command, "sudo yaourt -S xen" and the build finishes and installs Xen!

 

That is the issue with the Xen install and exactly how I got around it myself. It can't download the seabios from git so you have to do it manually. Explaining how to solve that to a Linux Novice is not my idea of good time.

 

They are pretty quick over at Arch but with New Years and everything might take a day or two to solve.

Link to comment

I made a bit of headway on getting Xen to build on my dev/test system. I read over the quote below and it got me thinking..

@malinas - I had the same issue and it appears it is a problem with git://xenbits.xen.org/seabios.git. I manually cloned the seabios folder using git clone http://xenbits.xen.org/git-http/seabios.git in the correct folder and restarted the Arch package build process and it's running fine now.

 

I log into my ArchLinux box not as root. Under my home directory I had  already created a folder called "builds" and I "cd" into it. I issue this command, "git clone http://xenbits.xen.org/git-http/seabios.git" and stuff happens. Then I issue this command, "sudo yaourt -S xen" and the build finishes and installs Xen!

 

I modified grub as per ArchLinux-Xen guidelines and rebooted without a system lockup and decent output of the command, "xl info."

 

Now, back to work on bridging the NIC and get back to the guides posted here by grumpybutfun and ironicbadger.  Happy New Year!  :) :)

 

 

OK, does it matter if I am root or my user account?  Secondly, are you saying to create that folder "builds"/

Link to comment

OK, does it matter if I am root or my user account?  Secondly, are you saying to create that folder "builds"/

When you do the build as root there are strong warnings about not doing it as root, so I just did it as from my local (non-privileged) user account. EDIT: But I used the sudo command!

 

The folder can be named anything it's just a place to get things started and maybe not "muddy" a default folder. After I did that "git clone" command I notice I now have a SEABIOS folder in that "builds" folder (which I haven't a clue why it was created).

 

To get my system where it is now I followed grumpybutfun and ironicbadger's postings (blog) as well as checking the ArchLinux wiki for Xen, etc. Hopefully you have all the build tools installed.

 

I'm not sure why building it locally versus using grumpybutfun's package would result in such a difference; the only thing I can guess is AMD versus Intel builds??

 

Good luck!

Link to comment

Post your compiled packaged on a google drive or something and post a link. That way people don't have to even to deal with compiling it.

Now for a real noob question, at the end of the compiling process, yaourt "asked" if I wanted to install it and I answered Y. Now I don't know where the compiled package is. It's not in my "builds" folder.

 

EDIT:  I'll try using: sudo yaourt -Sb --export "dir" xen

 

TIA!!

Link to comment

Post your compiled packaged on a google drive or something and post a link. That way people don't have to even to deal with compiling it.

Now for a real noob question, at the end of the compiling process, yaourt "asked" if I wanted to install it and I answered Y. Now I don't know where the compiled package is. It's not in my "builds" folder.

 

Have a look at /etc/makepkg.conf and tell it to compile with all your CPUs, tell it to do it in memory (/tmp/makepkg is the default but commented out) and tell it save the package on your system somewhere (the default that is commented out is /home/packages).

 

Otherwise it stores the package in your /tmp directory. If you reset your PC... It is gone and you will need to recompile.

Link to comment

how about this?  I have no good explanation for the folder structure, but here is what I did and it works without issue and means no need to download and upload the package.

 

For me, my less privileged user is "user'

 

Log into system as user

 

cd /home/user

mkdir builds

git clone http://xenbits.xen.org/git-http/seabios.git

sudo yaourt -S xen

update grub

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

 

for me because I get the following:

grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found Xen hypervisor image: /boot/xen-4.3.1.gz
        Found linux image: /boot/vmlinuz-linux
        Found initrd image: /boot/initramfs-linux.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 184
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.done

 

I have to replace the grub file so:

mv /boot/grub/grub.cfg.new /boot/grub/grub.cfg

 

reboot, done

xl info
host                   : arch_1
release                : 3.12.6-1-ARCH
version                : #1 SMP PREEMPT Fri Dec 20 19:39:00 CET 2013
machine                : x86_64
nr_cpus                : 2
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 2
threads_per_core       : 1
cpu_mhz                : 2992
hw_caps                : bfebfbff:20100800:00000000:00000900:0408e3fd:00000000:00000001:00000000
virt_caps              : hvm hvm_directio
total_memory           : 8025
free_memory            : 128
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 3
xen_extra              : .1
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          :
xen_commandline        : /xen-4.3.1.gz xsave=1
cc_compiler            : gcc (GCC) 4.8.2 20131219 (prerelease)
cc_compile_by          : root
cc_compile_domain      :
cc_compile_date        : Wed Jan  1 14:48:25 EST 2014
xend_config_format     : 4

 

 

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.