Difference between revisions of "Vnx-rootfscentos"

From VNX
Jump to: navigation, search
(Configuration)
Line 105: Line 105:
 
  perl /media/cdrom/install_vnxdaemon
 
  perl /media/cdrom/install_vnxdaemon
 
</ul-->
 
</ul-->
<li>Disable the services you are not going to use (you can see the list of active services with "chkconfig --list"). For example to disable sendmail and bluetooth:</li>
+
<!--li>Disable eth0 autoconfiguration to avoid delays at startup. Edit  /etc/sysconfig/network-scripts/ifcfg-eth0 file and change "ONBOOT" line to:</li>
chkconfig sendmail off
 
chkconfig bluetooth off
 
<li>Disable eth0 autoconfiguration to avoid delays at startup. Edit  /etc/sysconfig/network-scripts/ifcfg-eth0 file and change "ONBOOT" line to:</li>
 
 
  ONBOOT=no
 
  ONBOOT=no
 
+
-->
 
<li>Optionally:</li>
 
<li>Optionally:</li>
 
<ul>
 
<ul>
<li>Disable the firewall. Firewall is enabled by default which could be problematic for testing purpose systems. If desired, disable it using the following command:</li>
+
<li>Disable the services you are not going to use to speed up the virtual machine startup (you can see the list of active services with "chkconfig --list"). For example to disable sendmail and bluetooth:</li>
 +
chkconfig sendmail off
 +
chkconfig bluetooth off
 +
<li>Disable the firewall. Firewall is enabled by default which could be problematic for testing purpose systems. If desired, disable it using the following command:</li>
 
  chkconfig iptables off
 
  chkconfig iptables off
 
  chkconfig ip6tables off
 
  chkconfig ip6tables off
<li>Enable IPv6 by deleting the following lines in /etc/modprobe.conf:</li>
+
<!--li>Enable IPv6 by deleting the following lines in /etc/modprobe.conf:</li>
 
  alias ipv6 off
 
  alias ipv6 off
 
  options ipv6 disable=1
 
  options ipv6 disable=1
</ul>
+
</ul-->
 
 
 
<li>Create a file /etc/vnx_rootfs_version to store version number and informacion about modifications:</li>
 
<li>Create a file /etc/vnx_rootfs_version to store version number and informacion about modifications:</li>
 
<pre>
 
<pre>

Revision as of 20:21, 20 May 2012

How to create a CentOS root filesystem for VNX

(being updated...do not use)

Basic installation

Follow this procedure to create a CentOS based root filesystem for VNX. The procedure has been tested with CentOS 6.2.

  • Create the filesystem disk image:
  • qemu-img create -f qcow2 vnx_rootfs_kvm_centos.qcow2 8GB
    
  • Get CentOS installation DVD (we recommend to use the complete DVD; the LiveDVD version does not include the customization menu to choose among different installation profiles: minimal, desktop, etc). For example:
  • wget ftp://ftp.rediris.es/mirror/CentOS/6.2/isos/i386/CentOS-6.2-i386-bin-DVD1.iso
    cp CentOS-6.2-i386-bin-DVD1.iso /almacen/iso
    

    Note: latests versions of CentOS are distributed in two DVDs. However, only the first DVD is needed for basic installations; no need to download DVD2.

  • Create the virtual machine with:
  • vnx --create-rootfs vnx_rootfs_kvm_centos.qcow2 --install-cdrom /almacen/iso/CentOS-6.2-i386-bin-DVD1.iso --mem 768M
    

    Note: around 768M of memory are needed to use the graphical installation assistant. With the textual assistant the memory requirements are lower (known to work with 512M).

  • Follow the CentOS installation assistant. At some point, you will have to choose among different system profiles: Desktop, Minimal Desktop, Minimal, Basic Server, etc.
  • Once the installation is finished (the system will have to be rebooted to carry out the final steps), configure the serial console following these instructions.
  • Finally, delete the net udev rules file, halt the system and restart it with the following command:
  • rm /etc/udev/rules.d/70-persistent-net.rules
    vnx --modify-rootfs vnx_rootfs_kvm_centos.qcow2 --update-aced
    

    Note: ignore the errors "timeout waiting for response on VM socket".

    Configuration

    • Access the system through the text console to easy the copy-paste of commands:
    • virsh console vnx_rootfs_kvm_centos.qcow2
      
    • Check that you have network connectivity. Maybe you have to activate the network interface by hand:
    • dhclient eth1
      

      Note: use "ip link show" to know which network interface to use.

    • Configure the RPMForge repository following the procedure described here:
    • yum install wget
      wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
      rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
      rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
      rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm
      
    • Update the system and install additional packages
    • yum update
      yum install perl perl-XML-DOM perl-XML-Parser acpid daemonize
      
    • Install VNX autoconfiguration daemon:
    • mount /dev/sdb /mnt/
      perl /mnt/vnxaced-lf/install_vnxaced
      
    • Optionally:
      • Disable the services you are not going to use to speed up the virtual machine startup (you can see the list of active services with "chkconfig --list"). For example to disable sendmail and bluetooth:
      • chkconfig sendmail off
        chkconfig bluetooth off
        
      • Disable the firewall. Firewall is enabled by default which could be problematic for testing purpose systems. If desired, disable it using the following command:
      • chkconfig iptables off
        chkconfig ip6tables off
        
      • Create a file /etc/vnx_rootfs_version to store version number and informacion about modifications:
      • VER=v0.24
        OS=CentOS 6.2
        DESC=Basic CentOS 6.2 root-filesystem without GUI
        
      • Stop the machine with that script:
      • vnx_halt
        

      Installing additional software

      To install additional software or to modify your root file system, you just have to:

      • Start a virtual machine from it:
      • vnx --modify-rootfs vnx_rootfs_kvm_centos.qcow2
        
      • Check network connectivity. Maybe you have to activate the network interface by hand:
      • dhclient eth1
        

        Note: use "ip link show" to know which network interface to use.

      • Do the modifications you want.
      • Finally, halt the system using:
      • vnx_halt
        

        vnx_halt deletes some caches and log files and lets you write a short message to /etc/vnx_rootfs_version file describing the modifications done.

      Updating VNXACED

      You can automatically update the VNXACE daemon with the following command:

      vnx --modify-rootfs vnx_rootfs_kvm_centos.qcow2 --update-aced -y
      

      Known issues

      • When executing commands using vnx "--exe" option, traces like the followinf appear on the consoles:
      • hdb: tray open
        end_request: I/O error, dev hdb, sector 8388352
        

        They are generated as a result of mount command execution by the VNX daemon. Commands are correctly executed. To be further investigated.