Difference between revisions of "Vnx-rootfsfedora"

From VNX
Jump to: navigation, search
(Installing additional software)
(Installing additional software)
Line 101: Line 101:
 
  vnx_halt
 
  vnx_halt
 
</ul>
 
</ul>
 +
 +
== 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 problems ==
 
== Known problems ==

Revision as of 01:20, 22 May 2012

How to create a Fedora root filesystem for VNX

(being updated...do not use...)

Follow this procedure to create a fedora based root filesystem for VNX. The procedure has been tested with Fedora 16 and 14.

Basic installation

  • Create the filesystem disk image:
  • qemu-img create -f qcow2 vnx_rootfs_kvm_fedora.qcow2 8G
    
  • Get Fedora installation DVD (use the complete DVD; do not use the Live version, as it seems the installation wizard does not include the customization menu). For example:
  • wget ftp://ftp.rediris.es/mirror/fedora/16/Fedora/i386/iso/Fedora-16-i386-DVD.iso
    cp Fedora-16-i386-DVD.iso /almacen/iso
    
  • Create the virtual machine with:
  • vnx --create-rootfs vnx_rootfs_kvm_fedora.qcow2 --install-media /almacen/iso/Fedora-16-i386-DVD.iso --mem 768M
    
  • Follow the Fedora installation assistant. At some point, you will have to choose among different system profiles: desktop, web server, minimal, etc.
  • Enable login on the first serial line:
    • Fedora 16. Execute this command:
    • ln -s /usr/lib/systemd/system/getty@.service   /etc/systemd/system/getty.target.wants/getty@ttyS0.service
      
    • Fedora 14. Create a file named /etc/init/serial-ttyS0.conf with the following content:
    • #This service maintains a getty on /dev/ttyS0.
      start on stopped rc RUNLEVEL=[2345]
      stop on starting runlevel [016]
      respawn
      exec /sbin/agetty /dev/ttyS0 9600 vt100-nav
      

      And add ttyS0 to /etc/securetty file if you want to login root on that console:

      echo "ttyS0" >> /etc/securetty
      
  • Finally, delete the net udev rules file and halt the system:
  • rm /etc/udev/rules.d/70-persistent-net.rules
    halt -p
    

Configuration

  • Restart the system with the following command:
  • vnx --modify-rootfs vnx_rootfs_kvm_fedora.qcow2 --update-aced --mem 768M
    

    Note: ignore the errors "timeout waiting for response on VM socket". 768M are needed if you are installing a root filesystem with desktop interface

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

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

  • Update the system and install additional packages
  • yum update
    yum install perl perl-XML-DOM acpid udisks
    

    Note: if yum fails, check that the network is working. Maybe you will have to manually execute "dhclient eth0", at least in the case of a minimal installation.

  • Install VNX autoconfiguration daemon:
  • mount /dev/sdb /mnt/
    perl /mnt/vnxaced-lf/install_vnxaced
    
  • If you have chosen a "minimum installation", activate network services (they are disabled by default):
  • chkconfig --level 3 network on
    
  • Optionally:
    • Install other services needed, for example, an apache server:
    • yum install httpd
      chkconfig httpd off  # if you want to avoid automatic start of apache server
      
    • Or, if using a "minumum installation", install network utilities:
    • yum install telnet wget openssh-clients
      
    • If you want automatic login, just edit /etc/gdm/custom.conf and add the following lines:
    • AutomaticLoginEnable=true
      AutomaticLogin=vnx
      
    • Disable the firewall. Firewall is enabled by default; that could be problematic for testing purpose systems. If desired, disable it graphically in "System|Administration|Firewall" option, or using the following command from the command line:
    • chkconfig iptables off
      chkconfig ip6tables off
      
    • Change grub timeout to 0 by editing /etc/default/grub file and setting:
    • GRUB_TIMEOUT=0
      

      and executing:

      grub2-mkconfig -o /boot/grub2/grub.cfg  
      
  • Create a file /etc/vnx_rootfs_version to store version number and informacion about modification. For example:
  • VER=v0.24
    OS=Fedora 16
    DESC=Basic Fedora 16 root-filesystem without GUI
    
  • Finally, stop the virtual machine with:
  • vnx_halt
    
    vnx_halt deletes some caches and log files and optionally lets you write a short message to /etc/vnx_rootfs_version file describing the latest modifications done.

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
    

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 problems