Deploy custom ISO or Image file

#1

For testing purposes I need to deploy systems from a custom ISO image.

I’ve tried using Grub2 to create a loopback from my custom image, a stock Ubuntu server image and a stock Debian image - none of which are able to successfully boot with a useable console.

I’ve thought of creating a RAMDisk to boot from as well, so I can use dd over SSH to write my image, from a remote source, directly to the block device. However, I am unable to get this to work.

My image is a modified version of the Proxmox Mail Gateway ISO, though the modifications can be made following a vanilla installation as well… I’ve been unable to get Proxmox’s stock image to boot.

At this point I’m at a loss for what to attempt next. Any suggestions?

1 Like
#2

I was able to resolve this myself.

Using an ARM instance, which supports multiple LSSDs - I created a volume of an appropriate size for what was required.

I then used dd on a source disk and piped it into an SSH tunnel to the ARM instance where the output was the designated volume.

Once the block level duplication completed, I took a snapshot of the volume and subsequently created an image from it. I then used the image to deploy my instances.

1 Like
#3

So, it looks like you have to power off the ARM instance to attach/detach volumes. Did you create a new instance to avoid disturbing production?

Did you have to use a 100G arm instance? The 2G arm instance won’t let me attach an additional volume.

The 100G won’t accept an additional volume either. Maybe you used the 32-bit arm?

#4

Do you have to create the instance first, and then you can attach additional volumes?

#5

The screenshot below demonstrates which ARM instance is required:

The minimum volume size is 25GB, which is more than what I required for my deployment. Scale this according to your own needs, of course.

What I did once the instance was up and running was;

  • Set up a VM at home with the OS and application configuration I need.
  • Once the VM is setup, shut it down and boot off of a Live CD (I used Ubuntu Desktop).
  • Use dd to perform a block level copy of the VM and pipe this through SSH to the ARM instance - write the output to the volume which you created for this task.
  • Once dd has finished duplicating the virtual disk, you can shut the ARM instance down and snapshot the target volume… then create an image from the snapshot. (Set the image to x86_64 if required). The ARM instance can also be deleted once you have you image, so as not to incur any additional cost.
  • You now have an image that can be deployed to any instance which supports a volume of 25GB+

I deployed mine to a DEV1-M instance. The total volume size of which is 40GB, Scaleway automatically added my 25GB image as a volume and another 15GB volume to meet the total storage requirement.

#6

I didn’t disturb production at all during this process, I’m doing this to expermiment with the platform. As a proof of concept it was important that I should be able to deploy any image I want to - to the platform.