Difference between revisions of "Vnx-rootfsfreebsd"
(→Configuration) |
(→Configuration) |
||
Line 86: | Line 86: | ||
mount -t msdosfs /dev/ad1 /mnt/ | mount -t msdosfs /dev/ad1 /mnt/ | ||
perl /mnt/vnxaced-lf/install_vnxaced | perl /mnt/vnxaced-lf/install_vnxaced | ||
− | <li> | + | <li>Optionally: |
+ | <ul> | ||
+ | <li>Allow root login thorugh ssh by editing /etc/ssh/sshd_config file:</li> | ||
PermitRootLogin yes | PermitRootLogin yes | ||
− | <li> | + | <li>Set locales according to your preferences in /etc/profile:</li> |
export LANG=es_ES.UTF-8 | export LANG=es_ES.UTF-8 | ||
export LC_ALL=es_ES.UTF-8 | export LC_ALL=es_ES.UTF-8 | ||
− | <li> | + | <li>Add gnome window manager with:</li> |
<ul> | <ul> | ||
<li>Install packages needed:</li> | <li>Install packages needed:</li> | ||
Line 101: | Line 103: | ||
<li>Disable the screensaver and change keyboard configuration in "System->Keyboard" menu.</li> | <li>Disable the screensaver and change keyboard configuration in "System->Keyboard" menu.</li> | ||
</ul> | </ul> | ||
− | <li> | + | <li>Reduce the boot timeout from 10 seconds to, for example, 3 seconds. Edit /boot/loader.conf and add:</li> |
autoboot_delay="3" | autoboot_delay="3" | ||
− | <li> | + | <li>Give vnx user (or whatever one you have created during installation) permissions tu su root:</li> |
pw usermod vnx -G wheel | pw usermod vnx -G wheel | ||
− | <li> | + | <li>If you have installed gnome, you can add automatic login following the instructions in:</li> |
http://www.freebsd.org/gnome/docs/faq2.html#q23 | http://www.freebsd.org/gnome/docs/faq2.html#q23 | ||
− | + | </ul> | |
<li>Create a file /etc/vnx_rootfs_version to store version number and informacion about modification:</li> | <li>Create a file /etc/vnx_rootfs_version to store version number and informacion about modification:</li> | ||
<pre> | <pre> | ||
− | VER=v0. | + | VER=v0.24 |
− | OS=FreeBSD | + | OS=FreeBSD 9.0 |
− | DESC=Basic FreeBSD | + | DESC=Basic FreeBSD 9.0 root filesystem without GUI |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
− | |||
− | |||
− | |||
− | |||
<li>Stop the machine with that script:</li> | <li>Stop the machine with that script:</li> | ||
vnx_halt | vnx_halt | ||
− | |||
</ul> | </ul> | ||
</ul> | </ul> |
Revision as of 08:42, 22 May 2012
How to create a Freebsd root-file-system for VNX
Contents
Basic installation
- Create the filesystem disk image:
qemu-img create -f qcow2 vnx_rootfs_kvm_freebsd.qcow2 8GB
wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/i386/ISO-IMAGES/9.0/FreeBSD-9.0-RELEASE-i386-disc1.iso cp FreeBSD-9.0-RELEASE-i386-disc1.iso /almacen/iso
vnx --create-rootfs vnx_rootfs_kvm_freebsd.qcow2 --install-media /almacen/iso/FreeBSD-9.0-RELEASE-i386-disc1.iso --mem 512M
ttyu0 "/usr/libexec/getty std.9600" dialup off secure
to:
ttyu0 "/usr/libexec/getty std.9600" vt100 on secure
echo "-Dh" > /boot.config echo 'boot_multicons="YES"' >> /boot/loader.conf echo 'boot_serial="YES"' >> /boot/loader.conf echo 'console="comconsole,vidconsole"' >> /boot/loader.conf
halt -p
Configuration
- Restart the system with the following command:
vnx --modify-rootfs vnx_rootfs_kvm_freebsd.qcow2 --update-aced --mem 512M
Note: ignore the errors "timeout waiting for response on VM socket".
virsh console vnx_rootfs_kvm_freebsd.qcow2
pkg_add -r bash pw usermod root -s /usr/local/bin/bash pw usermod vnx -s /usr/local/bin/bash echo "export PACKAGEROOT=ftp://ftp.es.freebsd.org" > ~/.bash_profile
pkg_add -r perl p5-libxml-enno
ifconfig_re0="DHCP"
mount -t msdosfs /dev/ad1 /mnt/ perl /mnt/vnxaced-lf/install_vnxaced
- Allow root login thorugh ssh by editing /etc/ssh/sshd_config file:
PermitRootLogin yes
export LANG=es_ES.UTF-8 export LC_ALL=es_ES.UTF-8
- Install packages needed:
pkg_add -r xorg-minimal gnome2-lite gdm detach xeyes xhost wmctrl
gnome_enable="YES"
proc /proc procfs rw 0 0
autoboot_delay="3"
pw usermod vnx -G wheel
http://www.freebsd.org/gnome/docs/faq2.html#q23
VER=v0.24 OS=FreeBSD 9.0 DESC=Basic FreeBSD 9.0 root filesystem without GUI
vnx_halt
If everything went well, your root filesystem will be ready to be used with VNX. You can make a simple test using the simple_freebsd.xml scenario distributed with VNX.
Note: after installing gnome, you probaly will get the following error message on the console:
acd0: FAILURE - unknown CMD (0x03) ILLEGAL REQUEST asc=0x20 ascq=0x00
To eliminate them you can execute:
hal-disable-polling --device /dev/acd0
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_fedora.qcow2
dhclient eth1
Note: use "ip link show" to know which network interface to use.
vnx_halt
Updating VNXACED
You can automatically update the VNXACE daemon with the following command:
vnx --modify-rootfs vnx_rootfs_kvm_fedora.qcow2 --update-aced -y
Installing additional software
To install additional software or modify your root file system, you just have to start it as described above and:
- Configure network interface with:
dhclient re0
pkg_add -r apache22
halt -p
Updating ACE daemon
If you have a root filesystem with the autoconfiguration and command execution daemon (ACE) already installed, you can use the autoupdate functionallity to update the daemon to a newer version. Just follow this procedure:
- Edit the xml described above and comment the line defining the Freebsd iso file for the cdrom:
- Start the virtual machine (directly using virsh or the vnx_modify_rootfs utility):
/usr/share/vnx/bin/vnx_modify_rootfs rootfs_freebsd.xml
- Execute the update utility:
/usr/share/vnx/bin/vnx_update_aced Freebsd /usr/share/vnx/aced/vnx-aced-lf-0.1b.tgz
- Once the ace daemon is updated the virtual machine will be rebooted automatically.