Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to run go vm with firecracker as provider. #184

Open
ashish235 opened this issue Mar 5, 2019 · 2 comments
Open

Failing to run go vm with firecracker as provider. #184

ashish235 opened this issue Mar 5, 2019 · 2 comments

Comments

@ashish235
Copy link

Hi Guys,

I 'm trying to use unik to create vms for firecracker and run them. I can build the image following the steps on github but when i 'm running the image I 'm getting errors.

Build:

ubuntu@ip-172-35-102-151:~/unik$ unik build --name writeOS_miVM --path ./demo/ --base firecracker --language go --provider firecracker --force
INFO[0000] running unik build args= base=firecracker force=true host="localhost:3000" language=go mountPoints="[]" name=writeOS_miVM path=./demo/ provider=firecracker
INFO[0000] App packaged as tarball: /tmp/sources.tar.gz.708149797
NAME ID INFRASTRUCTURE CREATED SIZE(MB) MOUNTPOINTS
writeOS_miVM writeOS_miVM FIRECRACKER 2019-03-05 07:08:02.081358097 50

Run:
ubuntu@ip-172-35-102-151:~/unik$ unik run --instanceName writeOS_vm1 --imageName writeOS_miVM
INFO[0000] running unik run env="map[]" host="localhost:3000" imageName=writeOS_miVM instanceName=writeOS_vm1 mounts="map[]"
ERRO[0003] failed running instance: [cmd/run.go:98] running image failed: %v: {[client/instances.go:103] failed with status 500: Firecracker did not create API socket /home/ubuntu/.unik/firecracker/instances/writeOS_vm1/firecracker.sock: context deadline exceeded}

Debug logs from Unik.

time="2019-03-05T07:13:20Z" level=debug msg="Started POST /instances/run for 127.0.0.1:46952"
time="2019-03-05T07:13:20Z" level=debug msg="Received run request" request={writeOS_vm1 writeOS_miVM map[] map[] 0 false false}
time="2019-03-05T07:13:20Z" level=info msg="running instance writeOS_vm1" env=map[] image-id="writeOS_miVM" mounts=map[]
time="2019-03-05T07:13:20Z" level=debug msg="creating firecracker vm"
INFO[0945] Called startVMM(), setting up a VMM on /home/ubuntu/.unik/firecracker/instances/writeOS_vm1/firecracker.sock
time="2019-03-05T07:13:23Z" level=error msg="Firecracker Init returned error Firecracker did not create API socket /home/ubuntu/.unik/firecracker/instances/writeOS_vm1/firecracker.sock: context deadline exceeded"
time="2019-03-05T07:13:23Z" level=error msg="error handling request" error="Firecracker did not create API socket /home/ubuntu/.unik/firecracker/instances/writeOS_vm1/firecracker.sock: context deadline exceeded"
time="2019-03-05T07:13:23Z" level=debug msg="Completed 500 Internal Server Error in 3.001619102s\n"

I 'm using target as local and this is my config file.

providers:
firecracker:
- name: firecracker
binary: /home/ubuntu/firecracker
kernel: /home/ubuntu/hello-vmlinux.bin
console: xterm

Also I can see the vm has been created.

ubuntu@ip-172-35-102-151:~/.unik$ ll firecracker/images/writeOS_miVM/boot.img

Please help.

@Irooniam
Copy link

Hello,
I'm having issues with getting unik running with firecracker but I can't even finish local build:

go-bindata -pkg versiondata -o containers/container-versions.go containers/versions.json
GOOS=linux go build -v .
go: finding github.com/solo-io/unik/instance-listener/bindata latest
go: finding github.com/solo-io/unik/instance-listener latest
go: finding github.com/solo-io/unik latest
Fetching https://github.com?go-get=1
go: finding github.com/rackspace/gophercloud/openstack/imageservice/v2/images latest
go: finding github.com/rackspace/gophercloud/openstack/imageservice/v2 latest
go: finding github.com/rackspace/gophercloud/openstack/imageservice latest
go: finding github.com/rackspace/gophercloud/openstack latest
go: finding github.com/aws/aws-sdk-go/private/endpoints latest
go: finding github.com/aws/aws-sdk-go/private/waiter latest
go: finding github.com/aws/aws-sdk-go/private/signer/v4 latest
go: finding github.com/aws/aws-sdk-go/private latest
go: finding github.com/aws/aws-sdk-go/private/signer latest
Parsing meta tags from https://github.com?go-get=1 (status code 200)
../../go/pkg/mod/github.com/djannot/[email protected]/aws/session/session.go:17:2: unknown import path "github.com/aws/aws-sdk-go/private/endpoints": cannot find module providing package github.com/aws/aws-sdk-go/private/endpoints
../../go/pkg/mod/github.com/djannot/[email protected]/service/s3/service.go:11:2: unknown import path "github.com/aws/aws-sdk-go/private/signer/v4": cannot find module providing package github.com/aws/aws-sdk-go/private/signer/v4
../../go/pkg/mod/github.com/djannot/[email protected]/service/s3/waiters.go:6:2: unknown import path "github.com/aws/aws-sdk-go/private/waiter": cannot find module providing package github.com/aws/aws-sdk-go/private/waiter
../../go/pkg/mod/github.com/solo-io/[email protected]/pkg/providers/openstack/delete_image.go:8:2: unknown import path "github.com/rackspace/gophercloud/openstack/imageservice/v2/images": cannot find module providing package github.com/rackspace/gophercloud/openstack/imageservice/v2/images
../../go/pkg/mod/github.com/solo-io/[email protected]/pkg/util/container.go:15:2: unknown import path "github.com/solo-io/unik/containers": cannot find package
../../go/pkg/mod/github.com/solo-io/[email protected]/pkg/providers/common/compile_instance_listener.go:9:2: unknown import path "github.com/solo-io/unik/instance-listener/bindata": cannot find module providing package github.com/solo-io/unik/instance-listener/bindata
make: *** [Makefile:263: localbuild] Error 1

I've set export GO111MODULE=on and off, I've run go clean cache, but nothing works.

Any help would be appreciated.

@crackcomm
Copy link

@ashish235 I had the same error message, can you try with console: stdio?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants