GaloisInc / halvm-web

Other
15 stars 5 forks source link

Unikernel not found #4

Open runeksvendsen opened 8 years ago

runeksvendsen commented 8 years ago

I've reached the last step, trying to build the AMI image, and I'm getting this error:

rune@Runes-MacBook-Pro:~/IdeaProjects/halvm-web$ docker run -v ${PWD}/halvm halvm/extended ec2-unikernel -o ${AWS_ACCESS_KEY} -w ${AWS_SECRET_KEY} -r oregon -z us-west-2a -b halvm-test1 .cabal-sandbox/bin/halvm-web site.tar
ERROR: Unikernel not found

Usage: ec2-unikernel [OPTION...] KERNEL [RAMDISK ...]
  -o KEY     --aws-access-key=KEY    AWS access key to use
  -w VALUE   --aws-secret-key=VALUE  AWS secret key to use
  -b BUCKET  --s3-bucket=BUCKET      S3 bucket to upload to, temporarily.
  -z ZONE    --zone=ZONE             S3 zone in which that bucket livees.
  -r REGION  --region=REGION         S3 region to upload to.
  -a STRING  --kernel-args=STRING    Kernel arguments to pass to the unikernel.

rune@Runes-MacBook-Pro:~/IdeaProjects/halvm-web$ ls -l .cabal-sandbox/bin/halvm-web
-rwxr-xr-x@ 1 rune  staff  5875600 Sep 16 09:35 .cabal-sandbox/bin/halvm-web
rune@Runes-MacBook-Pro:~/IdeaProjects/halvm-web$ ls -l site.tar 
-rw-r--r--  1 rune  staff  3215360 Sep 16 09:40 site.tar

As far as I can see, the file is there, so I'm not sure what's going on...

runeksvendsen commented 8 years ago

It's a typo in the command listed under Option #2 in the README.md that is the cause of this: a missing colon after ${PWD}. I'm not sure why it needs a colon there, but adding one makes it actually reach out to AWS, rather than complain about a missing unikernel.

acw commented 8 years ago

Whoops! I've fixed the typo, but haven't validated that the new step works. Partially because I keep missing these things on my machine, and I'd love a third-party check.

For reference, Docker's -v flag maps a local directory to a directory in the container, and the colon is used to separate the two. So -v ${PWD}:/halvm says "mount the current directory into the container's /halvm directory", which just happens to be the default directory for executing in the halvm containers.