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


Recommended Posts

[glow=red,2,300]This is a work in progress.

[/glow]

 

I am creating this guide and will be consolidating a lot of good information that is floating around in various threads on here as well as adding new information.

 

For starters, a complete walkthrough on how to install Arch.

 

I will also be adding posts below with other good / important info and how to "tweak" and get the most out of.

 

Reporting / Stats / Graphs, Hardware Sensors, Web GUIs, Notification, UPS, "Sexing it Up" looks wise, Speed Tweaks, NFS, Samba, Etc.

 

For those of you who were successful installing Arch Linux and Xen or KVM....

 

Look below... I walk you through getting Arch, Xen, libvirt and virt-manager playing together on a headless server and running it remotely from a Windows or Mac PC.

 

NOTE: In my guide I am assuming you are logging in as ROOT.

Link to comment
  • Replies 247
  • Created
  • Last Reply

Top Posters In This Topic

Managing your Server via Webmin

 

Status Screen:

vzBd6y2.png

MySQL:

 

LMtK1bk.png

 

Samba Windows File Sharing:

7wH6vty.png

 

 

1. Install Webmin:

 

pacman -S webmin

 

2. Edit the following file and allow remote access:

 

nano /etc/webmin/miniserv.conf

 

Add your network (example: 192.168.1.0) or 0.0.0.0 to the following line:

 

allow=127.0.0.1

 

3. Start the Webmin Service

 

systemctl start webmin.service

 

4.  Now you can use any browser and connect with 'http://<name of your computer or IP Address>:10000' to your computer. The default rights of Webmin are set to root only. So you can login with the root password of that machine.

 

5. If all goes well and you find this program useful, make it start at boot.

 

systemctl enable webmin.service

 

Below is a list of the standard modules where you configure / mange the following from one WebGUI:

(Note: They have various skins and some additional 3rd Party Modules too. Checkout their website)

 

adsl-client apache dnsadmin bind8 ipfw backup-config bacula-backup bandwidth init burner pserver change-user passwd cluster passwd cluster-copy shellcf engine custom dhcpd quota mount dovecot fetchmail file fsdump filter frox grub tunnel heartbeat ipfilter ipsec inittab jabber krb5 ldap-clientldap-server ldap-useradmin lilo firewall raid logrotate lvm mailcapmon majordomo mysql sgiexports exports-nfs4 bsdexports exports hpuxexports dfsadmin nis net xinetd inetd openslp pam phpini pap ppp-client pptp-client pptp-server format bsdfdisk fdisk cpan postfix postgresql lpadmin proftpd procmail htaccess-htpasswd qmail adminrbac mailboxes proc smart-status telnet sshd stunnel samba at cron webmincron sentry sendmail smf shorewall shorewall6 package-updates software zones spam squid sarg man syslog syslog-ng system-status time status tcpwrappers ajaxterm updown usermin useradmin vgetty wuftpd webalizer webminlog webmin servers acl iscsi-client iscsi-server iscsi-target idmapd

Link to comment

Enabling libvirt with Xen support in Arch Linux

 

IMPORTANT NOTE: There are some tricks and configuration tweaks so life is easier in Virt-Manager if you are using Xen. I will get to those in the next day or so. Example: Setting the Xen PV drivers as default, Installing VM in PV mode, etc.

 

1. Login as root or if you are logged as a different user

 

su

 

2. We want Arch to uses all the Processors when it compiles and speed up the time it takes to compile.

 

nano /etc/makepkg.conf

 

Hit Ctl then - Tells nano to goto a specific line number. When prompted, enter:

 

37

 

Change

 

#MAKEFLAGS="-j2"

 

To

 

MAKEFLAGS="-j8" <--- Replace 8 with the number of cores that you system has

 

3. We want to compile programs in RAM and not on the Disk. This is speed up compiling times.

 

Hit Ctl then - Tells nano to goto a specific line number. When prompted, enter:

 

63

Uncomment the following so it looks like this:

 

BUILDDIR=/tmp/makepkg

 

4. Install packages we need to compile libvirt

 

pacman -S base-devel abs openbsd-netcat virt-manager

 

5. Update Arch Linux Build System

 

abs

 

6. Download the Default Package Build that Arch uses for libvirt

 

ABSROOT=. abs community/libvirt

 

7. Go to the libvirt PKGBUILD we just downloaded

 

cd community/libvirt/

 

8. Edit the Package Build

 

nano PKGBUILD

 

