Koozali.org: home of the SME Server

Run SMEServer as a VM under Centos or Fedora?

Offline brianr

  • *
  • 988
  • +2/-0
Run SMEServer as a VM under Centos or Fedora?
« on: December 20, 2016, 06:54:50 PM »
I am thinking of migrating my dedicated SMEServer to one running in a VM under Centos (7?) or Fedora 25 Server (I used F25 as a desktop - so I have some experience with it). I'd use Virtual Box (as I 've already got a number of other useful VB VMs).

What does the team thing about these issues?

1. How do I integrate the SMEServer into the network, does it make sense to use it as a firewall or should I deal with the WAN connection in the host OS and just use SMEserver in server-only mode for email and shared data?

2. I presume I am better setting up the Raid in the host (my desktop runs Raid 1), and just using a single Virtual Disc in the SMEServer VM?

Any other gotchas that I have not yet thought about?

Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #1 on: December 20, 2016, 09:21:10 PM »
My 2c.. Take a look at phpvirtualbox page in the wiki about bridge..
Server only, single disk no raid.. If you have the possibility, use a raw disk (a whole one or a partition)
If you need some hints, feel free to ask

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #2 on: December 21, 2016, 12:53:05 AM »
How important is uptime and stability of your SME Server instance?  If it's something you want to be up all the time, you might want to check out a better hypervisor like Proxmox or ESXi
......

guest22

Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #3 on: December 21, 2016, 07:31:44 AM »
When using Fedora as the host, I had very good results and performance using libvirt and SME Server. Please see https://fedoraproject.org/wiki/Getting_started_with_virtualization


Just my 2 cents to add to the equation ;-)

Offline brianr

  • *
  • 988
  • +2/-0
Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #4 on: December 21, 2016, 01:54:45 PM »
How important is uptime and stability of your SME Server instance?  If it's something you want to be up all the time, you might want to check out a better hypervisor like Proxmox or ESXi

Proxmox looks pretty interesting, I can see that it has its own firewall, I suspect that I'll have to use that else proxmox itself will not be able to get updates etc.  I'll then have to set SMEServer to use that as a gateway I guess.

I'll build my new hardware in the next few days and try it out.

Anyone know if I can import VirtualBox VMs direct? Or perhaps I'll need to export them first.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

guest22

Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #5 on: December 21, 2016, 02:00:17 PM »
Brian, simply lay out your detailed plans here. Several of us use Proxmox in a production environment and will be able to help.

Offline brianr

  • *
  • 988
  • +2/-0
Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #6 on: December 21, 2016, 02:14:33 PM »
Brian, simply lay out your detailed plans here. Several of us use Proxmox in a production environment and will be able to help.

thanks  - I will once I know them!! Just getting to grips with the technology. Thanks for the comments.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #7 on: December 22, 2016, 01:50:28 AM »
Proxmox looks pretty interesting, I can see that it has its own firewall, I suspect that I'll have to use that else proxmox itself will not be able to get updates etc.  I'll then have to set SMEServer to use that as a gateway I guess.

Not necessarily.  I had my SME server running in server/gateway mode on my Proxmox box, and used it as the gateway for the Proxmox host as well as the rest of my network--until I put pfSense on a standalone ADI box and started using that instead.
 
Quote
Anyone know if I can import VirtualBox VMs direct?

You can import them, but it's a bit of a process.  Lots of information on Google about this though.  The basic process is to recreate the "shell" of the VM from scratch, and then convert the virtual disk file to a format that Proxmox can use and attach it to the newly-created VM.  It may require some driver reconfiguration, and would definitely require re-activating Windows if you're using that as a guest OS.

One thing I really like about Proxmox is that it supports native use of ZFS, which I've become very fond of after working with it under FreeNAS.
......

Offline brianr

  • *
  • 988
  • +2/-0
Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #8 on: December 22, 2016, 01:13:23 PM »
One thing I really like about Proxmox is that it supports native use of ZFS, which I've become very fond of after working with it under FreeNAS.

That was going to be my next question - what does the team think about zfs? I am thinking 2 hard drives (raid) for /home, plus an ssd for the proxmox "/". Perhaps encrypted as well.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #9 on: December 22, 2016, 11:31:20 PM »
what does the team think about zfs?
ZFS is a fantastic filesystem, but unfortunately not natively supported by SME.  It is supported by Proxmox, though.
Quote
I am thinking 2 hard drives (raid) for /home, plus an ssd for the proxmox "/". Perhaps encrypted as well.
I'm really not sure what you're intending here, as Proxmox doesn't use /home for anything of substance, and I don't think that ZFS on Linux supports encryption in any event.  Maybe it would help if I explained how mine is set up.

