How to write Rocky 9 image to VPS?

Hi there!

I’m trying to copy a disk image to a VPS.

I was planning on making whole disk image backup from time to time too, but I would still need to find a way to upload it back to disk :stuck_out_tongue_winking_eye:

Here’s what I tried:

  • Download Rocky Linux 9 CloudReady image (the working 20220830 version)
  • Convert it to raw
  • ssh dd it to /dev/sda in recovery mode
  • Reboot, still on Rocky 8.6
  • I noticed there was an sdb drive in recovery mode, which I then assumed is the main drive.
  • dd the image there and I get “no bootable device” on reboot.

Commands:
Convert qcow2 to raw img
qemu-img convert -f qcow2 -O raw Rocky-9-GenericCloud-9.0-20220830.0.x86_64.qcow2 my-qcow2.img
Upload it to VPS
dd if="/media/Projects/OVH/my-qcow2.img" bs=1M oflag=sync status=progress | gzip -c | ssh root@00.00.00.00 dd of=/dev/sdb bs=1M oflag=sync'

The VPS is hosted with OpenStack in the backend, but it’s still a VPS, so I’m unsure of how it works o their side

I would appreciate if you have any clue on how to achieve this to share it with me :smiley: