Vnx-rootfskvmdebian
How to create a KVM Debian Linux root filesystem for VNX
Contents
Basic installation
Follow this procedure to create a KVM Debian Linux based root filesystem for VNX. The procedure has been tested with Debian 6, 7 and 8, as well as Debian based Kali Linux distribution (http://www.kali.org).
- Create the filesystem disk image:
qemu-img create -f qcow2 vnx_rootfs_kvm_debian.qcow2 8G
wget http://cdimage.debian.org/debian-cd/6.0.7/i386/iso-cd/debian-6.0.7-i386-netinst.iso cp debian-6.0.7-i386-netinst.iso /almacen/iso
vnx --create-rootfs vnx_rootfs_kvm_debian.qcow2 --install-media /almacen/iso/debian-6.0.7-i386-netinst.iso --mem 512M
Note: add "--arch x86_64" option for 64 bits virtual machines
- Edit /etc/default/grub:
GRUB_TIMEOUT=0 GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"
0:2345:respawn:/sbin/getty 38400 ttyS0
update-grub
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_debian.qcow2 --update-aced --mem 512M
Note: add "--arch x86_64" option for 64 bits virtual machines Note: ignore the errors "timeout waiting for response on VM socket".
virsh console vnx_rootfs_kvm_debian.qcow2
apt-get update apt-get dist-upgrade
apt-get install libxml-libxml-perl libnetaddr-ip-perl acpid
mount /dev/sdb /mnt/ perl /mnt/vnxaced-lf/install_vnxaced
- Apache server:
apt-get install apache2 update-rc.d -f apache2 remove # to avoid automatic start
VER=v0.25 OS=debian 6.0.7 DESC=Basic Debian 6.0.7 root filesystem
sudo 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_debian.xml scenario distributed with VNX.
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_debian.qcow2
dhclient eth0
Note: use "ip link show" to know which network interface to use.
vnx_halt
Examples
- dhcp server and relay:
- Install dhcp3 packages:
apt-get install dhcp3-server dhcp3-relay
update-rc.d -f isc-dhcp-server remove update-rc.d -f isc-dhcp-relay remove
Updating VNXACED
You can automatically update the VNXACE daemon with the following command:
vnx --modify-rootfs vnx_rootfs_kvm_debian.qcow2 --update-aced -y
If VNXACE daemon is not updated automatically, you can do it manually by accessing the virtual machine console and type:
mount /dev/sdb /mnt/ perl /mnt/vnxaced-lf/install_vnxaced
Known problems
- None described yet