Changes

From SME Server
Jump to navigationJump to search
9,676 bytes added ,  15:23, 23 June 2020
no edit summary
Line 12: Line 12:  
=== CPU ===
 
=== CPU ===
 
* Host CPU or emulate
 
* Host CPU or emulate
 +
It seems, after googling around a bit, that Host CPU mode is the preferred mode.
 +
 
* Sockets and cores
 
* Sockets and cores
   Line 26: Line 28:  
* Bridge, NAT or Route?
 
* Bridge, NAT or Route?
 
* Bandwidth options
 
* Bandwidth options
 +
 +
 +
==Cloning a virtual SME Server==
 +
When you clone a virtual SME server, you might want to reset some unique variables on the cloned machine. Several things (will) have changed like install date and MAC addresses. Visualization platforms will automatically change the MAC addresses of the NIC's for the cloned machine.
 +
 +
After cloning and first boot, log in as root and issue the following commands
 +
config delprop sysconfig SystemID
 +
config setprop sysconfig InstallEpoch `date +%s`
 +
rm -f /etc/udev/rules.d/70-persistent-net.rules
 +
Then run the console application and reconfigure the server to your wishes, where you '''must''' perform a signal-event post-upgrade; signal-event reboot for all changes to take effect.
       
== Installation options of a Virtual SME Server ==
 
== Installation options of a Virtual SME Server ==
 
=== Kernel options ===
 
=== Kernel options ===
* LVM (option nolvm)
+
*
* Raid (option raid=none)
  −
 
      
== SME Server configuration settings ==
 