Hit Ctl then - <--- Tells nano to goto a specific line number. When prompted, enter:

 

54

 

Change

 

--without-xen

 

To

 

--with-xen

 

9. Compile and make libvirt Arch Linux Package

 

makepkg -si --asroot

 

Answer Yes when it asks to install any dependencies.

 

Answer No if it asks to edit anything.

 

Answer Yes to to install.

 

 

 

Link to comment

Configure libvirt to work via SSH or TCP

 

1. Configure libvirt

 

nano /etc/libvirt/libvirtd.conf

 

2. Uncomment the following lines:

 

listen_tls = 0 <-- Line 22
listen_tcp = 1 <-- Line 33
unix_sock_group = "libvirt" <-- Line 81
unix_sock_ro_perms = "0777" <-- Line 88
unix_sock_rw_perms = "0770" <-- Line 98
unix_sock_dir = "/var/run/libvirt" <-- Line 101
auth_unix_ro = "none" <-- Line 129
auth_unix_rw = "none" <-- Line 138

Uncomment and change the following line from:

auth_tcp = "sasl" <-- Line 146

To:

auth_tcp = "none"

 

3. For TCP tell libvirt to listen for it

 

nano /etc/conf.d/libvirtd

 

Modify the following line

 

From:

LIBVIRTD_ARGS="-p /var/run/libvirtd.pid"

To:

LIBVIRTD_ARGS="-p /var/run/libvirtd.pid --listen"

 

4. Enable QEMU to use root user

 

nano /etc/libvirt/qemu.conf

 

Uncomment the following:

#user = "root" <-- Line 229

Change:

group = "kvm" <-- Line 233

To:

group = "root"

 

5. Enable Xen to use libvirt

 

nano /etc/xen/xend-config.sxp

 

Uncomment and change the following line

#(xend-unix-server no) <-- Line 61

To

(xend-unix-server yes)

 

6. Create libvirt group

 

groupadd libvirt

 

7. Add root to libvirt group

 

gpasswd -a root libvirt

 

8. Start libvirtd at boot

 

systemctl enable libvirtd

Link to comment

Run Linux GUI Applications On Your Windows / Mac via SSH + X11 Forwarding

 

On an Arch Linux HEADLESS Server every single window you see open below on my Windows PC... Is a Linux GUI / Desktop Application

 

BnxvE97.png

 

On my Windows PC

 

XMing

 

Download and install xming

 

Configure XMing

 

1. In Windows, select Xming ? XLaunch

 

2. At the Display settings dialog box, select Multiple windows and set the Display number as 0. Click on Next.

 

3. Keep clicking on Next button till you reach the Finish configuration page, then click on the Finish button.

 

Putty

 

Download and Install Putty

 

Configure Putty

 

1. Start PuTTY.

 

2. In the PuTTY Configuration section, on the left panel, select Connection ? SSH ? X11

 

3. On the right panel, click on the Enable X11 forwarding checkbox

 

4. Set the X display location as :0.0

 

5. Click on Session option on the left panel.

 

6. Enter the hostname or IP address in the Host Name textbox

 

7. Save the session.

 

Arch Linux Server

 

1. Install the packages I need

 

pacman -S openssh terminus-font xorg-xauth xterm xorg-xinit

 

2. Configure openssh for X11 Forwarding

 

nano /etc/ssh/sshd_config

AllowTcpForwarding yes
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
Compression yes

 

nano /etc/ssh/ssh_config

 

ForwardX11 yes
ForwardX11Trusted yes <-- Had to add that one

 

3. Enable SSH to start on boot

 

systemctl enable sshd.service

 

4. Start SSH

 

systemctl start sshd.service

 

I "sexed" my xterm up by doing the following

 

NOTE: This is for Arch and might work in other Linux Distros but that is not guaranteed. Each one may / may not configure their xterm differently. The popular Linux Distros have wikis on customizing xterm if you want to learn more.

 

nano ~/.Xdefaults <--- You create this file

 

xterm*dynamicColors:     true
xterm*background:        black
xterm*foreground:        white
xterm*utf8:            2
xterm*eightBitInput:    true
xterm*saveLines:        32767
xterm*scrollTtyKeypress: true
xterm*scrollTtyOutput: false
xterm*scrollBar: false
xterm*loginShell: true
xterm*jumpScroll: true
xterm*multiScroll: true
xterm*toolBar: false
xterm*geometry: 100x30
xterm*faceName: Terminus:style=Regular:size=10
xterm*selectToClipboard: true

 

