I've successfully migrated several Ubuntu VMs from ESXi and XenServer to HyperV 2012 by exporting the VM and then using Starwind's VHD converter. I've not had to run any scripts on the Linux VMs before shutting them down and exporting.
The default installation of Elastix has more services running than are typically needed or desired on a PBX. These services eat far more memory that is necessary and can very easily be cleaned up to improve memory utilization.
First we will stop a series of unnecessary services from starting at boot time (this will disable shared storage, local email handling, new hardware detection, etc. so be aware that this does stop some things but any service that proves to be needed is trivial to re-enable.)
chkconfig nfslock off
chkconfig cyrus-imapd off
chkconfig iscsi off
chkconfig iscsid off
chkconfig netfs off
chkconfig kudzu off
Further, if your system is like mine you likely use the web server very lightly but will find that the default configuration of Apache is set to spawn, by default, eight processes. This is far too many for a normal deployment. Each process uses memory. For an average deployment of Elastix, three is more than enough. You need only raise this number if web performance suffers. This will not impact telephony performance regardless.
In the file /etc/httpd/conf/httpd.conf we need to edit the section:
You can wait for the system to reboot or restart Apache manually:
service httpd restart
And finally, to control swapping activity on the box, assuming that you want to avoid swapping when unnecessary, which I do because my box is virtualized, simply add this line on to /etc/sysctl.conf:
vm.swappiness = 10
You’ll want to test that number carefully. A setting of “10” is quite standard for virtualized systems. The default is “60”. For a physical deployment the higher value is likely better as it allows CentOS to make better decisions about how to utilize memory for maximum throughput. But on a virtualized system we really want to avoid, typically, any additional contention at the storage IO layer.
[Testing on Elastix 2.0 and 2.3]