== SME Server configuration settings ==
Line 40: Line 50:  
On a Virtual SME guest server the ntpd [[DB_Variables_Configuration#SupportLargeDrift|SupportLargeDrift]] DB variable can be enabled as follows:
 
On a Virtual SME guest server the ntpd [[DB_Variables_Configuration#SupportLargeDrift|SupportLargeDrift]] DB variable can be enabled as follows:
 
  config setprop ntpd SupportLargeDrift enabled
 
  config setprop ntpd SupportLargeDrift enabled
 +
expand-template /etc/ntp.conf
 
and
 
and
 
  service ntpd restart
 
  service ntpd restart
   −
to activate the new configuration. This will adjust /etc/ntp.conf to 'better' settings for a virtual guest. By setting the above value to 'disabled', the NTP service and configuration will revert back to SME Server defaults.
+
to activate the new configuration. This will adjust /etc/ntp.conf to 'better' settings for a virtual guest. By setting the above value to 'disabled' and expand the template, the NTP service and configuration will revert back to SME Server defaults.
    
=== Clock/frequency ===
 
=== Clock/frequency ===
 
As per suggestions in [http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427 this article from VmWare] and this one from [https://blogs.oracle.com/fatbloke/entry/speeding_up_your_linux_guests Oracle] on virtual Linux Guests, adjusting the guest Frequency will improve the guests speed.
 
As per suggestions in [http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427 this article from VmWare] and this one from [https://blogs.oracle.com/fatbloke/entry/speeding_up_your_linux_guests Oracle] on virtual Linux Guests, adjusting the guest Frequency will improve the guests speed.
 +
 +
{{Note box|It is suggested that this is not required for RHEL/CentOS 6}}
    
You can check if your guest server can benefit from these boot options:
 
You can check if your guest server can benefit from these boot options:
Line 64: Line 77:  
{{Note box|We need to come up with a template fragment for grub.conf to make kernel options survive events.}}
 
{{Note box|We need to come up with a template fragment for grub.conf to make kernel options survive events.}}
   −
== SME Server as a Host server ==
+
== Tools/utilities ==
=== Phpvirtualbox ===
+
=== iotop ===
[[Phpvirtualbox]] SME Contrib
+
top like utility to monitor the guest I/O (performance)
 +
yum install iotop
 +
 
 +
=== cpu info ===
 +
Detailed info on the guest cpu(s)
 +
cat /proc/cpuinfo
 +
 
 +
== Proxmox ==
 +
* Interesting [http://pve.proxmox.com/wiki/SMEServer_KVM article] on installing SME Server as guest on Proxmox
 +
 
 +
=== SME v8 and v9 on Proxmox at Online.net ===
 +
This is based on work by Daniel here: https://wikit.firewall-services.com/doku.php/tuto/virtualisation/netwok_conf_sur_dedibox
 +
 
 +
=== Online.net configuration ===
 +
{{Warning box|You need a second IP (failover) address. Assign it to your server and make sure you set the MAC for this IP before you do anything else - '''failure to do so may block your network !!'''<br />
 +
''The problem is that your IP is NOT on the same network range as your gateway so we have to fool the system.''
 +
}}
 +
 
 +
Some assumptions:
 +
;Your main Proxmox server IP address:
 +
* IP address 62.20.20.250
 +
* Netmask 255.255.255.0
 +
* Gateway 62.20.20.1
 +
 
 +
;Your secondary IP address :
 +
* 200.30.30.1
 +
* 10:10:00:00:20:20 - you DID set the MAC didn't you ?
 +
 
 +
{{Note box|Proxmox now have a single IP you can use for all your VMs : 62.210.0.1}}
 +
 
 +
=== Proxmox configuration ===
 +
 
 +
{{Note box|Make sure you set your default keyboard - it makes life much easier!!}}
 +
 
 +
We will use the '''vmbr0''' that is set up, but we need to create a dummy one so we can put SME in server/gateway mode and use Daniels scripts:
 +
* Create a new network interface and call it '''vmbr1'''
 +
* Do NOT set IP address/subnet/bridge ports etc.
 +
* Create your KVM for SME. Make sure that you give it two network adaptors - one is '''vmbr0''' and one is '''vmbr1'''
 +
** vmbr0 should have the following settings :
 +
::Model: virtio
 +
::MAC: 10:10:00:00:20:20 (as per your mac that you set)
 +
*After you have created the KVM add a second adaptor:
 +
**vmbr1 should have the following settings:
 +
::Model: virtio
 +
::MAC: should be the MAC of your main IP address
 +
 
 +
It doesn't matter which one is 0 or 1 as long as the settings are correct.
 +
 
 +
{{Note box|You still cannot set a different gateway IP in the console configuration due to subnet checking.}}
 +
 
 +
After setup you can run:
 +
 
 +
config set GatewayIP 62.210.0.1
 +
 
 +
/etc/e-smith/events/actions/update-ifcfg
 +
signal-event post-upgrade;signal-event reboot
 +
 
 +
{{Warning box|The following sections for v8 and v9 should no longer be relevant with the inclusion of the virtual adaptor code in SME server now}}
 +
 
 +
=== SME V8 Configuration ===
 +
Now do your standard SME installation.
 +
 
 +
<here would be a lot easier if we could force it to have a local IP first so you could ssh from Proxmox to SME and you could then use scp to copy files or a terminal to copy and paste>
 +
 
 +
When you go through the setup, make sure you pick the DUMMY adaptor for the local interface, and the real adaptor for the external interface. Make sure you know your MAC addresses so you know which one is which.
 +
 
 +
you can use your second IP address for the external interface, but you will have to set a subnet mask and gateway IP that it likes e.g.:
 +
:IP : 200.30.30.1
 +
:Subnet : 255.255.255.0
 +
:Gateway : 200.30.30.1
 +
 
 +
One you have rebooted your network will not be working correctly so we need to follow Daniels guide to fix it :
 +
db configuration set ExternalIP 200.30.30.1
 +
db configuration set ExternalNetmask 255.255.255.255
 +
db configuration set GatewayIP 62.20.20.1
 +
/etc/e-smith/events/actions/initialize-default-databases
 +
 
 +
mkdir -p /etc/e-smith/templates-custom/etc/sysconfig/network/
 +
echo '# GATEWAYDEV disabled for dedibox network' > /etc/e-smith/templates-custom/etc/sysconfig/network/40GATEWAYDEV
 +
echo '# GATEWAY disabled for dedibox network' > /etc/e-smith/templates-custom/etc/sysconfig/network/50GATEWAY
 +
expand-template /etc/sysconfig/network
 +
mkdir -p /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/route-ethX
 +
cat <<'EOF' > /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/route-ethX/20gateway
 +
{
 +
    die "Need to pass THIS_DEVICE in MORE_DATA\n" unless (defined $THIS_DEVICE);
 +
 +
    my $device = $ExternalInterface{Name};
 +
    unless ($device)
 +
    { 
 +
        warn("Can't determine device name for external network");
 +
        return "# template expansion error - Can't determine device name for external network";
 +
    }
 +
 +
    return "# Gateway only applies on external interface"
 +
        unless ($ExternalInterface{Name} eq $THIS_DEVICE);
 +
 +
    my $gw = $ExternalInterface{'Gateway'};
 +
 +
    $OUT .= "$gw dev $THIS_DEVICE\n";
 +
    $OUT .= "default via $gw dev $THIS_DEVICE";
 +
}
 +
EOF
 +
 
 +
(See below for SME v9 configuration)
 +
 
 +
If you have got it right then you should be able to run the following without error :
 +
expand-template /etc/sysconfig/network-scripts/ifcfg-$(db configuration getprop ExternalInterface Name)
 +
expand-template /etc/sysconfig/network-scripts/route-$(db configuration getprop ExternalInterface Name)
 +
 
 +
Check all the network settings look correct and then:
 +
signal-event post-upgrade;signal-event reboot
 +
 
 +
You should now be able to connect to your Proxmox box on your primary IP address, and your SME server on your added IP.
 +
 
 +
Your network setting should look similar to this:
 +
EthernetDriver1=virtio_net
 +
EthernetDriver2=virtio_net
 +
ExternalDHCP=off
 +
ExternalIP=200.30.30.1
 +
ExternalInterface=interface
 +
    Broadcast=(whatever)
 +
    Configuration=static
 +
    Driver=virtio_net
 +
    Gateway=62.20.20.1 #gateway for your main IP address
 +
    HWAddress=10:10:00:00:20:20 #MAC that you set for 2nd IP address
 +
    IPAddress=200.30.30.1 #your 2nd IP address
 +
    Name=eth1
 +
    Netmask=255.255.255.255
 +
    Network=200.30.30.1 #your 2nd IP address
 +
ExternalNetmask=255.255.255.255
 +
GatewayIP=62.20.20.1 #gateway for your main IP address
 +
 
 +
Following your 'local network' and is the range when you VPN :
 +
InternalInterface=interface
 +
    Broadcast=192.168.98.255
 +
    Configuration=static
 +
    Driver=virtio_net
 +
    HWAddress=fe:aa:16:19:e8:bf #MAC for 'virtual' adaptor
 +
    IPAddress=192.168.98.1
 +
    NICBondingOptions=miimon=200 mode=active-backup
 +
    Name=eth0
 +
    Netmask=255.255.255.0
 +
    Network=192.168.98.0
 +
LocalIP=192.168.98.1
 +
LocalNetmask=255.255.255.0
 +
 
 +
=== SME V9 Configuration ===
 +
 
 +
Things have changed slightly for v9
 +
 
 +
Use the same db settings and templates as for v8.
 +
 
 +
You can make one small change to the template. Replace :
 +
 
 +
  my $gw = $ExternalInterface{'Gateway'};
 +
 
 +
With
 +
 
 +
  my $gw = $GatewayIP;
 +
 
 +
 
 +
To update the config files you now need to run :
 +
 
 +
/etc/e-smith/events/actions/update-ifcfg
 +
signal-event post-upgrade;signal-event reboot
 +
 
 +
Note that you will not see MAC addresses in the Internal Interface settings as you did in v8
   −
=== Proxmox ===
+
== Xen ==
Interesting [http://pve.proxmox.com/wiki/SMEServer_KVM article] on installing SME Server as guest on Proxmox
+
 
 +
== QEMU/KVM ==
 +
 
 +
<br />
 +
== Virtualbox ==
 +
 
 +
===High I/O causing filesystem corruption===
 +
 
 +
It seems during times of high I/O, like backups and etc, the guest filesystem resets to read-only. You can have the following errors in log<br />
 +
https://www.virtualbox.org/ticket/10031
 +
 
 +
Apr 30 13:37:29 sme9 kernel: ata2.00: exception Emask 0x0 SAct 0x7fffffff SErr 0x0 action 0x6 frozen
 +
Apr 30 13:37:29 sme9 kernel: ata2.00: failed command: WRITE FPDMA QUEUED
 +
Apr 30 13:37:29 sme9 kernel: ata2.00: cmd 61/08:00:08:7d:77/00:00:03:00:00/40 tag 0 ncq 4096 out
 +
Apr 30 13:37:29 sme9 kernel:        res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
 +
 
 +
the workaround is to set virtualbox to use the host I/O disk cache : see settings/storage/controller and activate the option
 +
 
 +
 
 +
== OpenNode ==
 +
See this [http://forums.contribs.org/index.php?topic=50994 forum] post
 +
 
 +
{{Warning box|The procedures listed here are outside normal SME operation. They are not guaranteed to work. Make sure you fully understand what you are going before proceeding}}
 +
Example to create a SME Server 8.1-x86_64 VM :
 +
 
 +
1) you have to install OpenNode, it can be installed after a CentOS6 on cloud hosting : http://opennodecloud.com/downloads/
 +
 
 +
 
 +
2) Connect to your VE :
 +
 
 +
ssh -c blowfish -X -C root@YourServerIP
 +
 
 +
 
 +
3) Download SME Server ISO :
 +
 
 +
cd /storage/local/iso/
 +
wget http://mirror.smeserver.eu/smeserver/releases/8.1/iso/x86_64/smeserver-8.1-x86_64.iso
 +
 
 +
 
 +
4) Pre-create VM disk image :
 +
 
 +
qemu-img create -f qcow2 -o preallocation=metadata /storage/local/images/smeserver8vm.qcow2 10G
 +
 
 +
 
 +
5) Launch installation inside screen :
 +
 
 +
screen
 +
virt-install --connect qemu:///system \
 +
--name smeserver8vm --ram 1024 --vcpus 1 \
 +
--disk path=/storage/local/images/smeserver8vm.qcow2,format=qcow2,bus=virtio,cache=none \
 +
--network=bridge:vmbr0,model=virtio --vnc --os-type=linux --os-variant=rhel5 \
 +
--cdrom /storage/local/iso/smeserver-8.1-x86_64.iso --accelerate --noautoconsole --keymap=fr
 +
 
 +
 
 +
6) Detach screen :
 +
 
 +
[CTRL+A+D]
 +
 
 +
 
 +
7) launch virt-manager to manage your VM
 +
 
 +
virt-manager
 +
 
 +
 
 +
SME v9
 +
 
 +
Please see the forum post for instructions on v9
 +
 
 +
 
 +
You will find help in the opennode's wiki and forum.
 +
 
 +
= SME Server as a Host server =
 +
== Phpvirtualbox ==
 +
* [[Phpvirtualbox]] SME Contrib
 +
 
 +
 
 +
== VMware ==
 +
* Contribs.org [[Vmware|Wiki page]] on installing VMware on SME Server
 +
* [[VMware_Tools|Wiki page]] on installing SME Server as a VMWare guest
 +
* Interesting guide from [http://support.theenterprisecloud.com/kb/default.asp?id=355&Lang=1&SID= Verizon] on performance tuning.
   −
=== Xen ===
     −
=== QEMU/KVM ===
     −
=== VMware ===
  −
Contribs.org [[Vmware|Wiki page]] on installing VMware on SME Server
      
[[Category:Virtualisation]]
 
[[Category:Virtualisation]]
 +
 +
[[Category:Howto]]

Navigation menu