Test if SSH with X11 Forwarding is working

 

xterm

 

NOTE: Will start xterm on the server and open the GUI on your Windows PC. You can either type exit in your xterm that shows up on your Windows PC or you can CTL-C to quit.

 

To run Linux GUI Programs in the Background and still have access to your SSH session

 

xterm &

NOTE: Putting a space and then a & at the end will start it and it will run in the background and allow you start more programs like virt-manager. If you close the window in Windows, it will close the program running on the server.

 

A few examples of programs you might want to run

 

virt-manager, gparted, makemkv, etc.

Link to comment

Installing Monitorix System Monitoring Tool

 

Monitorix is an open source, lightweight system monitoring tool designed to monitor as many services and system resources as possible. It has been created to be used under production UNIX/Linux servers, but due to its simplicity and small size many use it on embedded devices as well

 

hoSXqTk.png

 

cJ4m7t8.jpg

 

D2YRTyo.jpg

 

1. If you haven't done so already, install Yaourt so Arch can download and install packages from the AUR (Arch User Repository).

 

nano /etc/pacman.conf

 

Add the following above the testing repo

 

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

 

2. Install Yaourt

 

pacman -Sy yaourt

 

3. Install Monitorix from AUR

 

yaourt -S monitorix

 

Answer Yes when it asks to install any dependencies.

 

Answer No if it asks to edit anything.

 

Answer Yes to to install.

 

4. Edit monitorix config

 

nano /etc/monitorix.conf

 

Customize the following

 

title = <-- Line 6
refresh_rate =  <-- Line 9
temperature_scale = <-- Line 14

 

Enable the Simple-Perl-HTTP-Server

 

NOTE: You can use Apache, Lighttpd, Nginx, etc. Web Server... The Simple-Perl-Http-Server is similar to what Webmin, Sickbeard, CouchPotato each use. As long as you set it to a separate port from everything, it will not harm other web apps you run.

 

enabled = y <-- Line 25 
host =  <-- Line 26
port =  <-- Line 27
hosts_allow = <-- Line 33 Set to your network or 0.0.0.0 

 

5. Enable Monitorix at Boot

 

systemctl enable monitorix

 

6. Start Monitorx

 

systemctl start monitorix

 

IMPORTANT NOTE: By default many of the monitor tools are enabled. However, there are several that are not enabled by default (lm_sensors for example). To learn more and how to customize / enable things in Monitorix... Visit their website. Monitorix

 

If you wear a pocket protector or you go to Star Trek Conventions or haven't seen a girl naked in real life...

 

Monitorix does everything I could hope for and more. However, I know many of you are like a fat kid in a candy store with stats, graphs, charts, etc. and like to show them off to attractive women and your normal friends in hopes to impress them (Note: It makes attractive women want to go date another "bad" boy and it bores your non-dorky friends).

 

