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


Recommended Posts

http://pastebin.com/Ks6Xiepy

 

hope thats right

 

It looks correct.

 

What about your /etc/ssh_config?

 

Did you verify that the 2 settings are correct in it?

 

Openbox is probably super badass if I wanted to spend forever customizing this as my personal desktop, but since I am not I think it is a giant wast of time to try to make it all pretty, install 400 different components to use just to make it a functional desktop.  Way overkill.

 

You summed it up. It can be badass just like Awesome, Blackbox, Fluxbox, etc. can be. But... you have to spend a lot of time to make it that way. It's the same in any other Distro too by the way. It's a Windows Manager... not a Desktop Environment like Gnome, Unity, KDE, Enlightenment, etc.

 

XFCE is fine, it is my comfort zone of a desktop and thats all I ask of it since it will just sit there.  Just to be sure I did it right.  With xfce, I installed slim and then enabled the service to start on boot which then dumps me to a GUI login.

 

Correct.

 

Again the great thing about Arch (or perhaps bad to some)... Is you have control / say over everything and pick and choose what you want / don't want and everything is modular. Unlike other Distros that you install something it pretty much takes over your machine / Linux and have a LOT of "bloat". To get rid of it properly... A lot of times you have to reinstall Linux.

 

You will not have that issue with Arch. If you want to uninstall OpenBox and remove all the various packages it installed along with it...

 

pacman -Rds openbox

 

I assume if it was kde then slim is not needed, but then again its a few MB vs 2 GB...

 

Slim works for a lot of things and KDE is one of them. I just use KDE's login manager. I don't recall the name but I believe it installs it by default.

 

Hope you see something in my sshd file.

 

Also, lets look beyond that.  If I am local to the system, like keyboard and mouse and monitor, should I be able to execute xterm there too?

 

Stop Slim from loading at boot and reboot your Server where you are booting into a Terminal Screen (No Graphics). Login and you should be able to type "xterm" and it should start X and show 3 terminal screens (that are graphical).

 

Second, do I need any sort of special version of putty or just the normal putty?

 

I download putty from the link I posted one page one. You have to configure your session / save it with the settings I say in my guide.

 

 

Link to comment
  • Replies 247
  • Created
  • Last Reply

Top Posters In This Topic

I swear I am not spamming, just want to break up my thoughts.

 

So I got to the display settings and the only option is 1600x900, I assume there is a setting for this and will ask google, but if you have the answer handy then that saves some reading...

 

Second, in the xming setup you said multiple windows.  I assume this is why my xfce desktop has 3 windows, one for the launcher, one for the desktop and one for the bar at the top.  Then if I open an application, it too has yet another 4th window.  So I ask, why did you suggest multiple windows over a single?

Link to comment
Stop Slim from loading at boot and reboot your Server where you are booting into a Terminal Screen (No Graphics). Login and you should be able to type "xterm" and it should start X and show 3 terminal screens (that are graphical).

 

OK, this is a good test and I recall this from way back when I had my xen/vnc issues, but then I saw it with startx I believe when I didnt yet have a window manager.  However, this time around I get the same error as with putty when there is no display, so based on that I would think the issue is with xterm, but who knows what it could be at this point...

 

I will note that even though it worked, my xming windows became ultra sluggish, but it could be something to do with some of the errors I posted because I would see them scroll while I waited for things to happen.

Link to comment

I swear I am not spamming, just want to break up my thoughts.

 

No worries Mate.

 

So I got to the display settings and the only option is 1600x900, I assume there is a setting for this and will ask google, but if you have the answer handy then that saves some reading...

 

I honestly don't do SSH over X11 often... I'm more of a command line / WebGUI type of person.

 

There are settings for that... You will find it out on the web. I do not know them off hand.

 

Second, in the xming setup you said multiple windows.  I assume this is why my xfce desktop has 3 windows, one for the launcher, one for the desktop and one for the bar at the top.  Then if I open an application, it too has yet another 4th window.  So I ask, why did you suggest multiple windows over a single?

 

Try them both out and see which one works better for you.

Link to comment

However, this time around I get the same error as with putty when there is no display, so based on that I would think the issue is with xterm, but who knows what it could be at this point...

 

It's X and the fact that you probably do not have a /etc/X11/xorg.conf file or it is set incorrectly.

 

What GPU / Video card do you have?

Link to comment

Now the bad news, I still get errors, when it is only xming it is simple:

 
Warning: locale not supported by C library, locale unchanged

 

You missed a step when you installed Arch.

 

Run the following command:

 

locale

 

I am going to bet it reports some errors.

 

To fix it, set your system-wide locale correctly.

 

Note: /etc/locale.conf does not exist by default and must be created manually.

 

nano /etc/locale.conf

 

Should look similar to this (change it for where you live)

 

LANG="en_US.UTF-8"

 

When you fix that...

 

locale-gen

Link to comment

However, this time around I get the same error as with putty when there is no display, so based on that I would think the issue is with xterm, but who knows what it could be at this point...

 