I have Proxmox installed to a (ZFS) mirrored pair of 2 TB hard drives.  When installed on ZFS, Proxmox can use "ZFS" local storage, which means that the virtual disks for the VMs will be created as zvols (which act in most ways as independent block devices, and can easily be overprovisioned).  My SME server instance is installed to a 2 TB zvol on my Proxmox host, and is installed as noraid/nolvm (no reason to use either of those when using a VM).

I can expand the storage available at any time (as well as increase the pool's performance) by adding additional mirrored pairs of disks.  The expansion is seamless and immediate.  I can take ZFS snapshots of any of the VMs I want, and replicate them to another system on a schedule--which allows me to restore the VM state over the network at near-wire speeds.  And, of course, I have the data integrity protection of ZFS as well.
......

Offline brianr

  • *
  • 988
  • +2/-0
Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #10 on: December 23, 2016, 08:46:37 AM »
Dan

Yes I see I intended that the SME ran on top of the zfs file system supported by proxmox.

I mean't by "/home" the "user" filesystem of proxmox which I assumed would host the data for the VMs. I'll need to get closer to zfs to really understand how it will match my thinking.

Thanks for the insight, I am still building my new server, and will then start experimenting.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline brianr

  • *
  • 988
  • +2/-0
Re: Run SMEServer as a VM under Centos or Fedora? (chose Proxmox)
« Reply #11 on: January 24, 2017, 03:54:17 PM »
Ok, reporting back.

Have built a proxmox server (3 x 2TB drives in ZFS RAID1-3, plus 250gb SSD and 500gb SATA) and and ported an WinXP image across by copying the vmdk file, which worked fine after re-registering Windows and getting the network interface correct (needed to add the virtio drivers), also needed a registry change and also removed the VB guest additions. Lots of help from here:

https://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE#Introduction

then built an SME92beta VM, and used Affa to pull over the data, which worked fine once I'd realised that Affa by default does not copy the /etc/dehydrated, so added "Include=/etc/dehydrated" to the Affa config file.

New SMEServer runs fine, in Server / gateway mode, bridged to two Ethernet ports, one of which is plugged into the switch and the other into my PPPOE Fibre to the Cabinet (FTTC) VDSL broadband modem.

Not yet tackled getting the nightly dar archive working to the USB drive.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

guest22

Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #12 on: January 24, 2017, 03:58:41 PM »
Congrats!

Offline ReetP

  • *
  • 3,732
  • +5/-0
Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #13 on: January 25, 2017, 02:40:29 AM »
Brian,

I have 3 Prox boxes and it is a pretty good base. Great for spinning up test boxes etc.

There is a gotcha regarding backups or snapshots or somesuch with 'LVM thin' that Prox uses by default. I can't remember now, but it is one of those things that can be awesome and/or bite you in the ass. I got bit so I reinstalled all the boxes without it.

SME then with no RAID and no LVM and you are off and flying :-)

USB backups can be a bit of a mare with USB passthrough type stuff I believe. You may be better dumping the whole VM to USB instead. However, in a recent update there is a bug somewhere (I think in the kernel) that trips out the VM whilst backing up a VM to USB. I thought a quick fix it was mentioned in the users list but can't see it - have a look in the forums.

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline brianr

  • *
  • 988
  • +2/-0
Re: Run SMEServer as a VM under Centos or Fedora?
« Reply #14 on: January 25, 2017, 10:39:23 AM »
There is a gotcha regarding backups or snapshots or somesuch with 'LVM thin' that Prox uses by default. I can't remember now, but it is one of those things that can be awesome and/or bite you in the ass. I got bit so I reinstalled all the boxes without it.

SME then with no RAID and no LVM and you are off and flying :-)

USB backups can be a bit of a mare with USB passthrough type stuff I believe. You may be better dumping the whole VM to USB instead. However, in a recent update there is a bug somewhere (I think in the kernel) that trips out the VM whilst backing up a VM to USB. I thought a quick fix it was mentioned in the users list but can't see it - have a look in the forums.

i went for no LVM and no RAID. I also deleted the lvm-thin FS and created an ext4 one on a seperate 500gb HD, and mounted it on /var/lib/vz, so that I could "see" the images files. This describes the procedure:

https://pve.proxmox.com/wiki/Installation:_Tips_and_Tricks

I'll try the USB passthrough and report back. I'd rather have the incremental dar archive every night if I can.
 
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........