!!!  Computerhok 2013

[{TableOfContents }]

!! Intro
The old computerhok is running for almost 5 years now (Ubuntu 8.04, both hypervisor and guests), time for something new.

!! Functions to be ported from old to new

* Gallery 
* JSPWiki, including apache frontend
* home for geocaching ''hof'' images
* nagios (on a separate guest or on hypervisor?)
* fail2ban like solution (see current {{~~/bin/cron/blockHost.sh}})
* backuphost for krm2DB
* a backup hardware node on remote location, and __easy__ backup
* dhfds
* [http://www.esthercreations.nl] can retire
* webmin still necessary ?
* mail server (not open relay!, see /etc/postfix/main.cf)
* [uptime script|http://www.computerhok.nl/cgi-bin/user/uptime.cgi] 
* OpenVZ logo should go from homepage

!! VirtualBox

We will no longer use OpenVZ, it is too restrictive in choice of guest OS'es.\\
We intend to use [VirtualBox|VirtualBox-4.1] as hypervisor, and Ubuntu 12.04 LTS as both host and guest OS.

!! Work in progress / install log

! Ubuntu 12.04.1 LTS

* Installed Ubuntu 12.04.1 LTS from USB stick.
** LVM setup and 10GB root partitiion
** temporary wlan0 (wireless) as primary interface
** IP address 10.0.0.150
** only SSH server
** Locales: en_US.UTF-8 and nl_NL.UTF-8 (first one default)

! kernel recompile
* recompile kernel because of [DSDT issue|Installatie Ubuntu#KernelCompile]

! VirtualBox installation

* install packages
** add {{deb http://download.virtualbox.org/virtualbox/debian precise contrib}}
** add the apt key : [sudo apt-key add oracle_vbox.asc|http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc] 
** {{apt-get install virtualbox-4.2}}
* create test VM: \\
{{{root@apollo:~# VBoxManage createvm --name Ubuntu1 --ostype Linux --register 
Virtual machine 'Ubuntu1' is created and registered.
UUID: 1ed5e417-1eca-4a60-b6d4-5c8f40e44019
Settings file: '/root/VirtualBox VMs/Ubuntu1/Ubuntu1.vbox'
root@apollo:~#
}}}

Deleted the kernel source again to free up some disk space:
{{{
root@apollo:~/src# du -cms linux-source-3.2.0/
5172	linux-source-3.2.0/
5172	total
root@apollo:~/src# df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda7       9.2G  6.6G  2.2G  76% /
root@apollo:~/src# rm -rf linux-source-3.2.0/
root@apollo:~/src# df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda7       9.2G  1.6G  7.2G  18% /
}}}
* modify attributes (more memory, VT off, network bridged instead of NAT:
{{{
VBoxManage modifyvm Ubuntu1 --memory=512 --hwvirtex=off --hwvirtexexcl=off --vtxvpid=off --boot1=dvd --boot2=disk --boot3=none --nic1=bridged --bridgeadapter1=wlan0 --nicpromisc1=allow-all --vrde=on --vrdeport=13389
}}}
* Add CD and disk:
{{{
VBoxManage storagectl Ubuntu1 --name='IDE Controller' --add=ide --controller=PIIX4 --bootable=on
VBoxManage storagectl Ubuntu1 --name='SATA Controller' --add=sata --controller=IntelAhci --bootable=on
}}}
* show me how you look now:
{{{
root@apollo:~/VirtualBox VMs/Ubuntu1# VBoxManage showvminfo Ubuntu1
Name:            Ubuntu1
Groups:          /
Guest OS:        Other Linux
UUID:            1ed5e417-1eca-4a60-b6d4-5c8f40e44019
Config file:     /root/VirtualBox VMs/Ubuntu1/Ubuntu1.vbox
Snapshot folder: /root/VirtualBox VMs/Ubuntu1/Snapshots
Log folder:      /root/VirtualBox VMs/Ubuntu1/Logs
Hardware UUID:   1ed5e417-1eca-4a60-b6d4-5c8f40e44019
Memory size:     512MB
Page Fusion:     off
VRAM size:       8MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
Synthetic Cpu:   off
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): DVD
Boot Device (2): HardDisk
Boot Device (3): Not Assigned
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          off
PAE:             off
Time offset:     0ms
RTC:             local time
Hardw. virt.ext: off
Hardw. virt.ext exclusive: off
Nested Paging:   on
Large Pages:     off
VT-x VPID:       off
State:           powered off (since 2013-01-26T17:41:58.000000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration: 
Autostart Enabled: off
Autostart Delay: 0
Storage Controller Name (0):            IDE Controller
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
Storage Controller Name (1):            SATA Controller
Storage Controller Type (1):            IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  30
Storage Controller Port Count (1):      30
Storage Controller Bootable (1):        on
NIC 1:           MAC: 0800276CD273, Attachment: Bridged Interface 'wlan0', Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: allow-all, Bandwidth group: none
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           disabled
Clipboard Mode:  disabled
Drag'n'drop Mode:  disabled
VRDE:            enabled (Address 0.0.0.0, Ports 13389, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
Video redirection: disabled
USB:             disabled
EHCI:            disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups:  <none>

Shared folders:  <none>

VRDE Connection:    not active
Clients so far:     0

Guest:

Configured memory balloon size:      0 MB
}}}
! Extra installed packages

* See [DSDT issue|Installatie Ubuntu#KernelCompile]
* vim
* htop