Home > Work related > Migrating AsteriskNOW VMs from ESXi to Hyper-V

Migrating AsteriskNOW VMs from ESXi to Hyper-V


 

I wanted to touch base with some of you and share my experiences with virtualization. For those of you who have followed some of my posts you may be asking ‘how can I export/import’ between the different virtual hosts. (I have been asking myself this question for a few years now). As some of you are no doubt aware there are a number of tools available for a price that will enable the user to make this migration with as little time as a can of coke and some tim-bits but for the average tech out there these tools are expensive. Some of them work great between one platform or another but not all of them work perfectly. As I am a man on a budget and choose only to spend money when I have to I tend to lean towards tools that are free that, although they may take time and expertise to operate, make my bottom line, and that of my clients, easier to swallow.

Part of the problem with changing hypervisors is that apps like Xen and Hyper-V use vhd files while vendors like VMware have made their own type called vmk. There are some tools that will convert from one file type to another but they don’t take into consideration the different architectures that you made the VM image with and plan to run it on. Then there are drivers – those can blue screen a windows system or hang a Linux based system if you aren’t careful.

Well I recently tried to migrate some vms from my ESXi 5 machines onto a Hyper-V cluster and made some interesting observations.

OpenSUSE has a hard time converting from vmk to vhd because of the sixe of the resulting vhd reporting a superblock size difference. If you run resize2fs on the disk you can actually get the vm to boot on the Hyper-v system.AsteriskNOW-config (Might require the Integration tools – more on that later)

AsteriskNOW runs on CentOS and has no problem running on Hyper-V clusters but I warn you – you must set the MAC address to be static on a Virtual Network Adapter in order to have the IP come up on the other Hyper-V hosts in the cluster. (Incidently I have used VMs to run asterisk in my home office for almost a year now without any issues).

We need to do a few things to add the Hyper-V Integration tools for Linux to make this complete. You need to install the GCC compiler and any dependancies to be able to compile the Hyper-V tools (storage, VM bus, synthetic NICs, etc.) Once installed you should see the boot screen resemble something like this 

Hyper-V-Linux-Tools

Now that we have confirmed that the guest is back online let’s shut it down with the tools.

AsteriskNOW-HANext we can add the VM to the list of HA apps on the cluster.  Once we have done that let’s start it up again to confirm it can boot.

 

Now if one of my vm hosts goes offline (loss of power, network, etc.) then my PBX is dynamically moved to a new host and brought online again with a short downtime (about 15 seconds) shown below.

AsteriskNOW-Failover

It sure is nice to have AsteriskNOW running on a free cluster now (without the cost of running enterprise software Winking smile.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: