Grant McWilliams

9 items tagged "CentOS"

  • Automated install of CentOS 6 VM (32 bit)

    Note: Updated for XCP 1.5b/1.6

    Install Type

    • Non-interactive
    • Network boot
    • Commandline
    • Paravirtualized

    Prerequisites

    • XCP/Xenserver
    • Access to Internet
    • Working DHCP server
    • Working DNS name resolution

    Introduction

    This tutorial was written in the spirit of my CentOS 6 virtual machine (32 bit) installation on Xen howtowhich was based on the CentOS 5 version of the same. In those tutorials I created a disk, downloaded a kernel, kickstart file plus a xen config file which installed CentOS using the kickstart file. This has proven very popular since you can't install a paravirtualized domain using an install disk. This has been a very nice installation howto because you don't have to download any install CD/DVDs and you could create VMs using nothing more than a commandline login. It's also very nice because it can be mirrored locally if you're doing a bunch of them just by rsyncing a CentOS mirror locally then downloading my files and editing them.

    I've recently migrated a lot of my XEN systems to Xen Cloud Platform and it's a very different animal indeed. However, I still needed a system of creating CentOS Virtual Machines in that same manner. I didn't want to download a CentOS install DVD or need a graphical login to install the OS thus this tutorial was born.

    It uses the very same CentOS 6 kickstart file from my site as the Xen tutorial. It also uses the very same CentOS 6 repositories on the Internet so in a lot aspects it IS the same tutorial crafted for XCP but will be a bit shorter.

     More after the jump.

  • Automated install of CentOS 6 VM (64 bit)

    Note: updated for XCP 1.5b/1.6 and Xenserver 6.x.

    Install Type

    • Non-interactive
    • Network boot
    • Commandline
    • Paravirtualized

    Prerequisites

    • XCP/Xenserver
    • Access to Internet
    • Working DHCP server
    • Working DNS name resolution

    Introduction

    This tutorial was written in the spirit of my CentOS 6 virtual machine (64 bit) installation on Xen. In those tutorials I created a disk, downloaded a kernel, kickstart file plus a xen config file which installed CentOS using the kickstart file. This has proven very popular since you can't install a paravirtualized domain using an install disk. This has been a very nice installation howto because you don't have to download any install CD/DVDs and you could create VMs using nothing more than a commandline login. It's also very nice because it can be mirrored locally if you're doing a bunch of them just by rsyncing a CentOS mirror locally then downloading my files and editing them.

     

  • Automated install of CentOS 7 VM (64 bit)

    Install Type

    • Non-interactive
    • Network boot
    • Commandline
    • Paravirtualized

    Prerequisites

    • XCP/Xenserver
    • Access to Internet
    • Working DHCP server
    • Working DNS name resolution

    Introduction

    This tutorial was written in the spirit of my CentOS 6 virtual machine (64 bit) installation on Xen howto. In that tutorial I created a disk, downloaded a kernel, kickstart file plus a xen config file which installed CentOS using the kickstart file. This has proven very popular since you can't install a paravirtualized domain using an install disk. This has been a very nice installation howto because you don't have to download any install CD/DVDs and you could create VMs using nothing more than a commandline login. It's also very nice because it can be mirrored locally if you're doing a bunch of them just by rsyncing a CentOS mirror locally then downloading my files and editing them.

    I now use Xenserver and it's a very different animal indeed. However, I still needed a system of creating CentOS Virtual Machines in that same manner. I didn't want to download a CentOS install DVD or need a graphical login to install the OS thus this tutorial was born.

    Warning! This tutorial is for CentOS version 7 on Xenserver 6.5. To use Xenserver 6.2 or later you will need to shoehorn grub-legacy into it.I've managed to get CentOS7 to run in Xenserver 6.2 but I had to do the following. 

    1. Install CentOS7 in Xenserver 6.5 
    2. Boot the VM and login
    3. Uninstall grub2
    4. Manually download grub-legacy and install
    5. Download grub.conf file to /boot/grub/grub.conf (edit if necessary)
    6. Run the grub command to install it
      1. # grub
      2. grub> device (hd0) /dev/xvda
      3. grub> root (hd0,0)
      4. grub> setup (hd0)
      5. grub> quit
    7. Place exclude=grub* in your /etc/yum.conf
    8. Shut down the VM and export it using vm-export
    9. Copy the VM to the Xenserver 6.2 host and vm-import

     

  • Centos 5 virtual machine (64 bit) installation on Xen

    A lot of this tutorial was stolen from the CentOS wiki - http://wiki.centos.org/HowTos/Xen/InstallingCentOSDomU. I've shortened it by quite a bit to make it easier.  I assume you know this already but you will need to be logged in as root or have root privileges in order to execute this tutorial.

    Creating an Image

    The first step is to create an image that will hold the domU virtual disk. Since this can just be a file filled with zeros, our usual friend dd comes in handy.  The following command will create a /srv/xen/centos5.img file of 11GB, although the actual data blocks are allocated in a lazy fashion meaning that the disk image doesn't actually take up the whole 11GB until you fill it up. This is referred to as a sparse file.

     

    dd if=/dev/zero of=/srv/xen/centos5.img oflag=direct bs=1M seek=10240 count=1

     

  • Copy of Automated install of CentOS 7 VM (64 bit)

    Install Type

    • Non-interactive
    • Network boot
    • Commandline
    • Paravirtualized

    Prerequisites

    • XCP/Xenserver
    • Access to Internet
    • Working DHCP server
    • Working DNS name resolution

    Introduction

    This tutorial was written in the spirit of my CentOS 6 virtual machine (64 bit) installation on Xen howto. In that tutorial I created a disk, downloaded a kernel, kickstart file plus a xen config file which installed CentOS using the kickstart file. This has proven very popular since you can't install a paravirtualized domain using an install disk. This has been a very nice installation howto because you don't have to download any install CD/DVDs and you could create VMs using nothing more than a commandline login. It's also very nice because it can be mirrored locally if you're doing a bunch of them just by rsyncing a CentOS mirror locally then downloading my files and editing them.

    I now use Xenserver and it's a very different animal indeed. However, I still needed a system of creating CentOS Virtual Machines in that same manner. I didn't want to download a CentOS install DVD or need a graphical login to install the OS thus this tutorial was born.

    This tutorial is for CentOS version 7. 

     

  • Facebook CentOS Mirror

    I was updating a CentOS OS and I noticed that one of the mirrors it chose was mirror.facebook.net so out of curiousity I put that into my browser and this came up. Does Facebook have extra bandwidth and storage they don't know what to do with?

  • Install Xen 3.4 on CentOS 5 (32 bit) the easy way

     

    1. First we need to add the YUM repository holding the updated Xen. You will need to be logged in as root to carry out these instructions

     

    wget http://www.gitco.de/linux/i386/centos/5/CentOS-GITCO.repo -O /etc/yum.repos.d/CentOS-GITCO.repo

    2. Uninstall and reinstall the Virtualization group

    yum groupremove Virtualization
    yum update
    yum clean all
    yum groupinstall -y Virtualization
  • Install Xen 3.4 on CentOS5 (64bit) the easy way

    1. First we need to download the YUM repository file for the updated Xen. Then uninstall the old Virtualization group and reinstall it. This will upgrade the packages.

    wget http://www.gitco.de/linux/x86_64/centos/5/CentOS-GITCO.repo -O /etc/yum.repos.d/gitco.repo
    yum groupremove Virtualization
    yum groupinstall -y Virtualization

    Yum will probably want to upgrade some other files along with the ones we've chosen.

    Warning! If you get an error message from grubby this is bad!

    Installing: kernel-xen                   ####################### [ 9/13]
    grubby fatal error: unable to find a suitable template

    This means that your grub.conf file couldn't be written to for whaterver reason so you won't be able to successfully reboot. If you get this message you need to edit your /boot/grub/grub.conf file and make the kernel lines match the kernel you installed.

    Get your installed kernel version:

    [ root@vs / ] rpm -q kernel-xen

    kernel-xen-2.6.18-128.4.1.el5

    Now edit your /boot/grub/grub.conf to match this

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /boot/, eg.
    #          root (hd0,0)
    #          kernel /vmlinuz-version ro root=/dev/vgsys/lvroot
    #          initrd /initrd-version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.18-128.4.1.el5xen)
    root (hd0,0)
    kernel /xen.gz-3.4.0
    module /vmlinuz-2.6.18-128.4.1.el5xen ro root=/dev/vgsys/lvroot rhgb quiet
    module /initrd-2.6.18-128.4.1.el5xen.img

    4. Reboot - no really I mean it.

    5. Try it out by using the xm dmesg command

    \ \/ /___ _ __   |___ / |___ / / _ \
    \  // _ \ '_ \    |_ \   |_ \| | | |
    /  \  __/ | | |  ___) | ___) | |_| |
    /_/\_\___|_| |_| |____(_)____(_)___/

    (XEN) Xen version 3.3.0 (This email address is being protected from spambots. You need JavaScript enabled to view it.) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)) Tue Sep  9 20:18:14 CEST 2008
    (XEN) Latest ChangeSet: unavailable
    (XEN) Command line:
    (XEN) Video information:
    (XEN)  VGA is text mode 80x25, font 8x16
    (XEN)  VBE/DDC methods: V2; EDID transfer time: 2 seconds
    (XEN) Disc information:
    (XEN)  Found 1 MBR signatures
    (XEN)  Found 1 EDD information structures
    (XEN) Xen-e820 RAM map:

    That's about all. If you have any questions drop a comment here.

  • Install xen-tools on CentOS 5.x

     

    Download xen-tools, install rpmstrap and install xen-tools. If there's a newever version of xen-tools available substitute that filename

    yum install -y rpmstrap 
    wget http://xen-tools.org/software/xen-tools/xen-tools-3.9.tar.gz
    tar -xzvpf xen-tools-3.9.tar.gz
    cd xen-tools-3.9/
    make install

    I've not using xen-tools that much but I wanted to put together a tutorial anyway. Let me know how it goes.



EasyTagCloud v2.8