Difference between revisions of "Vnx-rootfsfedora"
Line 85: | Line 85: | ||
<li>Besides, you have to add ttyS0 to /etc/securetty file if you want to login root on that console:</li> | <li>Besides, you have to add ttyS0 to /etc/securetty file if you want to login root on that console:</li> | ||
echo "ttyS0" >> /etc/securetty | echo "ttyS0" >> /etc/securetty | ||
− | <li>If you have chosen a "minimum installation", activate network services (they are | + | <li>If you have chosen a "minimum installation", activate network services (they are disabled by default):</li> |
chkconfig --level 3 network on | chkconfig --level 3 network on | ||
<li>Optionally:</li> | <li>Optionally:</li> | ||
<ul> | <ul> | ||
− | <li>Install other services, for example, an apache server:</li> | + | <li>Install other services needed, for example, an apache server:</li> |
yum install httpd | yum install httpd | ||
update-rc.d -f apache2 remove # to avoid automatic start | update-rc.d -f apache2 remove # to avoid automatic start | ||
Line 97: | Line 97: | ||
AutomaticLoginEnable=true | AutomaticLoginEnable=true | ||
AutomaticLogin=vnx | AutomaticLogin=vnx | ||
− | <li>Disable the firewall. Firewall is enabled by default | + | <li>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:</li> |
chkconfig iptables off | chkconfig iptables off | ||
</ul> | </ul> | ||
Line 131: | Line 131: | ||
== Installing additional software == | == Installing additional software == | ||
− | To install additional software or modify your root | + | To install additional software or modify your root filesystem, you just have to start it as described above and make the operations required on the filesystem. |
* Start the virtual machine (directly using virsh or the vnx_modify_rootfs utility): | * Start the virtual machine (directly using virsh or the vnx_modify_rootfs utility): | ||
/usr/share/vnx/bin/vnx_modify_rootfs root_fs_fedora.xml | /usr/share/vnx/bin/vnx_modify_rootfs root_fs_fedora.xml | ||
* Install the software: | * Install the software: | ||
yum install ... | yum install ... | ||
− | |||
− | |||
* Stop the machine with: | * Stop the machine with: | ||
− | + | vnx_halt | |
== Known problems == | == Known problems == |
Revision as of 20:20, 16 July 2011
How to create a Fedora root filesystem for VNX
Follow this procedure to create a fedora based root filesystem for VNX. The procedure has been tested with Fedora 14.
- Create the filesystem disk image:
qemu-img create -f qcow2 root_fs_fedora-base.qcow2 5GB
wget ftp://ftp.rediris.es/mirror/fedora/14/Fedora/i386/iso/Fedora-14-i386-DVD.iso cp Fedora-14-i386-DVD.iso /almacen/iso
<domain type='kvm'> <name>Fedora</name> <memory>524288</memory> <vcpu>1</vcpu> <os> <type arch="i686">hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> </os> <features> <pae/> <acpi/> <apic/> </features> <clock sync="localtime"/> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <source file='/usr/share/vnx/filesystems/root_fs_fedora-base.qcow2'/> <target dev='hda'/> </disk> <disk type='file' device='cdrom'> <source file='/almacen/iso/Fedora-14-i386-DVD.iso'/> <target dev='hdb'/> </disk> <interface type='network'> <source network='default'/> </interface> <serial type="pty"> <target port="1"/> </serial> <console type="pty"> <target port="1"/> </console> <graphics type='vnc'/> </devices> </domain>
Note: change "source file=" lines to whatever fits your case (use full paths).
virsh create root_fs_fedora.xml
virt-viewer Fedora
- A "minimal" system, if you want a server rootfs without user interface
- One of the other options (e.g "web server", "desktop system", etc) if you want a system with graphical user interface
virsh create root_fs_fedora.xml
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.
- From the host execute:
/usr/share/vnx/bin/vnx_update_aced Fedora /usr/share/vnx/aced/vnx-aced-lf-0.1b.tgz
ln -s /media/CDROM /media/cdrom udisks --mount /dev/sr0 perl /media/cdrom/install_vnxdaemon
#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
echo "ttyS0" >> /etc/securetty
chkconfig --level 3 network on
- Install other services needed, for example, an apache server:
yum install httpd update-rc.d -f apache2 remove # to avoid automatic start
yum install telnet wget openssh-clients
AutomaticLoginEnable=true AutomaticLogin=vnx
chkconfig iptables off
- !/bin/bash
- Clean yum cache
- Delete /etc/resolv.conf
- Clean command history
- Delete udev net rules files:
- Ask for a message to save in /etc/vnx_root_fs_version file
- Halt the system
Installing additional software
To install additional software or modify your root filesystem, you just have to start it as described above and make the operations required on the filesystem.
- Start the virtual machine (directly using virsh or the vnx_modify_rootfs utility):
/usr/share/vnx/bin/vnx_modify_rootfs root_fs_fedora.xml
- Install the software:
yum install ...
- Stop the machine with:
vnx_halt