Knowing this, below are some other WebGUI Monitoring Tools that are more robust. Each is located in the Arch Linux User Repository. You can install them (I didn't say configure) as easy as Monitorix above. Simple type yaourt -S nagios or cacti or munin. These are complex programs and they have plenty of information / places to go for help... the unRAID forum isn't it.

 

Nagios  Cacti  Munin

Link to comment

Miscellaneous Stuff that will be added to the correct place later

 

Setting Up the network bridge in Xen or KVM

 

NOTE Your NIC will not be called eth0 but I use that as an example throughout this guide. You will need to enter the correct NIC name for your network card.

 

1. Find out the name of your NIC.

 

ip address

 

2. Edit NIC so it can work as a bridge.

 

nano /etc/netctl/eth0 <-- Remember I assume eth0 in this guide but use the correct NIC name for your system

 

Change the following:

 

ip=dhcp (or static) to ip=no

 

3. Disable eth0 from starting at boot.

 

sudo netctl disable eth0 (or whatever you called it)

 

4. Just to make sure... Go see if you netctl@eth0 in the following two directories:

 

/etc/systemd/system 
/etc/systemd/system/multi-user.target.wants 

 

If you see anything netctl@eth0... delete them. However, leave the xenbr0 stuff alone.

 

5. Create xenbr0 (br0 if KVM)

 

nano /etc/netctl/xenbr0 (or br0 if KVM)

 

Example below of what a static would look like

 

Description="bridge connection"
Interface=xenbr0 # <-- br0 if KVM
Connection=bridge
BindsToInterfaces=(eth0) #<--- Have that match the name of your NIC
IP=static # <--- If you want dhcp... Put dhcp instead of static and comment out the rest below
Address=('192.168.1.1/24') #<--- Customize for your system
Gateway='192.168.1.254' #<--- Customize for your system
DNS=('192.168.1.254') #<--- Customize for your system

 

5. Enable Xenbr0 (br0 if KVM) with new settings

 

netctl enable xenbr0 <-- br0 if KVM

 

7. Reboot for changes to take effect

 

Creating a User and giving it SUDO rights

 

1. If you haven't already, create a user

 

useradd -m -g users -G wheel -s /bin/bash USERNAME

 

2. Set up a password for the user

 

passwd USERNAME

 

3. Install sudo

 

pacman -S sudo

 

Then your new user sudo rights

 

1. You do this running the following command:

 

 EDITOR=nano visudo

 

2. Uncomment the following line

 

%wheel ALL=(ALL) NOPASSWD: ALL

 

3. Save it

 

4. Test it out by logging in as your new user

 

su USERNAME

 

sudo pacman -Syu

 

5. When finished, drop back out to root again.

 

exit

 

How to repair grub in Arch Linux

1. Reboot back into Archboot.

 

2. When the blue screen to install Archboot appears hit CTL+F1 or CTL+F2 until you get a screen where you can hit enter to get to a commmand prompt.

 

3. Mount the root (/) partition of where you installed Arch (I am assuming /dev/sda2):

 

mount /dev/sda2 /mnt

 

4. Prepare the boot partition to be mounted (I am assuming /dev/sda1).

 

mkdir -p /mnt/boot

 

5. Mount the boot (/boot) partition of where you installed it (I am assuming /dev/sda1):

 

mount /dev/sda1 /mnt/boot

 

6. Find out the UUIDs of your partitions.

 

blkid

 

7. Update the Arch install with the correct UUID for /boot.

 

Highlight the UUID for /boot with your mouse

 

nano /mnt/etc/fstab

 

Replace whatever UUID is there now with the correct UUID that you just cut and now need to paste (click the mouse button to paste).

 

Save it.

 

8. Update the Arch install with the correct UUID for root (/).

 

Highlight the UUID for root (/) with your mouse.

 

nano /mnt/etc/fstab

 

Replace whatever UUID is there now with the correct UUID that you just cut and now need to paste (click the mouse button to paste).

 

Save it.

 

9. Do the above for any separate Arch partitions that you might have done during install (/home /var etc.)

 

10. We need to chroot into our Arch install.

 

arch-chroot /mnt /bin/bash

 

You are now logged into your Arch install. This is a VERY useful tool you might use in the future. I am just showing you how to fix grub and create a new one.

 

However, lets say you made a mistake and didn't load the correct driver into the ramfs and are unable to boot your system. You could go edit "/etc/mkinitcpio.conf" and add it and run "mkinitcpio -p linux" and update the ramfs with the correct driver loaded. It would save you from having to reinstall Arch.

 

11. Let's update grub with the new UUIDs we corrected earlier.

 

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

 

12. Exit out of your Arch Install

 

exit

 

13. umount your Arch Install

 

umount -R /mnt

 

14. Reboot

Link to comment

Setting up Color Prompts and Directory Colors

 

Let's do the following and give you a fancy console while we are at it (normal user is in blue and when logged in as root it is red plus other goodies).

 

1. Get the old bash.bashrc out of the way but keep a backup.

 

mv /etc/bash.bashrc /etc/bash.bashrc-backup

 

2. Create a new bash.bashrc and copy and paste the following below.

 

nano /etc/bash.bashrc

 

# /etc/bash.bashrc
#
# https://wiki.archlinux.org/index.php/Color_Bash_Prompt
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !

# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.

# If not running interactively, don't do anything!
[[ $- != *i* ]] && return

# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control.
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize

# Enable history appending instead of overwriting.
shopt -s histappend

case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
	PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
	;;
screen)
	PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
	;;
esac

# fortune is a simple program that displays a pseudorandom message
# from a database of quotations at logon and/or logout.
# If you wish to use it, please install "fortune-mod" from the
# official repositories, then uncomment the following line:

# [[ "$PS1" ]] && /usr/bin/fortune

# Set colorful PS1 only on colorful terminals.
# dircolors --print-database uses its own built-in database
# instead of using /etc/DIR_COLORS. Try to use the external file
# first to take advantage of user additions. Use internal bash
# globbing instead of external grep binary.

