Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: psoren on March 26, 2019, 11:13:11 AM

Title: Move SME to Vmware 6.7 esxi
Post by: psoren on March 26, 2019, 11:13:11 AM
Hello,

I am going to move my SME server to some new hardware running a vmware esxi 6.7.

I would like to do this by cloning it to the virtual disk if possible to avoid using backup and also moving OpenVPN certificates.

Does anyone have a good way to do this?

Thank
Per
Title: Re: Move SME to Vmware 6.7 esxi
Post by: Jean-Philippe Pialasse on March 26, 2019, 12:00:33 PM
Yes but prepare to fight.
The easiest way:
1- Install a new one on the vm.
2- Boot on install disc in rescue mode from both old and new with network
3 rsync all content except boot from old to new
4 reboot new one, access the new sme directly to reconfigure network using console.  Reconfigure and reboot

Et voila.

If you want to reduce downtime you can at step 2 only boot in rescue the new one an rsync few big folders like /home before booting both in rescue and finishing the rsync

Why not boot ? Because of the initrd you want to be specific to the new vm or it will not boot.

Alternative : rsync to a virtual disc. Boot with rescue disc to regenrate the initrd of the current kernel. And after initial boot reconfigure the network.
Title: Re: Move SME to Vmware 6.7 esxi
Post by: psoren on March 26, 2019, 12:21:09 PM
Yes but prepare to fight.

There is always some fight.... :-D

I think i will try, thanks !

Per
Title: Re: Move SME to Vmware 6.7 esxi
Post by: ReetP on March 26, 2019, 12:30:39 PM
There are ways but YMMV...

Have a search n the interwebs for something like:

"clone real hard disk to esxi virtual disk"
Title: Re: Move SME to Vmware 6.7 esxi
Post by: psoren on March 26, 2019, 12:39:44 PM
There are ways but YMMV...

Have a search n the interwebs for something like:

"clone real hard disk to esxi virtual disk"

Yes, i also looked at Vmware standalone converter. But it looks like several steps to do as well. And i remeber from time back that it was not happy with LVM disks. However it could have changed :-)

Per
Title: Re: Move SME to Vmware 6.7 esxi
Post by: ReetP on March 26, 2019, 01:23:10 PM
Yes, I believe you should not use LVM with virtual disks.

When I converted all my stuff to Proxmox I went down the route of noraid/nolvm on a clean SME install.

I think I used affa to move mine but it really depends on how much down time you can afford. The worst was moving all my mail to SME in a cloudy sky place which over a slow ADSL uplink took a while. So I let it sync on and off slowly over a number of days until it was almost identical, and then pushed the button.

Local ones are obviously much easier and faster.
Title: Re: Move SME to Vmware 6.7 esxi
Post by: Jean-Philippe Pialasse on March 26, 2019, 01:41:35 PM
Lvm and raid works on vm. Raid is to avoid as it does only slow the vm and host. Anyway raid should rather be in the host.

For lvm it is a personal choice to use or not, but better is to keep it simple as some virtual disk will offer few interesting aspects of lvm.

Globally you have to find your prefered way to transfer the data and then reconfigure.
Even backup and restore will need a reconfiguration plus it will need reinstall rpm for contribs.
Title: Re: Move SME to Vmware 6.7 esxi
Post by: psoren on April 01, 2019, 10:13:11 PM
Update:

I ended up just doing a fresh install and used affa to migrate data and users.

I then used rsync to copy all OpenVPN certificates and it all worked great.

Thanks

Per
Title: Re: Move SME to Vmware 6.7 esxi
Post by: ReetP on April 02, 2019, 12:21:26 AM
Great feedback thanks !!
Title: Re: Move SME to Vmware 6.7 esxi
Post by: Drifting on May 22, 2019, 02:13:25 PM
Actually hope you do not mind me jumping in, but there is some relevance to this.
If you are running ESXi 6.7, can you try rebooting the server (Vmware) a few times. Also, try moving the SME vm to another disk.
There is a reason for asking this. I have this really odd issue in that every time I reboot my test server, I have to run config on the sme to set the network cards again? Really odd. I don have 4 netcards in here, but the SME is only using two. No rush to try it, but if you can would be helpful to know it is not me going mad!

Paul.