Skip to content

ttrpc: cannot marshal unknown type: *proto.CreateVMRequest when using socket #780

@ST-Apps

Description

@ST-Apps

Hi everyone,
I'm trying to build a custom utility to start VMs and containers using firecracker-containerd and your SDK.

As a first test I tried to replicate one of the tests in your code to see if I could properly connect to my firecracker-containerd socket and start a VM, however I'm getting the error that you can see in the title.

My guess is that there is some kind of version mismatch between the proto version that is published on this repo and the actual one used by my socket, even if I'm on latest version for both (by latest I mean that I cloned the repo and build from source).

Here are some details on my environment and code:

$ firecracker-containerd --version
containerd github.com/containerd/containerd 1.6.20+unknown 3fae0bdd0f592581a2e0519fd6c307b8549569f8

go imports

require (
	github.com/containerd/containerd v1.6.23
	github.com/firecracker-microvm/firecracker-containerd v0.0.0-20230901203207-fc5e81ef584b
	github.com/gogo/protobuf v1.3.2
)

go code

	fmt.Println("Creating VM")
	_, err = fcClient.CreateVM(ctx, &proto.CreateVMRequest{
		VMID: vmID,
		NetworkInterfaces: []*proto.FirecrackerNetworkInterface{{
			AllowMMDS: true,
			// This assumes the demo CNI network has been installed
			CNIConfig: &proto.CNIConfiguration{
				NetworkName:   "fcnet",
				InterfaceName: "veth0",
			},
		}},
	})

Any idea on what could be going wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions