Jump to content

ironicbadger

Community Developer
  • Posts

    1,396
  • Joined

  • Last visited

Everything posted by ironicbadger

  1. Try this? https://mariadb.com/kb/en/resizing-a-virtual-machine-image/
  2. Reserved for future use. *Probably some more videos*
  3. As part of my series of KVM compatible VM images I present to you my Arch Linux appliance. The basic premise is that you boot unRAID into 'KVM (NOT XEN) mode' as I show in my video series below, then download my VM image and run it! Once you've run the image you're free to customise the installation to your hearts content with any application you can find for Arch (that's almost all of them!). Bear in mind that these videos tell you to boot in the Xen mode, ignore this and just boot into 'standard' unRAID mode which has KVM enabled by default. What is Arch Linux and why do I need it in a VM? I chose Arch Linux to base this particular VM on because of the way in handles software / packages in addition to it's tiny footprint on disk and in RAM. Arch Linux, just like every other Linux distro, makes use of things called 'repositories' that store packages ready for you to download. The main Arch repo's have a huge array of packages already, but they notably don't include 'those kind of apps' that we use heavily on a media server - this is where the Arch User Repository (AUR) comes in. Members of the Arch community are free to create packages for their favourite apps and Arch provides an easy way to download and compile them on a full install. To make your life easier what I've done is gone ahead and compiled the majority of media apps ahead of time and put them into my own 'unraid6repo' which is preconfigured into your VM, making installing non standard apps a breeze but more on that later. Ok I get it, Arch is awesome. How do I get going?! See the bottom of this post for download links, and post #2 for a series of YouTube videos that take you through the process from start to finish if you prefer that method over a text guide. Youtube Playlist for the setup guide - http://www.youtube.com/playlist?list=PLgUdkYSObfxotSl4c4KJlQKNyQbPAduLl ---------------- How to download and start this appliance 1. Login via SSH or Telnet to your unRAID box using Putty on Windows or Terminal on a Mac. 2. Download the .zip file to the location you want to run the VM from and unzip it. cd /mnt/cache <------ *** wget http:// <insert download link from bottom of this post> unzip ArchVM_KVM_v*.zip <------ this will take approx 5 mins *** this is up to you, you can place the .zip wherever you like. If you change this location, you will need to edit the .cfg file accordingly. If you want to do this use mcedit after you've unzipped the download. nano ArchVM/arch.cfg 3. Run your VM. virsh create ArchVM_KVM/arch.xml Once you've booted the VM and checked everything is setup correctly in the XML file you should 'define' your machine using virsh which effectively 'registers' it. virsh define ArchVM_KVM/arch.xml virsh list virsh start ArchVM 4. Login to your VM via either SSH or Console (working on this) and find the IP address of your Arch Linux VM. User / Passwords root / unraid6 **xl console ArchVM** <-- working on console access, can someone help me fix this OR ssh root@archvm Once you're logged in, to find the IP address of the VM issue ip addr 5. Once you're in you should be presented with the screenshot from above with the pretty Ascii art in the shape of the Arch logo. I compiled this image probably several days, if not weeks before you downloaded it so first we need to update the repositories as they will be stale. If there are any package upgrades, do them. pacman -Syu <-- this should be done as often as possible (weekly minimum ideally) 6. We are now ready to start installing packages! w00t! Arch uses something called 'pacman' as it's package manager and it couldn't be simpler. Here are the basics. All commands are CASE SENSITIVE!!! pacman -Sy <insert app name> <--- eg pacman -S sickbeard-git pacman -Ss <insert app name> <--- searches the repositories the VM can access for a package pacman -R <insert app name> <--- removes a package 7. Access unRAID data from the VM This is where KVM really shines, it's support of block-based protocols. VirtFS 9p is blazing fast and is not a network based protocol. There is an example line in the fstab of the VM ready for you to edit as you see fit, but it's a two step process with this VM. 7a. Edit the XML file to point your unraid shares (here is the section below as an example) <!-- Virtfs 9p shares --> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/Media/'/> <!-- This is the path of your unRAID share you want to access --> <target dir='Media'/> <!-- This will be referenced in your fstab --> </filesystem> 7b. Now edit the /etc/fstab file 'nano /etc/fstab' from within the VM to include this line. Note the 'Media' at the start which is a reference to the XML file where you 'passed through' the unRAID share. This isn't a network based protocol and gives the VM almost direct access to the drives so it is BLAZING fast. Media /mnt/Media 9p auto,x-systemd.automount,trans=virtio,version=9p2000.L,rw 0 0 There is still about a 30-60 second delay when the VM boots up whilst the unRAID gives it an IP. There is nothing I can do about this, it is not specific to this VM. Sorry! It annoys me too! Samba Add this entry (and change the IP of course) to /etc/fstab. Edit fstab with ' nano /etc/fstab '. nano /etc/fstab -------------- //10.0.0.2/Media /mnt/unraid cifs auto,x-systemd.automount,guest,noperm,noserverino,uid=nobody,gid=users 0 0 --------------------- How to create a data .img to act as a datastore for Plex and others... ** These steps aren't modified from my Xen VM thread but are almost identical so I'm sure you can figure it out ** The base .img for this install is only 50G, for some of you this won't be enough! Here are the steps to add more storage to your VM as some of you have ridiculous Plex libraries!! It is also useful as scratch space for Sabnzbd and/or Tranmission incomplete downloads too... 1. Log in to unRAID (not your VM) via SSH, telnet or the console 2. Power off the ArchVM if it isn't already xl shutdown ArchVM xl top <--- wait for ArchVM to disapear 3. cd to the directory of your VM for example: cd /mnt/user/cache_only/ArchVM 4. Create an .img file of the required size truncate -s 250G data.img <--- adjust the size as needed, as for as I know there's no limit. 5. Edit your arch.cfg with mcedit mcedit arch.cfg ----------- disk = [ 'file:/mnt/user/cache_only/ArchVM/arch.img,xvda,w', 'file:/mnt/user/cache_only/ArchVM/data.img,xvdb,w' <--- add this line ] 6. Boot up your ArchVM xl create arch.cfg -c 7. Check the data.img file is seen with fdisk -l ------------- Disk /dev/xvdb: 250 GiB 8. Create a partition structure and filesystem on the .img fdisk /dev/xvdb command: o command: n partition type: default p partition num: default 1 First sector: default Last sector: default command: w mkfs.ext4 /dev/xvdb1 9. Mount the new partition in /etc/fstab mkdir /mnt/data nano /etc/fstab -------------- /dev/xvdb1 /mnt/data ext4 defaults 0 1 Ctrl + X to save a quit the fstab file. Reboot. --------------------- The IronicBadger repository ! The reason for using Arch is two fold. First, it has an incredibly tiny footprint for a full distro and uses almost no RAM. Second, it's what I use and I host a repository full of my favourite apps which are not in the default repositories. The VM already has it added so needs no user interaction. I take requests on adding apps to my repository, but you must first do just a little homework. You must find out first whether the package already exists in the mainline repositories and if it doesn't you must check to see if it exists on the Arch User Repository. I will only add packages from the AUR to my repo! Arch Linux Main Repos - https://www.archlinux.org/packages/ AUR - https://aur.archlinux.org/packages/ For more information visit http://unraidrepo.ktz.me/. Download Links Personal hosting - http://repo.ktz.me/archVM/KVM/ArchKVM_v1.zip If you find this VM useful please consider making a donation.
  4. Just google using something like packer or yaourt. It's even in this thread somewhere I think (or my VM thread).
  5. Will update it soon and post when done. Just doing some reshuffling of software with the switch to KVM (I need to edit my compiling VM). EDIT: I created an Arch droplet on digitalocean to update the package. It's now uploaded, enjoy y'all.
  6. Until I learn Docker and am fully comfortable with it, everything. TBH, headless Linux VMs are going the way of the dodo with Docker but they may still have their place and it's so easy to make one to help new people I thought, why not.
  7. I have it working using the same trick for SMB with Media /mnt/Media 9p auto,x-systemd.automount,trans=virtio,version=9p2000.L,rw 0 0 That will still fail to mount at boot but as soon as it is accessed by a service, such as Plex, then it is mounted and works fine.
  8. Just a heads up. I've spent the afternoon tinkering and fighting XML files for KVM. The upshot is I have a working KVM guest with virtfs 9p unraid array support. I must say it feels faster than Xen and 9p is on a different planet to SMB (not a network based protocol). Working out a few details surround qcow2 vs raw IMGs atm and am shaping up for a release imminently. Converting an existing VM will work but will require a bit of effort on your part. I'll post these steps in a write up later on too. In summary, I'm making the switch for my systems here for now. 9p is really that good. Speak soon.
  9. yes. you can't have two hypervisors running alongside one another. Sent from my Nexus 5 using Tapatalk
  10. Having my own issue. Not used KVM before so need a pointer please someone. root@unRAID:/mnt/cache/VM/archVM# virsh create arch.xml error: Failed to create domain from arch.xml error: internal error: process exited while connecting to monitor: qemu-system-x86_64: -drive file=/mnt/cache/archlinux-2014.06.01-dual.iso,if=none,id=drive-ide0-0-0,readonly=on,format=raw: Duplicate ID 'drive-ide0-0-0' for drive Here is my .xml. I'm trying to install Arch. <domain type='kvm'> <name>ArchVM</name> <uuid>554cbf6b-aa75-4044-b1b3-c1005bea6062</uuid> <memory unit='GB'>8</memory> <currentMemory unit='GB'>8</currentMemory> <vcpu>2</vcpu> <os> <type arch='x86_64' machine='q35'>hvm</type> <loader>/usr/share/qemu/bios-256k.bin</loader> <boot dev='cdrom'/> </os> <features> <acpi/> </features> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <!-- VIRTUAL DISK (IMG)--> <disk type='file' device='disk'> <source file='/mnt/cache/VM/archVM/ArchVM.qcow2'/> <target dev='hda'/> </disk> <!-- VIRTUAL CD-ROM (ISO) --> <disk type='file' device='cdrom'> <source file='/mnt/cache/archlinux-2014.06.01-dual.iso'/> <target dev='hda' bus='ide'/> <readonly/> </disk> <graphics type='vnc' port='5900'> <listen type='address' address='0.0.0.0'/> </graphics> <interface type='bridge'> <source bridge='br0'/> </interface> <emulator>/usr/bin/qemu-system-x86_64</emulator> <input type='mouse' bus='ps2'/> </devices> </domain>
  11. You're booted into Xen mode. Boot into 'standard' unRAID as KVM is built into the Linux kernel but can't work alongside Xen concurrently.
  12. Here is a .vhd for unRAID v6 beta 6. https://drive.google.com/file/d/0Bz5njPYYj26iUHBScHhaSnhrbE0/edit?usp=sharing
  13. Could you post this in the AUR thread for nzbdrone? It's to do with how the package handles updates. I'd be curious if you could fix this properly, ignorepkg is somewhat of a crappy alternative.
  14. Yeah, reboot the compile VM with more RAM allocated! The error message was pretty cryptic and I had a v busy weekend. Glad it's sorted for you now.
  15. Fixed. HTPC Manager is now fixed. Default port is 8085.
  16. I have to open putty and run systemctl restart sickrage which takes about 30 seconds, then sickrage runs fine again. I've tried updating the program inside SickRage, but it says I have the latest. I had a different issue that I reported in the SickRage forums, and they suggested I run the dev branch to see if that resolves my other issue. So, if you have time, could you please build a SickRage dev version for the repro? Thanks in advance!!! There is no 'dev' version on AUR. Perhaps you could ask this Q in the sickrage thread on AUR and request the maintainer of the current package adds a dev version.
  17. I'm away this weekend but will endeavour to fix this upon my return. until then you can try learn how to use AUR yourself. steps are readily available on the arch wiki. Sent from my Nexus 5 using Tapatalk
  18. I'm away this weekend but will endeavour to fix this upon my return. until then you can try learn how to use AUR yourself. steps are readily available on the arch wiki. Sent from my Nexus 5 using Tapatalk
  19. Added. There was an error during compile but it built fine so please try it and if it doesn't work let me know.
  20. Added to repo, though there was an error during build. If it fails I'll look more into it. But please try as is, it may be fine.
  21. Works here. Just tested. I used md5 on my Mac to generate a checksum. MD5 (ArchVM_v5.zip) = 3ec8644d59a02e0985c46c915983fefa root@unraid_beta6b:/mnt/cache/VM# unzip ArchVM_v5.zip Archive: ArchVM_v5.zip creating: ArchVM/ inflating: ArchVM/arch.cfg inflating: ArchVM/arch.img root@unraid_beta6b:/mnt/cache/VM#
  22. https://aur.archlinux.org/packages/maraschinoproject-git Added.
  23. Any luck with the regular version? Updated, is now syncing with my repo. Give it 5 mins and it'll be up. 7 min turnaround. Now that's service! Haha Sent from my Nexus 5 using Tapatalk
×
×
  • Create New...