lost and found ( for me ? )

How to install Zentyal 3.0-1 amd64 within KVM

Here’s an explanation of how to install Zentyal within KVM.

[ about zentyal ]

In short , zentyal is a small business server similar to pfSense , PacketFence , Utangle etc.
please check the below URL , if you’d like to know the detail about zentyal more.
http://www.zentyal.org/
I’m now looking for captive portal tool…

# libvirtd –version
libvirtd (libvirt) 0.9.13

# kvm --version
QEMU emulator version 1.2.0 (qemu-kvm-1.2.0+noroms-0ubuntu2.12.10.2, Debian), Copyright (c) 2003-2008 Fabrice Bellard


I’ll build the VM in KVM by using zentyal-3.0-1-amd64.iso.

[ build zentyal VM with virt-manager ]

Seen from the zentyal site (http://www.zentyal.org/) , zentyal 3 is based on Ubuntu 12.04 LTS.




the installation is similar to Ubuntu 12.04 LTS’s installation.




the installation has completed!




[ how to enable console access to the VM with “virsh console” ]

confirm the VM has a serial port

on the KVM host

# virsh dumpxml zentyal3-vm01 | egrep -i "console|serial"
   <serial type='pty'>
     <alias name='serial0'/>
   </serial>
   <console type='pty' tty='/dev/pts/1'>
     <target type='serial' port='0'/>
     <alias name='serial0'/>
   </console>


on the VM , make /etc/init/ttyS0.conf file
root@zentyal-1:~# cat /etc/init/ttyS0.conf
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

respawn
exec /sbin/getty -L 115200 ttyS0 vt102


make grub.cfg
# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-29-generic
Found initrd image: /boot/initrd.img-3.2.0-29-generic
done


add write permission
# chmod u+w /boot/grub/grub.cfg


edit grub.cfg
add the red lines
serial -speed=115200 -unit=0 -word=8 -parity=no -stop=1
terminal -timeout=10 serial

menuentry 'Ubuntu, with Linux 3.2.0-29-generic' --class ubuntu --class gnu-linux --class gnu --class os {
       recordfail
       gfxmode $linux_gfx_mode
       insmod gzio
       insmod part_msdos
       insmod ext2
       set root='(hd0,msdos1)'
       search --no-floppy --fs-uuid --set=root 96d5cc44-a368-470d-a4ae-831a6b5ee47e
       linux   /vmlinuz-3.2.0-29-generic root=/dev/mapper/zentyal--1-root ro   quiet splash $vt_handoff console=ttyS0,115200n8
       initrd  /initrd.img-3.2.0-29-generic


reboot the VM
virsh # reboot zentyal3-vm01
Domain zentyal3-vm01 is being rebooted


access to the VM via console
virsh # console zentyal3-vm01
Connected to domain zentyal3-vm01
Escape character is ^]

Ubuntu 12.04.1 LTS zentyal-1 ttyS0

zentyal-1 login: root
Password:
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-generic x86_64)

* Documentation:  https://help.ubuntu.com/

                   *** Zentyal WARNING ***

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.