SMEServer KVM
From Proxmox VE
SMEServer KVM
SMEServer is a SOHO appliance based on CentOS that has webmail, websites (Ibays and file repository), users, groups, PPTP-VPN Server (256 Users), internet gateway, workgroup printing, firewall, Apache/MySQL/PHP, DHCP Server, NTP Server and many addons.
- SMEServer v8.04 Ethernet Swap On Reboot Bug Thread
- SME8.0B5 atrpms asterisk rpm install HOWTO
- Useful SMEServer Commands
- Setting the SMEServer PHP upload_tmp_dir Path
Attempting to follow instructions for enabling php5-mcrypt in SMEServer v8 Beta 5 will lead to dependancy problems as of April 2010. The php v5.2.10 used in this version of SMEServer does not have php5-xmlrpc and many other extensions installed. In fact the php5-curl extension that is compiled in has some quirks when dealing with posting to forms under FOLLOWLOCATION parameter - we must do a further curl exec to the intended follow page as it will not FOLLOWLOCATION even if enabled. This true whether a full yum update is done or not.
SMEServer LVM Recovery
SMEServer stores it's data in LVM2. On corruption of the superblock or metadata use a Knoppix LiveCD for recovery and follow instructions at:
SMEServer LVM Recovery using Knoppix LiveCD
SMEServer v8.0 beta 4 as KVM in ProxMox
To install it as a Server and Gateway, the following steps are needed to get a successful KVM running in Proxmox.
Note that the broadcast entries below will have to be manually put in and the host rebooted.
Working example of a Proxmox host's /etc/network/interfaces file:
# network interface settings auto lo iface lo inet loopback iface eth0 inet manual iface eth1 inet manual auto vmbr0 iface vmbr0 inet static address 192.168.12.178 netmask 255.255.255.0 gateway 192.168.12.1 network 192.168.12.0 broadcast 192.168.12.255 bridge_ports eth0 bridge_stp off bridge_fd 0 auto vmbr1 iface vmbr1 inet static address 10.10.10.5 netmask 255.255.255.0 broadcast 10.10.10.255 bridge_ports eth1 bridge_stp off bridge_fd 0
Sequence of connection on SMEServer's WAN Interface:-
(KVM eth1) SME WAN Interface 192.168.12.x vmbr0 (Bridged to ProxMox eth0) Internet Router
Sequence of connection on SMEServer's LAN Interface:-
(KVM eth0) SME LAN Interface 10.10.10.x vmbr1 (Bridged to ProxMox eth1)
Create a KVM with
IDE HDD >= 20 GB 2 NICs:- vlan0 -> e1000 -> vmbr0 vlan1 -> rtl8139 -> vmbr1 (Add after initial creation from the Hardware tab) RAM >= 512 MB IDE CDROM -> SME ISO file In Options -> Boot from CDROM and then HDD
In the host, checkout the /etc/qemu-server/VEID#.conf where VEID# is the Virtual Machine ID Number.
Working example /etc/qemu-server/101.conf
name: smetest ide2: smeserver-8.0beta4-i386.iso,media=cdrom smp: 1 vlan1: rtl8139=F2:39:0E:D7:01:00 bootdisk: ide0 ide0: vm-102-disk.qcow2 ostype: l26 memory: 512 vlan0: e1000=66:6C:7C:87:11:00 onboot: 1 description: SME 8.0 beta 4
We notice that the vlan1 was added first and then the vlan0. This is because at the time of KVM creation, we chose vmbr1 for the first NIC (rtl8139) which we intended to use for the SMEServer's LAN Interface. Subsequently we chose vmbr0 for the SMEServer's WAN Interface as it brings in the Internet from the Router above it.
Hence the first ProxMox physical NIC (P-eth0 connected to vmbr0) is on the SMEServer's WAN Interface (S-eth1) and the second one (P-eth1 connecetd to vmbr1) is on the SMEServer's LAN Interface (S-eth0)
During installation and any future (re-)configuration of the SMEServer, we are asked for the LAN Interface first and then for the WAN Interface. At both (LAN and WAN setup) NIC choice menus, we are shown the available NICS arranged in vlan order - as seen from the KVM info from the hosts' /etc/qemu-server/101.conf file above.
We should not assume internal eth# numbering order and mistakenly associate it with the shown NIC's names accordingly. If we do so, we will land up 'plugging' in the wrong interface to the wrong bridge and cause havoc to all actual devices and VMs on the network.
The menu order we will see here is:
1. e1000 (vmbr0 - host's eth0) 2. rtl8139 (vmbr1 - host's eth1)
For the LAN setup, we need to choose 2 (as KVM's eth0) and for the WAN setup we need to choose 1 (as KVM's eth1). We are bound to be confused here if we are not careful.
Choose an Administrator's (user root for SSH and admin for Web) Password.
Choose a domain (mydomain.com and a host name (smetest) and our machine will become smetest.mydomain.com
For the LAN we choose the static IP / NM to be 10.10.10.1 / 255.255.255.0 as this will be the Gateway for it's DHCP clients.
We choose a Server and Gateway Installation.
FOR WAN we choose static IP / NM / GW as 192.168.12.150 / 255.255.255.0 / 192.168.12.1
This will get us the Internet for the SME Server and it's DHCP clients.
We enable DHCP server for LAN.
Connect a switch to the ProxMox eth1 socket and plug in all the LAN clients into it.
Connect your ProxMox eth0 socket to your Router (or Switch to which the Router's LAN side is connected).
We are done! http://SME-LAN-IP/server-manager to manage the SMEServer.
Depending on whether we choose vmbr0 or vmbr1 for the client KVM's NIC, we will get the DHCP from the appropriate DHCP server - from Main Router or from SME Server respectively.
