No Boot after upgrading to Sangoma-7 via VirtualBox and then back to Hyper-V

(Greg Snover) #1

Ok - I suffer so you don’t have to…

I had 4 Hyper-V Machines left that were on FreePBX-13/Sangoma6 and of course, being Hyper-V, I could not upgrade them.

But…If you mount them into VirtualBox, they upgrade just fine - so that is the route I took and it worked fine for all 4 machines…until I tried to put them back into Hyper-V - they would not boot.

You end up with a ton of errors, a LONG hang and then an emergency prompt with “Reached Target Basic System” and then a rescue prompt.

Come to find out, while it’s running and then being upgraded inside VirtualBox, once the upgrade is complete, it doesn’t have the Hyper-V Drivers anymore - so you have to rebuild the init for the system.

Boot into rescue from a CentOS-7 disc and do the following:

mount --bind /proc /mnt/sysimage/proc
mount --bind /dev /mnt/sysimage/dev
mount --bind /sys /mnt/sysimage/sys
mount --bind /run /mnt/sysimage/run
systemctl start multipathd.service

chroot /mnt/sysimage

cd /boot

mkinitrd -f -v --with=hid-hyperv --with=hv_utils --with=hv_vmbus --with=hv_storvsc --with=hv_netvsc /boot/initramfs-3.10.0-1127.19.1.el7.x86_64.img 3.10.0-1127.19.1.el7.x86_64

Look in the directory and make sure you match EXACTLY the kernel version that is installed - currently 3.10.0-1127.19.1.el7.x86_64 in the above command, but as time goes by, it will change.

Once this is done, exit out of the rescue, eject the CentOS ISO and reboot and you are back in business.

Works for me and I didn’t have to migrate/reload - worth it!

(Itzik) #2

How long does this process take? Isn’t it easier to spin up a new 15 VM and restore a backup?

(Greg Snover) #3

Couple of hours all told - but these are complex setups and the migration always loses things - sometimes big things and sometimes little things, but always a different box than when you started.

FYI - something else I noticed this morning - the realtime database had to be reset like here:

After move/upgrade all calls to extensions go to unavailable/voicemail - FreePBX / Endpoints - FreePBX Community Forums

fwconsole util resetastdb

and also the SIP settings page was defaulted - had to fix that too!

(system) closed #4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.