princeton-sns / firecracker-tools

5 stars 5 forks source link

Snapshot #5

Closed tan-yue closed 5 years ago

tan-yue commented 5 years ago
  1. add optional --load_from and --dump_to both of which take snapshot directory as argument
  2. add optional --mem_size to set guest memory size
  3. make rootfs and appfs writable otherwise applications cannot run.
  4. add customized kvm-bindings which uses serde.
alevy commented 5 years ago

For kvm-bindings, instead of putting the source code in this repository, you should fork it to SNS, make appropriate changes in the forked repo and point our fork of firecracker to that repo rather.

This addresses two issues with the currently proposed setup:

  1. Currently it's hard to see which changes you actually made to kvm-bindings, making it harder to upstream them if necessary (and also harder to review)

  2. The current setup has an odd cross-dependency between this repo and the firecracker sub-repository, where the firecracker sub-repository can't compile on it's own, since the kvm-bindings dependency relies on firecracker living in a subdirectory of the firecracker-tools repo

tan-yue commented 5 years ago
  1. removed local kvm-bindings as suggested. changes made to kvm-bindings
  2. also added optional --vcpu_count as I tested multi-vcpu snapshot.
LedgeDash commented 5 years ago

@tan-yue This actually broke build on my end. The error is at firecracker-tools/firecracker/vmm/src/lib.rs:1328. The commit is 1faee03a6b6e31691a1a401895cc1cd4554e1b39 to the firecracker repo. I also added a comment at the offending line in that commit.

It's due to some "borrowing selfas mutable more than once at a time". I briefly read the rust reference, couldn't quite understand what's going on. So figured I'd report here and since one of you should be able to fix it much faster.

tan-yue commented 5 years ago

@LedgeDash your firecracker repo should point to commit b53fe76a210526d5d1d55a533857086306e5edb1 for firerunner to build. The master branch of firecracker-tools now points at commit b53fe76a210526d5d1d55a533857086306e5edb1.

LedgeDash commented 5 years ago
[~/Dev/firecracker-tools/firecracker|Sat Aug 10 17:16:21]
[davidliu@sns59] git show
commit b53fe76a210526d5d1d55a533857086306e5edb1 (HEAD, origin/snapshot, origin/HEAD, snapshot)
Author: Yue Tan <yuetan@cs.princeton.edu>
Date:   Fri Aug 9 21:34:27 2019 -0500

    add set_queues/get_queues for VsockEpollHandler
    so that firecracker can compile when `vsock` feature is on

Yeah, that's the one I'm at.

LedgeDash commented 5 years ago

Problem resolved. toolchain issue. updating from 1.33 to 1.36 solved the problem. Will see if I can specify required rustc version in the tomlfile.

alevy commented 5 years ago

Not in the toml file but in a special rust_toolchain file. See the Tock repo for an example