Yesterday I figured out how to capture an image. It was slow but I will accept it for now. Next up is to get this into Kubernetes. For right now the process will pickup the queue to capture disks via an HTTP call and will be de-multiplexed within the application. My tests were based on Ubuntu 20.10, so the golang app to server that will be placed on that image.

For the Golang app the core call will be:

func captureDiskImage(context context.Context, input string, output string) error {
    cmd := command.CommandContext(context, "dd", "if=" + input, "ibs=2048", "iflag=direct", "of="+output, "oflag=direct" )
    return cmd.Run()

This properly invoked the command and delivered the expected results.