APROL running on an AWS cloud instance?

Hi there - has anybody got experience setting up APROL to run on an AWS cloud instance?

So far I have managed to get APROL installed on a Hyper-V virtual machine and exported the virtual hard disk, but AWS VM Import/Export doesn’t seem to want to import it. AWS explicitly supports the SUSE and kernel versions, and I’ve run through all their troubleshooting steps, but it just doesn’t seem to want to boot. Wondering if I’ve missed something.

Cheers,
Andy

Hi andy, have you solved it? if so it would be nice to read article about it as a success story :slight_smile:

I did sort it in the end, but not in a particularly satisfying way! In the end I gave up on AWS VM Import/Export and did things in a more low-level way.

What I did was this:

  • Install APROL on a local Hyper-V virtual machine
  • Export the virtual machine hard disk as VHDX and upload it to S3
  • Create an EBS snapshot from S3 (using the AWS CLI’s ‘aws ec2 import-snapshot’ command; I don’t know if there’s a way to do this from the web console)
  • Start a ‘donor’ server in EC2. (This must use AWS Nitro hardware, because we need it to boot using UEFI.) I started one using Ubuntu, because that’s the Linux distro I know most about.
  • Create a new EBS volume from the snapshot above and attach it to the donor server
  • Bind-mount filesystems from the donor server into the EBS volume
  • Copy the Grub2 template files and default settings into the EBS volume (you should be able to use SLES’s own Grub config files, but I could not get it to boot no matter what I tried)
  • chroot into the EBS volume (at this point the server is now running APROL on SLES, but with an Ubuntu kernel)
  • Mount the EFI partition
  • Fix up the Grub2 scripts with some symlinks (commands starting with ‘grub-’ in Ubuntu start with 'grub2-’ in SLES)
  • Edit the grub defaults file to add the serial console
  • Generate a new initramfs for the SLES kernel
  • Use shim-install to write the new Grub2 defaults into EFI
  • Manually create a new EFI boot entry for SLES (to take account of the changed distro name)
  • Reboot!

I don’t have a good sense of how fragile this will be in the face of APROL upgrades. As long as new kernel installs just use the existing Grub2 templates, it should be fine; but if new templates are installed, the VM might stop booting. Not ideal!

It was quite a long and involved process in the end, for something that AWS is meant to support natively, and I wouldn’t really recommend it. A better way would probably be for B&R to develop an APROL installer that works on top of a standard installation of SLES LTS, so that it could run on top of any commodity SLES VM.