[Appliance] unRAID KVM - Arch Linux (2014.07.18) self maintained (adv users)


binhex

Recommended Posts

Pass-trough file system

 

 

This is a start to play with 9p file system.

 

Guest Kernel has to support 9p:

 

Please give it a try, maybe there needs some tuning ???

 

 

 

Add these lines in guest configuration xml file to acess the cache disk

<filesystem type='mount' accessmode='passthrough'>
    <source dir='/mnt/cache/'/>
    <target dir='cache'/>
</filesystem>

 

Start guest

 

virsh define "guest.xml"
virsh start "guest"
virsh console "guest"

 

 

in the VM

 

#mkdir /mnt/cache
#mount -t 9p -o trans=virtio cache /mnt/cache -oversion=9p2000.L,posixacl,cache=loose

 

sucess!

 

 

You can also make it permanent to mount it in the fstab

 

cache   /mnt/cache    9p  trans=virtio,version=9p2000.L,rw    0   0

 

 

Link to comment
  • Replies 95
  • Created
  • Last Reply

Top Posters In This Topic

Made progress to use macvlan/macvtap.... still some more things to fine tune .... ;-)

 

root@tower:/mnt/vm_disk/KVM/Slackware# ifconfig
eth0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet 192.168.0.190  netmask 255.255.255.0  broadcast 192.168.0.255
        ether bc:5f:f4:75:8a:21  txqueuelen 1000  (Ethernet)
        RX packets 462003  bytes 528683670 (504.1 MiB)
        RX errors 0  dropped 267  overruns 0  frame 0
        TX packets 722016  bytes 364382121 (347.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 44  base 0xe000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)
        RX packets 74  bytes 6354 (6.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 74  bytes 6354 (6.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

macvlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.190  netmask 255.255.255.0  broadcast 0.0.0.0
        ether 5e:78:4c:71:78:fd  txqueuelen 0  (Ethernet)
        RX packets 35202  bytes 3122233 (2.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 22763  bytes 6477806 (6.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

macvtap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 52:54:00:5b:92:e1  txqueuelen 500  (Ethernet)
        RX packets 150294  bytes 239020156 (227.9 MiB)
        RX errors 1  dropped 1  overruns 0  frame 0
        TX packets 38610  bytes 2593286 (2.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

macvtap1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 52:54:00:7a:be:b3  txqueuelen 500  (Ethernet)
        RX packets 270128  bytes 396264662 (377.9 MiB)
        RX errors 1  dropped 1  overruns 0  frame 0
        TX packets 83025  bytes 8100850 (7.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

 

[root@arch-linux ~]# ping tower
PING tower (192.168.0.190) 56(84) bytes of data.
64 bytes from tower (192.168.0.190): icmp_seq=1 ttl=64 time=0.048 ms
64 bytes from tower (192.168.0.190): icmp_seq=2 ttl=64 time=0.069 ms
64 bytes from tower (192.168.0.190): icmp_seq=3 ttl=64 time=0.059 ms

 

[root@arch-linux ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:5b:92:e1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.105/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe5b:92e1/64 scope link
       valid_lft forever preferred_lft forever

 

Link to comment
  • 3 weeks later...

So if I understand the updated OP correctly, this is a KVM version of IronicBadgers Xen (and now his KVM) Arch virtual machine minus being setup to use his repository and with the addition of easy access to AUR?  I just got yaourt setup on my Xen ArchVM and I take it packer works like yaourt?

Link to comment

So if I understand the updated OP correctly, this is a KVM version of IronicBadgers Xen (and now his KVM) Arch virtual machine minus being setup to use his repository and with the addition of easy access to AUR?  I just got yaourt setup on my Xen ArchVM and I take it packer works like yaourt?

 

Hi jumperalex, sorry for the delay in posting back, busy getting my head around docker :-). ok so this is using the same os as ironic's xen/kvm image (arch linux) but is completely built from the ground up by myself with some additoonal small tools included. i firstly would like to state this is in no way a competing image to ironic's, it was born some time ago when tom stated he would include kvm/xen hypervisors with unraid, so i posted the image, unfortunately for me as you know tom decided to go xen for the first hypervisor and thus ironic created his image, as you now know things have changed and the shift seems to now be towards kvm.

 

I basically wanted to post something up that more advanced users can just use as a base to build on, using the tool "packer" to install anything not included in the official arch repo (aka aur).

 

I think you will find packer more lightweight that yaourt and easier to use, give the image a go and please feedback any postive/negatives you have.

 

There is of course absolutely nothing stopping you adding in ironics repo, i just wasnt comfortable with including this in the image by default without ironic's blessing as its his bandwidth that gets used.

Link to comment

Ha! No worries of course.

 

OK that all makes sense and is about what I figured.  I really appreciate it.  Sounds like just the image I want for KVM-Arch.  Now that I've learned about yaourt / packer I'm less likely to want to depend on IB's repo.

 

Hopefully I'll get to try it out here soon.  Taking down my plex server is getting harder and harder as the SO starts to depend on it :o

 

Thanks.

Link to comment

I just installed this with plexmediaserver via packer. Then 9p mounted my cache which holds all my plex config files and symlinked into it to preserve my plex setup (done this many times via many xen vm's over the past few months) changed permissions to plex:plex on all app files (/opt and my /mnt/plex symlink) this normally works via arch xen vm and cifs mount. However this time im getting

 

root@TheFrostGiants ~]# systemctl status plexmediaserver -l

? plexmediaserver.service - Plex Media Server for Linux

  Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled)

  Active: failed (Result: start-limit) since Wed 2014-07-02 04:58:47 BST; 21min ago

  Process: 4625 ExecStart=/opt/plexmediaserver/start_pms (code=exited, status=0/SUCCESS)

Main PID: 4628 (code=exited, status=255)

 

Jul 02 04:58:47 TheFrostGiants systemd[1]: plexmediaserver.service: main process exited, code=exited, status=255/n/a

Jul 02 04:58:47 TheFrostGiants systemd[1]: Unit plexmediaserver.service entered failed state.

Jul 02 04:58:47 TheFrostGiants systemd[1]: plexmediaserver.service holdoff time over, scheduling restart.

Jul 02 04:58:47 TheFrostGiants systemd[1]: Stopping Plex Media Server for Linux...

Jul 02 04:58:47 TheFrostGiants systemd[1]: Starting Plex Media Server for Linux...

Jul 02 04:58:47 TheFrostGiants systemd[1]: plexmediaserver.service start request repeated too quickly, refusing to start.

Jul 02 04:58:47 TheFrostGiants systemd[1]: Failed to start Plex Media Server for Linux.

Jul 02 04:58:47 TheFrostGiants systemd[1]: Unit plexmediaserver.service entered failed state.

[root@TheFrostGiants ~]#

 

Could this be due to the 9p mount? If so, any ideas how  fix it?

Link to comment
  • 4 weeks later...

I am running the boinc daemon in this VM. It runs as user boinc and group boinc and I have it creating its files on my unRAID cache drive. If I ls -al these files from the VM, they show up as user boinc and group boinc. If I ls -al these files from unRAID the are showing up as user mary and group 1000. mary is one of my unRAID users, I haven't created a boinc user in unRAID.

 

It seems to be working OK, at least mostly except for one "project" which always says it is waiting on memory, other "projects" run OK. It is not obvious that this problem is related to the owner of the files I described above.

 

Can anybody explain how the user in the VM is getting mapped to a different user in unRAID? Is there anything I should be doing differently here?

Link to comment
  • 3 weeks later...

@binhex

 

Latest image I have issue to install software, it looks like /tmp partition is to small, previous image are OK

 

And you can also add these line in the xml file to activate the virsh console command

 

 <serial type='pty'>
      <source path='/dev/pts/2'/>
      <target port='0'/>
    </serial>

    <console type='pty' tty='/dev/pts/2'>
      <source path='/dev/pts/2'/>
      <target type='serial' port='0'/>
    </console>

 

 

EDIT

 

Increase /tmp might be solved to give the VM more RAM :-) I will do a test!

 

Increased RAM solved the issue

 

//Peter

Link to comment

Can you also change to qcow2 file format for the images ?

 

EDIT

 

I Will try this command.

 

[b]qemu-img convert -c -O qcow2 old.img new.qcow2[/b]

 

EDIT

Was OK

 

-rwxrwxr-x  1 root   root  17179869184 Aug 19 21:23 Arch-Media.img*
-rw-r--r--  1 root   users  1203306496 Aug 19 21:38 Arch-Media.qcow2

//Peter

Link to comment
  • 2 weeks later...

so not to be "that guy" but i just spent too long looking for this thread, that I knew existed, because I think it is probably in the wrong forum.  As a VM Appliance, and probably the only active one at the moment, shouldn't this be in the Appliance section http://lime-technology.com/forum/index.php?board=54.0?

 

and probably pinned as well.

 

agreed - will pm jonp and see if he can move it for me

Link to comment
  • 7 months later...

Hey BH.. i have been using several of your dockers now for a while and they have been great and worked like a charm (unlike a lot of the others).. but it's not the right path for me as i make way to many changes to them and then loose it all with the next update and i am too lazy to start messing around to create my own  ;D

 

so i am very happy to see a ready made VM from you as a starting point.. yay!!

Link to comment
  • 7 months later...
  • 9 months later...

the download link in the original post gives a 404 page not found. Does anyone know if there is an updated download link?

 

The download link is no longer valid and appears to have been for a long time. This thread should probably be deprecated and unpinned.

 

Edited the OP to reflect the fact this is no longer supported, moderators please feel free to unpin.

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.