I’d love to use Fly to effectively create “on-demand” workers but I need the ability to clone the microVM really quickly - this seems relatively easy since we have the ability to stop a fly machine (using the machines API), but there doesn’t seem to be a way to use the stopped machine as the basis for the clone.
The current clone command, as far as I can tell, creates a completely new machine.
Has anyone figured out how to do this?
What’s the use case driving you to want to clone a machine? That’ll help give a more useful answer.
I’m working on a remote data pipeline POC, the idea being that I can spin up a worker and have it listen on port 3000, then stop/pause/snapshot the VM.
Then, when I have work to do I can effectively clone the snapshots and start them up (and then use their private IPs to send work to them)
Have you come across this command yet? (wasn’t sure if you were using the API. This command basically just grabs the config of one machine and uses it to create another machine)
Apparently, Machines don’t wake up on requests to its
6pn address (but they do wake up on requests sent to its
Flycast address, if any): Machines app without public ports - #3 by JP_Phillips
…snapshot the VM.
Cannot snapshot VMs, just yet:
VM Snapshot vs Volume Snapshot - #3 by kurt
You could however attach a volume to the Machine, if data is what you want persisted across reboots. Though, I am unsure if volumes even play nicely with Machines:
Fly Machines questions - #8 by jgoux | Machine fails if a volume is attached
Your best bet is to
fly m clone from an existing Machine’s docker image, if that suits your use-case.
Ah well, I guess then I’ll wait until VM Snapshotting is available.
Thanks for your help everyone!