Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Create Centos 6.5 Guest

Featured Replies

Just incase anyone cares to know the steps to make a CentOS guest this is how I created mine. If anyone reads this and does a OMG why did you do x y or z don't hesitate to point it out.

 

Step 1 download CentOS ISO.

 

Easiest way is to just grab it on Unraid.

I have a FILES share and just created a subfolder called linux for all my ISO's

 

cd /mnt/user/FILES/linux

wget http://mirror.symnds.com/CentOS/6.5/isos/x86_64/CentOS-6.5-x86_64-bin-DVD1.iso

 

or any mirror from CentOS

http://isoredirect.centos.org/centos/6/isos/x86_64/CentOS-6.5-x86_64-bin-DVD1.iso

 

2.) create folder and mount iso

 

cd /mnt

mkdir iso

mount -o loop  /mnt/user/FILES/linux/CentOS-6.5-x86_64-bin-DVD1.iso /mnt/iso

 

3.) create a configuration file for the new virtual guest, I used the same file structure as Ironicbadger used for the ArchVM tutorial

 

/mnt/user/cache_only

mkdir CentOS

cd CentOS

 

mcedit centos.cfg

 

paste in the following

 

name = "CentOS"

#bootloader = "pygrub"

kernel = "/mnt/iso/isolinux/vmlinuz"

ramdisk = "/mnt/iso/isolinux/initrd.img"

memory = 2048

vcpus = '2'

disk = [

    'file:/mnt/user/FILES/linux/CentOS-6.5-x86_64-bin-DVD1.iso,hdc:cdrom,r',

    'phy:/mnt/user/cache_only/CentOS/centos.img,xvda,w',

        ]

        vif = [ 'mac=00:16:3e:aa:bb:cc,bridge=br0' ]

 

4.) Create a img file for the disk, decide on the initial size of the disk for whatever purpose you are going to do this would make a 10GB disk

 

truncate -s 10G centos.img

 

5.) install CentOS to the Guest

 

xl create centos.cfg -c

 

skip the disk check, for some reason it looses the disk now even though it says its found the local install media, just select reinitialize all and it carries on with no more issues.

 

6.) when the install is completed it will reboot, I ran a "xl destroy CentOS" to kill the session as the centos.cfg file will just keep rebooting with the DVD iso to reinstall once its stopped, re-edit the centos.cfg and change it to the following.

 

 

name = "CentOS"

bootloader = "pygrub"

#kernel = "/mnt/iso/isolinux/vmlinuz"

#ramdisk = "/mnt/iso/isolinux/initrd.img"

memory = 2048

vcpus = '2'

disk = [

#    'file:/mnt/user/FILES/linux/CentOS-6.5-x86_64-bin-DVD1.iso,hdc:cdrom,r',

    'phy:/mnt/user/cache_only/CentOS/centos.img,xvda,w',

        ]

        vif = [ 'mac=00:16:3e:aa:bb:cc,bridge=br0' ]

 

Then start it back up

xl create centos.cfg -c

 

you should boot straight into the console

 

7.) Configure CentOS for Networking

 

change the hostname of the box

 

vi /etc/sysconfig/network

 

enable networking

 

vi /etc/sysconfig/network-scripts/ifcfg-eth0

 

change the line that says ONBOOT=no to ONBOOT=yes

Delete the line that says NM_CONTROLLED=yes

and if required to change it to a static IP over DHCP

 

Disable SELINUX ( THIS IS OPTIONAL )

 

vi /etc/sysconfig/selinux

change SELINUX=enforcing to disabled or permissive

 

Reboot the box at this point and reconnect to it

 

xl console CentOS

 

check you have network by running the following

 

ifconfig you should see your eth0 with the ip address

 

now do a update on the server to get it to the latest patch level

yum update

 

if you dont like vi and want nano or vim instead then run the following

yum install nano

yum install vim

 

next install autofs

 

yum install autofs

 

point autofs to the Unraid box, these were cloned from how IronicBadgers autofs is set on Arch

 

rm /etc/auto.master

vi /etc/auto.master

paste in the following

 

/net -hosts --timeout=60

 

/media/Tower /etc/auto.Tower --timeout=0

 

nano /etc/auto.Tower

paste in the following

 

data -fstype=cifs,guest,rw ://Tower/data

 

start up autofs

 

service autofs start

 

if this connects you and there are no issues run the following to make it autostart on reboots etc

 

chkconfig autofs on

 

You now have a basic CentOS guest to do with whatever you please.

 

Good writeup!

 

Easier way to enable networking:

sed -i 's|no|yes|' /etc/sysconfig/network-scripts/ifcfg-eth0
ifup eth0

 

disable Selinux:

sed -i 's|enforcing|disabled|' /etc/sysconfig/selinux

 

mine also wanted xenbr0 for the network bridge instead of br0 like in your writeup (think xenbr0 is default bridge naming?)

 

Myk

  • 2 weeks later...

Great guide!

 

I am running into an issue after installation. I comment out the line that points to the installer and when I load centos again it keeps going into the installer. I have even deleted the line in the .cfg file and it still loads into the installer. I'm wondering if I did something wrong during the initial installation?

make sure to edit your .cfg

 

name = "CentOS"
bootloader = "pygrub"
#kernel = "/mnt/iso/isolinux/vmlinuz"
#ramdisk = "/mnt/iso/isolinux/initrd.img"
memory = 2048
vcpus = '2'
disk = [
#    'file:/mnt/user/FILES/linux/CentOS-6.5-x86_64-bin-DVD1.iso,hdc:cdrom,r',
    'phy:/mnt/user/cache_only/CentOS/centos.img,xvda,w',
        ]
vif = [ 'mac=00:16:3e:aa:bb:cc,bridge=br0' ]

 

 

Did you miss the bootloader line?

 

Myk

 

Ahh that was it! Forgot to un-comment the bootloader line

 

Thanks for the help!

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.