# sanitize TERM:
safe_term=${TERM//[^[:alnum:]]/?}
match_lhs=""

[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
[[ -z ${match_lhs} ]] \
&& type -P dircolors >/dev/null \
&& match_lhs=$(dircolors --print-database)

if [[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] ; then

# we have colors :-)

# Enable colors for ls, etc. Prefer ~/.dir_colors
if type -P dircolors >/dev/null ; then
	if [[ -f ~/.dir_colors ]] ; then
		eval $(dircolors -b ~/.dir_colors)
	elif [[ -f /etc/DIR_COLORS ]] ; then
		eval $(dircolors -b /etc/DIR_COLORS)
	fi
fi

PS1="$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h'; else echo '\[\033[01;32m\]\u@\h'; fi)\[\033[01;34m\] \w \$([[ \$? != 0 ]] && echo \"\[\033[01;31m\]\[\033[01;34m\] \")\\$\[\033[00m\] "

# Use this other PS1 string if you want \W for root and \w for all other users:
# PS1="$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h\[\033[01;34m\] \W'; else echo '\[\033[01;32m\]\u@\h\[\033[01;34m\] \w'; fi) \$([[ \$? != 0 ]] && echo \"\[\033[01;31m\]\[\033[01;34m\] \")\\$\[\033[00m\] "

alias ls="ls --color=auto"
alias dir="dir --color=auto"
alias grep="grep --color=auto"
alias dmesg='dmesg --color'

# Uncomment the "Color" line in /etc/pacman.conf instead of uncommenting the following line...!

# alias pacman="pacman --color=auto"

else

# show root@ when we do not have colors

PS1="\u@\h \w \$([[ \$? != 0 ]] && echo \" \")\$ "

# Use this other PS1 string if you want \W for root and \w for all other users:
# PS1="\u@\h $(if [[ ${EUID} == 0 ]]; then echo '\W'; else echo '\w'; fi) \$([[ \$? != 0 ]] && echo \" \")\$ "

fi

PS2="> "
PS3="> "
PS4="+ "

# Try to keep environment pollution down, EPA loves us.
unset safe_term match_lhs

# Try to enable the auto-completion (type: "pacman -S bash-completion" to install it).
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion

# Try to enable the "Command not found" hook ("pacman -S pkgfile" to install it).
# See also: https://wiki.archlinux.org/index.php/Bash#The_.22command_not_found.22_hook
[ -r /usr/share/doc/pkgfile/command-not-found.bash ] && . /usr/share/doc/pkgfile/command-not-found.bash
export EDITOR=nano

 

3. Create /etc/DIR_COLORS and copy and paste the following:

 

nano /etc/DIR_COLORS

 

# Configuration file for the color ls utility
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.

# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR all

# Extra command line options for ls go here.
# Basically these ones are:
#  -F = show '/' for dirs, '*' for executables, etc.
#  -T 0 = don't trust tab spacing when formatting ls output.
OPTIONS -F -T 0

# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM xterm
TERM xterm-color
TERM vt100
TERM rxvt
TERM rxvt-256color
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM rxvt-unicode-256color
TERM rxvt-unicode256
TERM screen

# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1

# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes: 
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00	# global default, although everything should be something.
FILE 00 	# normal file
DIR 01;34 	# directory
LINK 01;36 	# symbolic link
FIFO 40;33	# pipe
SOCK 01;35	# socket
BLK 40;33;01	# block device driver
CHR 40;33;01 	# character device driver

# This is for files with execute permission:
EXEC 01;32 

# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
.cmd 01;32 # executables (bright green)
.exe 01;32
.com 01;32
.btm 01;32
.bat 01;32
.tar 01;31 # archives or compressed (bright red)
.tgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.zip 01;31
.z   01;31
.Z   01;31
.gz  01;31
.jpg 01;35 # image formats
.gif 01;35
.bmp 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35

 

4. Log out and back in to see your changes. If you already created users, delete the .bashrc in the their home directories.

Link to comment

do we need to reboot before testing xterm? as I get a error display is not set

 

will have to wait to reboot until my unraid finishes rebuilding - red balled drive 13 :(

 

Otherwise so far VERY GOOD guide - much appreciated

 

Myk

 

I had the same error.  I got it working but can't remember if a reboot was what fixed it.

 

My first guess would be yes.

 

Edit:  I take that back.  XMING was installed on my computer but was not running.  That was my issue.

 

John

Link to comment

FYI, this does not exist

 

nano /etc/netctl/eth0

 

I know it needs the nic name, but it is not there.  I am still forced to copy the example file into the directory and even then it is enp0s25

 

Unless of course I missed something.

 

--

 

OK, so i just want to make sure this is accurate because of this error

 

arch_1 ~ # sudo netctl disable enp0s25
No regular unit file found for profile 'enp0s25'

 

I mean my xenbr0 IP works, so I assume it is right, but still must ask

 

 

arch_1 ~ :( # ip address

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: enp0s25: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master xenbr0 state UP group default qlen 1000

    link/ether 00:22:19:32:61:4e brd ff:ff:ff:ff:ff:ff

    inet6 fe80::222:19ff:fe32:614e/64 scope link

      valid_lft forever preferred_lft forever

3: enp1s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000

    link/ether 00:15:17:2e:aa:68 brd ff:ff:ff:ff:ff:ff

4: enp1s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000

    link/ether 00:15:17:2e:aa:69 brd ff:ff:ff:ff:ff:ff

5: xenbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default

    link/ether 00:22:19:32:61:4e brd ff:ff:ff:ff:ff:ff

    inet 192.168.0.3/24 brd 192.168.0.255 scope global xenbr0

      valid_lft forever preferred_lft forever

    inet6 fe80::222:19ff:fe32:614e/64 scope link

      valid_lft forever preferred_lft forever


Link to comment

FYI, this does not exist

 

nano /etc/netctl/eth0

 

I know it doesn't. I indicated in my guide that it wouldn't and used it simply as an example.

 

Arch uses Predictable Network Interface Names (and most Linux Distros are moving to this if they haven't already) for a variety of reasons. But mostly because it makes administration easier.

 

When you installed Arch you set up your NIC under a different name than eth0.

 

I know it needs the nic name, but it is not there.  I am still forced to copy the example file into the directory and even then it is enp0s25

 

Your NIC names are enp1s0f0 and enp1s0f1 and the command I tell you to run "ip address" will show you them.

 

Not sure where you are getting enp0s25 from.

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

Link to comment

Can you make a section on on how to make a basic ArchU to move unRAID plugins etc to.

 

After you get your ArchU VM installed and boot into it...

 

Install Yaourt so Arch can download and install packages from the AUR (Arch User Repository)

 

nano /etc/pacman.conf

 

Add the following above the testing repo

 

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

 

Install Yaourt

 

pacman -Sy yaourt

 

Now that you have access to AUR, there are 10,000+ apps you can install into your VM.

 

Search the AUR website for Linux Apps you want to install:

 

Arch User Repository

 

You can also search AUR using Yaourt:

 

yaourt -Ss sickbeard

yaourt -Ss owncloud

yaourt -Ss crashplan

yaourt -Ss subsonic

 

To install:

 

yaourt -S sickbeard

yaourt -S owncloud

yaourt -S crashplan

yaourt -S subsonic

Link to comment

Can you make a section on on how to make a basic ArchU to move unRAID plugins etc to.

 

After you get your ArchU VM installed and boot into it...

 

Install Yaourt so Arch can download and install packages from the AUR (Arch User Repository)

 

nano /etc/pacman.conf

 

Add the following above the testing repo

 

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

 

Install Yaourt

 

pacman -Sy yaourt

 

Now that you have access to AUR, there are 10,000+ apps you can install into your VM.

 

Search the AUR website for Linux Apps you want to install:

 

Arch User Repository

 

You can also search AUR using Yaourt:

 

yaourt -Ss sickbeard

yaourt -Ss owncloud

yaourt -Ss crashplan

yaourt -Ss subsonic

 

To install:

 

yaourt -S sickbeard

yaourt -S owncloud

yaourt -S crashplan

yaourt -S subsonic

 

 

FYI, this does not exist

 

nano /etc/netctl/eth0

 

I know it doesn't. I indicated in my guide that it wouldn't and used it simply as an example.

 

Arch uses Predictable Network Interface Names (and most Linux Distros are moving to this if they haven't already) for a variety of reasons. But mostly because it makes administration easier.

 

When you installed Arch you set up your NIC under a different name than eth0.

 

I know it needs the nic name, but it is not there.  I am still forced to copy the example file into the directory and even then it is enp0s25

 

Your NIC names are enp1s0f0 and enp1s0f1 and the command I tell you to run "ip address" will show you them.

 

Not sure where you are getting enp0s25 from.

 

Number 2.

 

As for part one,  I. Meant no file existed.  Understand using Nic name,  but it too is not there and needed the example copied and renamed.

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.