Line 1: |
Line 1: |
| {{Note box|WIP. Place holder page for all things related to using SME Server as a virtualized server. Please add any info you feel is useful and someone from the doc team will format it nicely, so please go ahead!}} | | {{Note box|WIP. Place holder page for all things related to using SME Server as a virtualized server. Please add any info you feel is useful and someone from the doc team will format it nicely, so please go ahead!}} |
− | {{Level|Developer|Thorough understanding of SME Server, configuration and virualization is required. Do not deploy in a production environment unless you are very confident you have the skills to manage and troubleshoot and find root causes of possible issues.}} | + | {{Level|Developer|A thorough understanding of SME Server, configuration and the virtualization system to be used is required. Do not deploy in a production environment unless you are very confident you have the skills to manage and troubleshoot and find root causes of possible issues. It's entirely practical to do so, and many installations have run satisfactorily in virtual hosts for many years, but you will generally be responsible for your own solutions!}} |
| | | |
− | = SME Server as a virtualized Guest server = | + | |
− | == Considerations == | + | <br /> |
− | * Storage: Local, NAS, iSCSI, LVM, Raid | + | =SME Server as a virtualized Guest server= |
− | * Network: LAN/WAN, VLAN, VPN, Bandwith, | + | |
− | * Out of band access (VNC, SPICE) | + | ==Examples: Available Virtual Machine hosts== |
| + | |
| + | ===Infrastructure-level=== |
| + | |
| + | *Proxmox VM Community edition |
| + | *Linux KVM (Red Hat developed, available with various managment tools also on CentOS, Debian, Ubuntu etc.) |
| + | *VMWare Enterprise (not free) |
| + | *Citrix (not free) |
| + | |
| + | ===Desktop-level=== |
| + | |
| + | *VirtualBox |
| + | *VMWare workstation (not free) |
| + | *VMWare Fusion (Apple) (not free) |
| + | *Parallels (Apple) (not free) |
| + | *Linux KVM |
| + | |
| + | ===Cloud Hosting=== |
| + | |
| + | There are many different offerings, too many to explore here. |
| + | |
| + | In general, setup, requirements and management will be similar for most of the above. |
| + | |
| + | ==Considerations== |
| + | |
| + | *Storage: Local, NAS, iSCSI, LVM, Raid |
| + | *Network: LAN/WAN, VLAN, VPN, Bandwith, |
| + | *Out of band access (VNC, SPICE) |
| + | |
| + | |
| + | =='Hardware' configuration of a Virtual SME Sever== |
| + | ===CPU=== |
| + | |
| + | *Host CPU or emulate |
| + | |
| + | On Proxmox Host CPU mode is the most performant, but is self-evidently restrictive if you intend to be able to move the VM to a host with different host architecture!. |
| | | |
| | | |
− | == 'Hardware' configuration of a Virtual SME Sever ==
| + | *Sockets and cores |
− | === CPU ===
| |
− | * Host CPU or emulate | |
− | It seems, after googling around a bit, that Host CPU mode is the preferred mode.
| |
| | | |
− | * Sockets and cores
| + | Althose two sockets with one core and one socket with two cores produces the same number of cores, it may be treated differently by server licensing (e.g. Windows). This consideration does not apply to Koozali SME Server as a guest: one socket and multiple cores is typically chosen. |
| | | |
− | === Memory options === | + | ===Memory options=== |
− | * To balloon or to not to balloon
| |
| | | |
− | === Disk options ===
| + | *To balloon or to not to balloon: for Linux guests yes, at present avoid for WIndows guests |
− | * Virtio driver or legacy driver? | |
− | * Disk types pros and cons
| |
− | * Disk I/O options
| |
| | | |
− | === Network options === | + | ===Disk options=== |
− | * Virtio driver or legacy driver? | + | |
− | * Bridge, NAT or Route? | + | *Virtio driver or legacy driver: On Proxmox for Linux use VirtIO |
− | * Bandwidth options | + | *Disk types pros and cons |
| + | *Disk I/O options |
| + | |
| + | ===Network options=== |
| + | |
| + | *Virtio driver or legacy driver? |
| + | *Bridge, NAT or Route? |
| + | *Bandwidth options |
| | | |
| | | |
Line 40: |
Line 75: |
| | | |
| | | |
− | == Installation options of a Virtual SME Server == | + | ==Installation options of a Virtual SME Server== |
− | === Kernel options === | + | ===Kernel options=== |
| + | |
| * | | * |
| | | |
− | == SME Server configuration settings == | + | ==SME Server configuration settings== |
− | === NTPD === | + | ===NTPD=== |
| Timing related options are important within Virtual Guests and to the amount of 'pressure' it puts on the host and level/increasing CPU usage of the host and guest. By default SME Server uses the NTP deamon for 'timing' related matters, but by default is focussed on the above mentioned 1000HZ, hence the kernel option 'divider=10', thus reducing the timing cycles/context switching requests on the host. See the above VMWare document mentioned (Way at the bottom). | | Timing related options are important within Virtual Guests and to the amount of 'pressure' it puts on the host and level/increasing CPU usage of the host and guest. By default SME Server uses the NTP deamon for 'timing' related matters, but by default is focussed on the above mentioned 1000HZ, hence the kernel option 'divider=10', thus reducing the timing cycles/context switching requests on the host. See the above VMWare document mentioned (Way at the bottom). |
| | | |
Line 56: |
Line 92: |
| 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. | | 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 75: |
Line 113: |
| {{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.}} |
| | | |
− | == Tools/utilities == | + | ==Tools/utilities== |
− | === iotop === | + | ===iotop=== |
| top like utility to monitor the guest I/O (performance) | | top like utility to monitor the guest I/O (performance) |
| yum install iotop | | yum install iotop |
| | | |
− | === cpu info === | + | ===cpu info=== |
| Detailed info on the guest cpu(s) | | Detailed info on the guest cpu(s) |
| cat /proc/cpuinfo | | cat /proc/cpuinfo |
| | | |
− | == Proxmox == | + | ==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 === | + | *Interesting [http://pve.proxmox.com/wiki/SMEServer_KVM article] on installing SME Server as guest on Proxmox |
| + | |
| + | ===SME 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 | | This is based on work by Daniel here: https://wikit.firewall-services.com/doku.php/tuto/virtualisation/netwok_conf_sur_dedibox |
| | | |
− | === Online.net configuration === | + | ===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 /> | | {{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.'' | | ''The problem is that your IP is NOT on the same network range as your gateway so we have to fool the system.'' |
Line 96: |
Line 135: |
| | | |
| Some assumptions: | | Some assumptions: |
− | ;Your main IP address: | + | |
− | * IP address 62.20.20.250 | + | ;Your main Proxmox server IP address: |
− | * Netmask 255.255.255.0 | + | |
− | * Gateway 62.20.20.1 | + | *IP address 62.20.20.250 |
| + | *Netmask 255.255.255.0 |
| + | *Gateway 62.20.20.1 |
| | | |
| ;Your secondary IP address : | | ;Your secondary IP address : |
− | * 200.30.30.1
| |
− | * 10:10:00:00:20:20 - you DID set the MAC didn't you ?
| |
| | | |
− | === Proxmox configuration === | + | *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 Gateway 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!!}} | | {{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: | | 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 a new network interface and call it '''vmbr1''' |
− | * Create your KVM for SME. Make sure that you give it two network adaptors - one is '''vmbr0''' and one is '''vmbr1''' | + | *Do NOT set IP address/subnet/bridge ports etc. |
− | ** vmbr0 should have the following settings : | + | *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 | | ::Model: virtio |
| ::MAC: 10:10:00:00:20:20 (as per your mac that you set) | | ::MAC: 10:10:00:00:20:20 (as per your mac that you set) |
| + | |
| *After you have created the KVM add a second adaptor: | | *After you have created the KVM add a second adaptor: |
| **vmbr1 should have the following settings: | | **vmbr1 should have the following settings: |
| + | |
| ::Model: virtio | | ::Model: virtio |
| ::MAC: should be the MAC of your main IP address | | ::MAC: should be the MAC of your main IP address |
Line 123: |
Line 171: |
| It doesn't matter which one is 0 or 1 as long as the settings are correct. | | It doesn't matter which one is 0 or 1 as long as the settings are correct. |
| | | |
| + | You might want to edit your /etc/network/interfaces |
| + | auto vmbr1 |
| + | iface vmbr1 inet manual |
| + | bridge-ports none |
| + | bridge-stp off |
| + | bridge-fd 0 |
| + | post-up echo 1 > /proc/sys/net/ipv4/ip_forward |
| + | # we assume external interface is eno1 here, adapt accordingly |
| + | post-up echo 1 > /proc/sys/net/ipv4/conf/eno1/proxy_arp |
| + | post-up echo 1 > /proc/sys/net/ipv4/conf/vmbr1/proxy_arp |
| + | post-up echo 1 > /proc/sys/net/ipv4/conf/vmbr1/forwarding |
| + | #uniq ip |
| + | post-up /sbin/ip route add VMIP.VMIP.VMIP.VMIP dev vmbr1 |
| + | pre-down /sbin/ip route del VMIP.VMIP.VMIP.VMIP |
| + | # multiple routable IP subnet example |
| + | post-up /sbin/ip route add VMIP.VMIP.VMIP.VMIP/29 dev vmbr1 |
| + | pre-down /sbin/ip route del VMIP.VMIP.VMIP.VMIP |
| | | |
− | {{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}}
| + | After setup you can run: |
| | | |
− | === SME V8 Configuration === | + | config set GatewayIP 62.210.0.1 |
| + | |
| + | /etc/e-smith/events/actions/update-ifcfg |
| + | signal-event post-upgrade;signal-event reboot |
| + | |
| + | ===SME Configuration=== |
| Now do your standard SME installation. | | Now do your standard SME installation. |
| | | |
| + | <tabs container><tab name="For SME 10"> |
| + | * Install SME using ISO |
| + | * choose install mode without LVM and RAID add this on boot options: nolvm noraid |
| + | * Optionally you could use the Disk tool at the second screen if you want to put /home/e-smith/files in a different disk. |
| + | * Enter the console at the end of installation. |
| + | ** set admin password |
| + | ** set domain and hostname |
| + | ** choose server-gateway (do not use server only if you use an IP accessible directly from the internet because Firewall is not designed for that in Server-Mode) |
| + | ** LAN: choose the dummy interface if you only have an interface, or the appropriate one for LAN |
| + | ** LAN: use all suggested setting or adapt to your needs |
| + | ** WAN: choose static mode |
| + | ** WAN: set the dedicated IP |
| + | ** WAN: set the Netmask with either 255.255.255.255 or 0.0.0.0 (MASK includes only your IP or MASK includes all IPs) |
| + | ** WAN: set the Gateway IP (as the Gateway will be quite different from the Server IP you need to have the MASK set as shown above to have it accepted. |
| + | |
| + | signale-event post-upgrade; signal-event reboot |
| + | |
| + | enjoy |
| + | |
| + | </tab> |
| + | <tab name="For SME 8"> |
| <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> | | <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> |
| | | |
Line 134: |
Line 225: |
| | | |
| 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.: | | 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 | | :IP : 200.30.30.1 |
| :Subnet : 255.255.255.0 | | :Subnet : 255.255.255.0 |
Line 213: |
Line 305: |
| LocalNetmask=255.255.255.0 | | LocalNetmask=255.255.255.0 |
| | | |
− | === SME V9 Configuration === | + | </tab><tab name="For SME 9"> |
| | | |
| Things have changed slightly for v9 | | Things have changed slightly for v9 |
Line 234: |
Line 326: |
| | | |
| Note that you will not see MAC addresses in the Internal Interface settings as you did in v8 | | Note that you will not see MAC addresses in the Internal Interface settings as you did in v8 |
| + | </tab> |
| + | </tabs> |
| | | |
− | == Xen == | + | ==Xen== |
| | | |
− | == QEMU/KVM == | + | ==QEMU/KVM== |
| | | |
| <br /> | | <br /> |
− | == Virtualbox == | + | ==Virtualbox== |
| | | |
| ===High I/O causing filesystem corruption=== | | ===High I/O causing filesystem corruption=== |
Line 255: |
Line 349: |
| | | |
| | | |
− | == OpenNode == | + | ==OpenNode== |
| See this [http://forums.contribs.org/index.php?topic=50994 forum] post | | See this [http://forums.contribs.org/index.php?topic=50994 forum] post |
| | | |
Line 307: |
Line 401: |
| You will find help in the opennode's wiki and forum. | | You will find help in the opennode's wiki and forum. |
| | | |
− | = SME Server as a Host server = | + | =SME Server as a Host server= |
− | == Phpvirtualbox == | + | ==Phpvirtualbox== |
− | * [[Phpvirtualbox]] SME Contrib
| |
− | | |
| | | |
− | == VMware ==
| + | *[[Phpvirtualbox]] SME Contrib |
− | * 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.
| |
| | | |
| | | |
| + | ==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. |
| | | |
| [[Category:Virtualisation]] | | [[Category:Virtualisation]] |
| | | |
| [[Category:Howto]] | | [[Category:Howto]] |