It's X and the fact that you probably do not have a /etc/X11/xorg.conf file or it is set incorrectly.

 

What GPU / Video card do you have?

 

 

I do not have an xorg.conf only xorg.conf.d

 

Intel video card and driver,  not generic driver

Link to comment

this really got me thinking, so I took it back to my system with a little tweak but it is probably the same thing, well it is actually, but instead of 127.0.0.0 I used localhost:0

The way I understand Putty settings, you would use "localhost:0" if your local machine, the one you're connecting FROM, is not running a X-windows server. I believe you are connecting from a Windows system so that would work for you.

 

Edit: I screwed up this explanation pretty good.

In my case my local machine is an Ubuntu workstation that has it's own X server running (for local window display, I guess). So for me I need to use "localhost:1" or IP:1.

Should be:

If your X11 server runs on the same computer as PuTTY, put "127.0.0.1:0" in the text box.

Here's a link to the Putty guide I used: http://e.molioner.dk/guides/puttyx11

 

It's a good point to clarify for others.

Link to comment

Now the bad news, I still get errors, when it is only xming it is simple:

 
Warning: locale not supported by C library, locale unchanged

 

You missed a step when you installed Arch.

 

Run the following command:

 

locale

 

I am going to bet it reports some errors.

 

To fix it, set your system-wide locale correctly.

 

Note: /etc/locale.conf does not exist by default and must be created manually.

 

nano /etc/locale.conf

 

Should look similar to this (change it for where you live)

 

LANG="en_US.UTF-8"

 

When you fix that...

 

locale-gen

 

I had done everything except the locale-gen, did the first part and the last part, skipped the middle.  Thanks.

 

Now it is barking about some other items, but I am going to try and resolve it first. 

Link to comment

I reinstalled Xen this morning on my test/dev system. This time around there was no error from a faulty SEABIOS and now I it looks like the build version of libvirt is 1.2.0-1. Heretofore, my logs/journals had been showing libvirt at 1.2.0 in red text which I take to mean is an error of some sorts.

 

Anyway, back to playtime!

 

Edit1: well, after successfully running Grumpy's KVM-unRAID VM he posted in the openSUSE/KVM thread I now see a journal reference, in red, to libvirt ver. 1.2.0 (no -1) but that module is loaded. So maybe it's not a big problem. I have yet to see a consecutive successful boot of a VM through virt-manager, but my fingers are crossed.  ;)

