Is it possible to migrate an unsupported kernel to AWS? Is there a work around for it?
I am trying to migrate a Linux server from VMware to AWS but it’s failing for “unsupported kernel”. The kernel is “Gentoo 3.7.8-pbx+” and I believe it’s a custom kernel. Is there a way around migrating this to AWS?
You’re going to need to identify what specifically is needed from this kernel when migrating the instance to AWS.
Generally, any Linux instance running in AWS will need cloud specific configuration/virtualization info to run efficiently. You’ll probably need to build a new kernel to run this Linux instance on AWS.
One thing of note here is that on the Nitro instance types (m5, c5, r5 and newer) you need to have NVMe and ENA drivers. The ENA drivers were introduced in some low 4.x (possibly 4.5) kernel, so you might have some issues getting them on 3.7. I think for NVMe, especially if you expect stability, you might also need an upgrade. It might be easier to have this working on Xen instances, although I think some of those also come with ENA.
It may be possible to get running (I’m out of my depth here), maybe it would work with a “metal” instance, but I think it’s important to stop and ask ‘Why’ you need to move it - you might save a lot of effort and heartache by moving to a supported OS from AWS. Of course, that doesn’t suit every situation, but personally i would be chasing the application vendor to help you to move to something like CentOS, Ubuntu, or even Amazon Linux 2.
Have had same issue. I updated the server to a supported kernel and then did the import. I may or may not then downgrade back. It is not clear to me in all cases that this is the VM Import tool just looking at some limited amount of info before spitting out the failure message. But, I am also in the same position as you are - if I go back to the ‘unsupported’ kernel I am left to wonder what may or may not work on AWS, and if I leave it with the supported kernel I am left to wonder if any of the installed software I want to run depends on that specific kernel. In my case, it is MATLAB I care about, and I may decide the safest avenue is to pick a good AMI in the region that is my bane, and do the MATLAB install from media.
I am currently running this Getoo server at our datacentre on an ESXi host. It holds business-critical application so stability is most important.
I’ve looked into the documentation in the links you’ve provided and it looks promising. The problem is, I have gaps in my Linux knowledge so I will question based on my assumptions.
The steps to building a Gentoo AMI is not to convert my current server but to use a currently supported AMI such as AWS AMI and to use the kernel from that to build the Gentoo AMI. This still leaves me with the question of how do I migrate the current old Gentoo built application to the new AWS Gentoo AMI?
You will need to go over documentation to know what dependencies to install and what (if any) users and groups to define.
Is the application installed in a particular directory? If so, you can take up the directory and xfer the tar file over via ssh or other network protocol.
Keep a good backup of your existing server as I imagine shits going to get real getting this to work.
That’s assuming that the current old Gentoo server is partitioned and the whole thing is not loaded onto one partition right? As with that, even after I copy the image to an EBS volume, I would run into the same problem with the kernel?
I will be working of a cloned VM and even if I manage to get this working, I will run 1 test production to see if I encounter any problems.
Unfortunately, the software company no longer supports this system so they are no help with providing with updates to the current customer kernel created by them so I need to figure out if I can replicate the application directory, if exists separately, onto a supported Gentoo kernel which from reading the documentation from the links you’ve shared, seems like I have one.
First question: not sure. If you carve out the actual OS from the monolithic piece, then you could do it. AWS won’t care as long as the thing can successfully boot and has all needed drivers (NVME, ENA, possibly Xen drivers if using an older instance, KVM drivers for a newer one)
Second question: Shouldn’t care, no. The only reason AWS cares with VM Import is because they’ll inject the necessary drivers for your kernel version if need be, and it’s a matter of support. Basically they can’t guarantee that EVERY kernel version will work flawlessly, so they pick a few to certify, update the certified list every so often, and call it a day. That check only happens with the VM Import process though. If you go the route of DD to S3, copy from S3, DD straight to EBS, you bypass all the checks but you’re also totally on your own if it doesn’t work for some reason.
You can download a supported kernel, switch to that kernel for the process of migration, and switch back once the VM has been migrated. Most imports copy data at the block level, so this could be a feasible option. Let us know if it works, also how you are importing it.
Thank you. That sounds promising and I will give that a try. Just waiting for Veeam restore to see if that skips AWS verification process. Otherwise, DD it is.
I believe drivers will be my next problem. In the ideal world, I would like an AWS package to install the necessary drivers but as this is an old server that has not been updated for many years, I doubt I will have luck finding anything it accepts.
I’ve actually bumped into a forum talking about deleting unused kernels and made me realise what you’re suggesting. However, as this server is business-critical, I want to keep it unmodified if I can so I will attempt this after the DD method which /u/jmanbc suggested. In the process of imaging now.
Sounds like you want to build ‘data centre in the cloud’.
Can you not push the ‘business critical applications’ to a new, natively supported, patched and maintainable AWS AMI? Do this with your fave app deployment and configuration service e.g. Ansible/Chef and then make sure your EBS storage has delete protect on it, then you end up with an immutable service.
You could also then add an auto scaling group to dynamically handle load/demand and potentially prove fault tolerance.