Difference between revisions of "Vnx-rootfskvmdebian"
(Created page with "{{Title|How to create a KVM Debian Linux root filesystem for VNX}} == Basic installation == Follow this procedure to create a KVM Debian Linux based root filesystem for VNX....") |
(→Basic installation) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== Basic installation == | == Basic installation == | ||
− | Follow this procedure to create a KVM Debian Linux based root filesystem for VNX. The procedure has been tested with Debian 6 | + | 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). |
<ul> | <ul> | ||
<li>Create the filesystem disk image:</li> | <li>Create the filesystem disk image:</li> | ||
Line 19: | Line 19: | ||
GRUB_TIMEOUT=0 | GRUB_TIMEOUT=0 | ||
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0" | GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0" | ||
− | <li>Add the following line to /etc/inittab:</li> | + | <li>Add the following line to /etc/inittab (skip this step for Debian 8 Jessie):</li> |
0:2345:respawn:/sbin/getty 38400 ttyS0 | 0:2345:respawn:/sbin/getty 38400 ttyS0 | ||
<li>Make grub process the previous config changes:</li> | <li>Make grub process the previous config changes:</li> | ||
Line 43: | Line 43: | ||
apt-get dist-upgrade | apt-get dist-upgrade | ||
<li>Install XML::DOM perl package and ACPI daemon:</li> | <li>Install XML::DOM perl package and ACPI daemon:</li> | ||
− | apt-get install libxml-libxml-perl acpid | + | apt-get install libxml-libxml-perl libnetaddr-ip-perl acpid |
<li>Install VNX autoconfiguration daemon:</li> | <li>Install VNX autoconfiguration daemon:</li> | ||
mount /dev/sdb /mnt/ | mount /dev/sdb /mnt/ | ||
perl /mnt/vnxaced-lf/install_vnxaced | perl /mnt/vnxaced-lf/install_vnxaced | ||
<li>Edit /etc/network/interfaces file and comment all lines related to eth0, eth1, etc interfaces. Leave only the loopback (lo) interface.</li> | <li>Edit /etc/network/interfaces file and comment all lines related to eth0, eth1, etc interfaces. Leave only the loopback (lo) interface.</li> | ||
− | |||
<li>Optional: install other services:</li> | <li>Optional: install other services:</li> | ||
<ul> | <ul> | ||
Line 63: | Line 62: | ||
</pre> | </pre> | ||
− | <li>Stop the machine with vnx_halt:</li> | + | <li>Stop the machine with vnx_halt: </li> |
sudo vnx_halt | sudo vnx_halt | ||
</ul> | </ul> |
Latest revision as of 17:32, 28 December 2016
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