Edit2: OK, so I got another successful boot of the KVM-unRAID VM, but on my third try, this time Arch Installer VM, libvirt crapped out (refused connection error in virt-manager's console window). This entry showed up in event log:

logger[2850]: /etc/xen/scripts/vif-bridge: brctl delif xenbr0 vif3.0 failed

attached is the error window.

"the beat goes on....."

xen-connection_error.png.11a7b0002636b0332c80dee99a4a9e32.png

Link to comment

I do not have an xorg.conf only xorg.conf.d

 

Intel video card and driver,  not generic driver

 

Add i915 to your mkinitcpio.conf

 

nano /etc/mkinitcpio.conf

 

MODULES="i915"

 

Then update your ramfs.

 

mkinitcpio -p linux

 

Reboot Machine

 

Download intel drivers

 

pacman -S xf86-video-intel

 

Rerun Xorg -configure (ignore any errors)

 

Xorg -configure

 

Copy xorg.conf.new to /etc/X11/

 

cp /root/xorg.conf.new /etc/X11/xorg.conf

 

Reboot computer and see if that makes a difference.

Link to comment

Edit2: OK, so I got another successful boot of the KVM-unRAID VM, but on my third try, this time Arch Installer VM, libvirt crapped out (refused connection error in virt-manager's console window). This entry showed up in event log:

logger[2850]: /etc/xen/scripts/vif-bridge: brctl delif xenbr0 vif3.0 failed

attached is the error window.

"the beat goes on....."

 

Are you trying KVM or Xen?

 

If it's KVM make your Network Bridge "br0".

 

If it's Xen make your Network Bridge "xenbr0".

Link to comment

Can you make a section on on how to make a basic ArchU to move unRAID plugins etc to.  I am having a heck of a time trying to make that work.  All I am getting is a CLI prompt and nothing else to set it up as a xen VM......

 

If you create the VM through Virt-Manager make sure...

 

1. You select the Arch ISO.

 

2. When you set up the ArchU Hard Drive that you enable the Xen Driver.

 

3. When you set up the ArchU Network that you enable the netfront (Xen) Driver.

 

Then skip down below and follow the Arch Linux install Guide and make sure you add the Xen drivers to your ramfs.

 

Installing Arch via command line with a minimal configuration file for a PV ArchU:

name = "ArchU"
kernel = "/mnt/arch/boot/x86_64/vmlinuz"
ramdisk = "/mnt/arch/boot/x86_64/archiso.img"
extra = "archisobasedir=arch archisolabel=ARCH_201312"
memory = 256
disk = [ "phy:/path/to/partition,xvda1,w", "file:/path/to/ISO,sdb,r" ]
vif = [ 'mac=00:16:3e:XX:XX:XX,bridge=xenbr0' ] <-- Replace XX with random lower case letters / numbers or both

 

This file needs to tweaked for your specific use. Most importantly, the archisolabel=ARCH_201312 line must be edited to use the release year/month of the ISO being used. If you want to install 32-bit Arch, change the kernel and ramdisk paths from /x86_64/ to /i686/.

 

Before creating ArchU, the installation ISO must be loop-mounted. To do this, ensure the directory /mnt exists and is empty, then run the following command (being sure to fill in the correct ISO path):

 

mount -o loop /path/to/iso /mnt

Once the ISO is mounted, the domU can be created with:

 

xl create -c /path/to/config/file

 

The -c option will enter the ArchU's console when successfully created and install Arch Linux as described in the Installation Guide Arch Installation Guide or a more in depth version with tons of examples / explanations of what you are doing Arch Beginners' Guide

There will be a few deviations, however. The block devices listed in the disks line of the cfg file will show up as /dev/xvd*. Use these devices when partitioning the ArchU.

 

After installation and before the ArchU is rebooted, the xen-blkfront xen-fbfront xen-netfront xen-kbdfront modules must be added to Mkinitcpio. Without these modules, the domU will not boot correctly.

 

nano /etc/mkinitcpio.conf

 

and add the following to the modules line:

 

MODULES="xen-blkfront xen-fbfront xen-netfront xen-kbdfront" <-- Along with whatever else is needed to boot. If you used EXT4 filesystem in your VM, add that too.

 

Shutdown the domU with the poweroff command. The console will be returned to the hypervisor when the domain is fully shut down, and the domain will no longer appear in the xl domains list. Now the ISO file may be unmounted:

 

umount /mnt

 

The ArchU cfg file should now be edited. Delete the "kernel = ", "ramdisk = ", and "extra = " lines and replace them with the following line:

 

bootloader = "pygrub"

 

Also remove the ISO disk from the "disk = " line.

 

The Arch domU is now set up. It may be started with the same line as before:

 

xl create -c /etc/xen/archdomu.cfg

 

Question, while I think I know, I like to ask.  With the above example, we have one disk mounted.  Is the theory still to take that disk, partition it with a boot and a root, mount them and install?  Or is it different because it is a vm?

 

Link to comment

Question, while I think I know, I like to ask.  With the above example, we have one disk mounted.  Is the theory still to take that disk, partition it with a boot and a root, mount them and install?  Or is it different because it is a vm?

 

You could do that it that way but I would use LVM (VM's installed into Logical Volumes) or CoW files.

Link to comment

Question, while I think I know, I like to ask.  With the above example, we have one disk mounted.  Is the theory still to take that disk, partition it with a boot and a root, mount them and install?  Or is it different because it is a vm?

 

You could do that it that way but I would use LVM (VM's installed into Logical Volumes) or CoW files.

 

That was sort of the plan, LVM.  On my main system, I have a PV, VG and LV in the VG/PV on a single disk.  I also have a /dev/sda1 which is my boot volume.

 

So, I created a new LV and that is what I pass to the VM.  The vm boots, fdisk -l shows me the volume and now I need to do something with it.  But I am confusing myself.  Do I still need a boot volume?  should I split the LV into 2 volumes?  Do I add another partition as the boot volume for the vm?

 

This is where I am getting stuck/confused

Link to comment

So, I created a new LV and that is what I pass to the VM.  The vm boots, fdisk -l shows me the volume and now I need to do something with it.  But I am confusing myself.  Do I still need a boot volume?  should I split the LV into 2 volumes?  Do I add another partition as the boot volume for the vm?

 

This is where I am getting stuck/confused

 

Just installed everything into one partition. Don't separate the boot in a vm.

Link to comment

at the risk of sounding ridiculous...

 

 

I have my 10GB LV partition in my vm, check

/dev/xvda1

 

Now, am I supposed ot make it bootable or is that handled by the vm or does it not actually matter?

 

and second, why type should it be?  I was thinking LVM still, but I am not so sure.

 

 

Link to comment

You mean like where xvda1 is my pv and vg and then add the lv to there?

 

Or, what I did was pass the lv to my vm.  In my vm, I made it one partition, type LVM, mkfs.ext4, mounted it and installed.

 

Just want to make sure I am clear and did it right before proceeding only to start over.  Thanks a million.

 

By the way, I want to report that the xen install ran way way longer then ever before today so I hope thats because it wants to work all the way through vnc as opposed to the crap its done till now.

Link to comment

Daemon running with PID 972

[    0.254021] i8042: No controller found

[    0.254021] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

Any thoughts?

I saw these entries show up at boot time of a VM I built. The first has to with keyboard controller (PS2) and the second is telling you there's no hardware clock found which is no big deal since it's a VM.

 

I could be wrong, but I think they might just be kernel bugs and not something that keeps the system from booting. If you haven't already, you should get some hits on these in Google-land.

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.