From 82380528d27a66d2968d52147c59602938ff9586 Mon Sep 17 00:00:00 2001 From: Georgiy Lebedev Date: Thu, 24 Aug 2023 14:19:53 +0600 Subject: [PATCH] Add support for firecracker VM snapshot-restore In order to support firecracker snapshot-restore we need to make the following changes: * add a new CreateSnapshot request; * add new parameters for snapshot loading to the CreateVM request (following the firecracker Golang SDK design, snapshot loading is essentially creating a VM with additional snapshot options). When a VM is created by loading a snapshot, it's container snapshot drives are already mounted, so the drive mount stub creation and mounting is skipped. Also add a NetNS (network namespace) parameter to the CreateVM request, since the current NetNS parameter nested in the JailerConfig parameter requires specifying the entire jailer configuration, which is not convenient. Signed-off-by: Georgiy Lebedev --- .gitmodules | 2 +- _submodules/firecracker | 2 +- firecracker-control/local.go | 18 ++ firecracker-control/service.go | 5 + go.mod | 27 +- go.sum | 50 ++-- proto/firecracker.pb.go | 259 ++++++++++++------ proto/firecracker.proto | 15 + proto/service/fccontrol/fccontrol.proto | 3 + proto/service/fccontrol/ttrpc/fccontrol.pb.go | 65 +++-- runtime/service.go | 54 +++- 11 files changed, 352 insertions(+), 148 deletions(-) diff --git a/.gitmodules b/.gitmodules index 66e666165..6dd19e1e2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,7 +3,7 @@ url = https://github.com/opencontainers/runc [submodule "firecracker"] path = _submodules/firecracker - url = https://github.com/firecracker-microvm/firecracker.git + url = https://github.com/curiousgeorgiy/firecracker.git [submodule "stargz-snapshotter"] path = _submodules/stargz-snapshotter url = https://github.com/containerd/stargz-snapshotter diff --git a/_submodules/firecracker b/_submodules/firecracker index 77cfb9cea..fdceaf9d0 160000 --- a/_submodules/firecracker +++ b/_submodules/firecracker @@ -1 +1 @@ -Subproject commit 77cfb9ceaa6a54e22a8259f50fb621ad1e39292b +Subproject commit fdceaf9d064114c1d96247244ae919c332e6f486 diff --git a/firecracker-control/local.go b/firecracker-control/local.go index 4dc79185e..4f6b441d5 100644 --- a/firecracker-control/local.go +++ b/firecracker-control/local.go @@ -265,6 +265,24 @@ func (s *local) PauseVM(ctx context.Context, req *proto.PauseVMRequest) (*types. return resp, nil } +// CreateSnapshot creates a snapshot of a VM. +func (s *local) CreateSnapshot(ctx context.Context, req *proto.CreateSnapshotRequest) (*types.Empty, error) { + client, err := s.shimFirecrackerClient(ctx, req.VMID) + if err != nil { + return nil, err + } + + defer client.Close() + + resp, err := client.CreateSnapshot(ctx, req) + if err != nil { + s.logger.WithError(err).Error() + return nil, err + } + + return resp, nil +} + // ResumeVM resumes a VM func (s *local) ResumeVM(ctx context.Context, req *proto.ResumeVMRequest) (*types.Empty, error) { client, err := s.shimFirecrackerClient(ctx, req.VMID) diff --git a/firecracker-control/service.go b/firecracker-control/service.go index 4ecdb5958..b79d6933b 100644 --- a/firecracker-control/service.go +++ b/firecracker-control/service.go @@ -82,6 +82,11 @@ func (s *service) ResumeVM(ctx context.Context, req *proto.ResumeVMRequest) (*ty return s.local.ResumeVM(ctx, req) } +func (s *service) CreateSnapshot(ctx context.Context, req *proto.CreateSnapshotRequest) (*types.Empty, error) { + log.G(ctx).Debugf("create snapshot request: %+v", req) + return s.local.CreateSnapshot(ctx, req) +} + func (s *service) StopVM(ctx context.Context, req *proto.StopVMRequest) (*types.Empty, error) { log.G(ctx).Debugf("stop VM: %+v", req) return s.local.StopVM(ctx, req) diff --git a/go.mod b/go.mod index 3635dec7f..fccda8c27 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/firecracker-microvm/firecracker-containerd go 1.17 +replace github.com/firecracker-microvm/firecracker-go-sdk => github.com/curiousgeorgiy/firecracker-go-sdk v1.0.1-0.20230824075215-a7c7685f81c9 + require ( github.com/awslabs/tc-redirect-tap v0.0.0-20211025175357-e30dfca224c2 github.com/containerd/containerd v1.6.20 @@ -10,7 +12,7 @@ require ( github.com/containerd/go-runc v1.0.0 github.com/containerd/ttrpc v1.1.2 github.com/containerd/typeurl v1.0.2 - github.com/containernetworking/cni v1.1.1 + github.com/containernetworking/cni v1.1.2 github.com/containernetworking/plugins v1.1.1 github.com/firecracker-microvm/firecracker-go-sdk v0.22.1-0.20220427214706-47505a9cf951 github.com/gofrs/uuid v3.3.0+incompatible @@ -24,12 +26,12 @@ require ( github.com/opencontainers/runtime-spec v1.0.3-0.20210910115017-0d6cc581aeea github.com/pelletier/go-toml v1.9.5 github.com/shirou/gopsutil v2.18.12+incompatible - github.com/sirupsen/logrus v1.8.1 + github.com/sirupsen/logrus v1.9.0 github.com/stretchr/testify v1.8.1 github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 go.uber.org/goleak v1.1.12 golang.org/x/sync v0.1.0 - golang.org/x/sys v0.6.0 + golang.org/x/sys v0.10.0 google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad // indirect google.golang.org/grpc v1.47.0 ) @@ -64,16 +66,15 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.4 // indirect github.com/go-openapi/analysis v0.21.2 // indirect - github.com/go-openapi/errors v0.20.2 // indirect + github.com/go-openapi/errors v0.20.3 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.19.6 // indirect github.com/go-openapi/loads v0.21.1 // indirect - github.com/go-openapi/runtime v0.23.3 // indirect + github.com/go-openapi/runtime v0.24.0 // indirect github.com/go-openapi/spec v0.20.4 // indirect - github.com/go-openapi/strfmt v0.21.2 // indirect + github.com/go-openapi/strfmt v0.21.3 // indirect github.com/go-openapi/swag v0.21.1 // indirect - github.com/go-openapi/validate v0.21.0 // indirect - github.com/go-stack/stack v1.8.1 // indirect + github.com/go-openapi/validate v0.22.0 // indirect github.com/godbus/dbus/v5 v5.0.6 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -119,17 +120,17 @@ require ( github.com/urfave/cli v1.22.2 // indirect github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect go.etcd.io/bbolt v1.3.6 // indirect - go.mongodb.org/mongo-driver v1.8.3 // indirect + go.mongodb.org/mongo-driver v1.10.0 // indirect go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 // indirect go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0 // indirect go.opentelemetry.io/otel v1.3.0 // indirect go.opentelemetry.io/otel/trace v1.3.0 // indirect - golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect - golang.org/x/net v0.8.0 // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/net v0.12.0 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect - golang.org/x/term v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.0 // indirect diff --git a/go.sum b/go.sum index c24364ed4..03d4870d1 100644 --- a/go.sum +++ b/go.sum @@ -272,8 +272,9 @@ github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v1.0.1/go.mod h1:AKuhXbN5EzmD4yTNtfSsX3tPcmtrBI6QcRV0NiNt15Y= -github.com/containernetworking/cni v1.1.1 h1:ky20T7c0MvKvbMOwS/FrlbNwjEoqJEUUYfsL4b0mc4k= github.com/containernetworking/cni v1.1.1/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= +github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ= +github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= github.com/containernetworking/plugins v1.0.1/go.mod h1:QHCfGpaTwYTbbH+nZXKVTxNBDZcxSOplJT5ico8/FLE= @@ -310,6 +311,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/curiousgeorgiy/firecracker-go-sdk v1.0.1-0.20230824075215-a7c7685f81c9 h1:nTYswz5tOSH49Cnc7JLSFFush3uMQko2Fy2aJRitXXA= +github.com/curiousgeorgiy/firecracker-go-sdk v1.0.1-0.20230824075215-a7c7685f81c9/go.mod h1:pcsIXRGgbFGr9QtUdlQCP/z6tuB7EMw6zXgFkcu7Q0c= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= @@ -359,8 +362,6 @@ github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/firecracker-microvm/firecracker-go-sdk v0.22.1-0.20220427214706-47505a9cf951 h1:j1zRfar/9U22TeptQIwXB07hyuctgb6++HIxP0nXBhI= -github.com/firecracker-microvm/firecracker-go-sdk v0.22.1-0.20220427214706-47505a9cf951/go.mod h1:60W3x6ftClUbRKpqXl7XvrhM/Uv3tochNRq+RlZsd1M= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= @@ -399,8 +400,9 @@ github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8= github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= +github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -414,16 +416,17 @@ github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJ github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/loads v0.21.1 h1:Wb3nVZpdEzDTcly8S4HMkey6fjARRzb7iEaySimlDW0= github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= -github.com/go-openapi/runtime v0.23.3 h1:/dxjx4KCOQI5ImBMz036F6v/DzZ2NUjSRvbLJs1rgoE= -github.com/go-openapi/runtime v0.23.3/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk= +github.com/go-openapi/runtime v0.24.0 h1:vTgDijpGLCgJOJTdAp5kG+O+nRsVCbH417YQ3O0iZo0= +github.com/go-openapi/runtime v0.24.0/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/strfmt v0.21.2 h1:5NDNgadiX1Vhemth/TH4gCGopWSTdDjxl60H3B7f+os= github.com/go-openapi/strfmt v0.21.2/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= +github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o= +github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= @@ -431,12 +434,12 @@ github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/ github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/validate v0.21.0 h1:+Wqk39yKOhfpLqNLEC0/eViCkzM5FVXVqrvt526+wcI= github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= +github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y= +github.com/go-openapi/validate v0.22.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-ping/ping v0.0.0-20211130115550-779d1e919534 h1:dhy9OQKGBh4zVXbjwbxxHjRxMJtLXj3zfgpBYQaR4Q4= github.com/go-ping/ping v0.0.0-20211130115550-779d1e919534/go.mod h1:xIFjORFzTxqIV/tDVGO4eDy/bLuSyawEeojSm3GfRGk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= @@ -915,8 +918,9 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -992,7 +996,9 @@ github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= @@ -1024,8 +1030,9 @@ go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD0 go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= -go.mongodb.org/mongo-driver v1.8.3 h1:TDKlTkGDKm9kkJVUOAXDK5/fkqKHJVwYQSpoRfB43R4= go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= +go.mongodb.org/mongo-driver v1.10.0 h1:UtV6N5k14upNp4LTduX0QCufG124fSu25Wz9tu94GLg= +go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwfMkW0JX+cIcQi/SwLAmZP5M= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1092,8 +1099,10 @@ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1189,8 +1198,10 @@ golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1325,18 +1336,23 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220405210540-1e041c57c461/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1347,8 +1363,10 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/proto/firecracker.pb.go b/proto/firecracker.pb.go index e178ec996..801eb7d6b 100644 --- a/proto/firecracker.pb.go +++ b/proto/firecracker.pb.go @@ -75,10 +75,18 @@ type CreateVMRequest struct { MetricsFifoPath string `protobuf:"bytes,13,opt,name=MetricsFifoPath,proto3" json:"MetricsFifoPath,omitempty"` BalloonDevice *FirecrackerBalloonDevice `protobuf:"bytes,14,opt,name=BalloonDevice,proto3" json:"BalloonDevice,omitempty"` // The network namespace of the VM. - NetNS string `protobuf:"bytes,15,opt,name=NetNS,proto3" json:"NetNS,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NetNS string `protobuf:"bytes,15,opt,name=NetNS,proto3" json:"NetNS,omitempty"` + // Whether the VM should be created by loading a snapshot. + LoadSnapshot bool `protobuf:"varint,16,opt,name=LoadSnapshot,proto3" json:"LoadSnapshot,omitempty"` + // Path to the file that contains the guest memory to be loaded. + MemFilePath string `protobuf:"bytes,17,opt,name=MemFilePath,proto3" json:"MemFilePath,omitempty"` + // Path to the file that contains the VM state to be loaded. + SnapshotPath string `protobuf:"bytes,18,opt,name=SnapshotPath,proto3" json:"SnapshotPath,omitempty"` + // Path to the disk device backing the container snapshot. + ContainerSnapshotPath string `protobuf:"bytes,19,opt,name=ContainerSnapshotPath,proto3" json:"ContainerSnapshotPath,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreateVMRequest) Reset() { *m = CreateVMRequest{} } @@ -210,6 +218,34 @@ func (m *CreateVMRequest) GetNetNS() string { return "" } +func (m *CreateVMRequest) GetLoadSnapshot() bool { + if m != nil { + return m.LoadSnapshot + } + return false +} + +func (m *CreateVMRequest) GetMemFilePath() string { + if m != nil { + return m.MemFilePath + } + return "" +} + +func (m *CreateVMRequest) GetSnapshotPath() string { + if m != nil { + return m.SnapshotPath + } + return "" +} + +func (m *CreateVMRequest) GetContainerSnapshotPath() string { + if m != nil { + return m.ContainerSnapshotPath + } + return "" +} + type CreateVMResponse struct { VMID string `protobuf:"bytes,1,opt,name=VMID,proto3" json:"VMID,omitempty"` SocketPath string `protobuf:"bytes,2,opt,name=SocketPath,proto3" json:"SocketPath,omitempty"` @@ -356,6 +392,60 @@ func (m *ResumeVMRequest) GetVMID() string { return "" } +type CreateSnapshotRequest struct { + VMID string `protobuf:"bytes,1,opt,name=VMID,proto3" json:"VMID,omitempty"` + MemFilePath string `protobuf:"bytes,2,opt,name=MemFilePath,proto3" json:"MemFilePath,omitempty"` + SnapshotPath string `protobuf:"bytes,3,opt,name=SnapshotPath,proto3" json:"SnapshotPath,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateSnapshotRequest) Reset() { *m = CreateSnapshotRequest{} } +func (m *CreateSnapshotRequest) String() string { return proto.CompactTextString(m) } +func (*CreateSnapshotRequest) ProtoMessage() {} +func (*CreateSnapshotRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a73317e9fb8da571, []int{4} +} +func (m *CreateSnapshotRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateSnapshotRequest.Unmarshal(m, b) +} +func (m *CreateSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateSnapshotRequest.Marshal(b, m, deterministic) +} +func (m *CreateSnapshotRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateSnapshotRequest.Merge(m, src) +} +func (m *CreateSnapshotRequest) XXX_Size() int { + return xxx_messageInfo_CreateSnapshotRequest.Size(m) +} +func (m *CreateSnapshotRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateSnapshotRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateSnapshotRequest proto.InternalMessageInfo + +func (m *CreateSnapshotRequest) GetVMID() string { + if m != nil { + return m.VMID + } + return "" +} + +func (m *CreateSnapshotRequest) GetMemFilePath() string { + if m != nil { + return m.MemFilePath + } + return "" +} + +func (m *CreateSnapshotRequest) GetSnapshotPath() string { + if m != nil { + return m.SnapshotPath + } + return "" +} + type StopVMRequest struct { VMID string `protobuf:"bytes,1,opt,name=VMID,proto3" json:"VMID,omitempty"` TimeoutSeconds uint32 `protobuf:"varint,2,opt,name=TimeoutSeconds,proto3" json:"TimeoutSeconds,omitempty"` @@ -368,7 +458,7 @@ func (m *StopVMRequest) Reset() { *m = StopVMRequest{} } func (m *StopVMRequest) String() string { return proto.CompactTextString(m) } func (*StopVMRequest) ProtoMessage() {} func (*StopVMRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{4} + return fileDescriptor_a73317e9fb8da571, []int{5} } func (m *StopVMRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StopVMRequest.Unmarshal(m, b) @@ -413,7 +503,7 @@ func (m *GetVMInfoRequest) Reset() { *m = GetVMInfoRequest{} } func (m *GetVMInfoRequest) String() string { return proto.CompactTextString(m) } func (*GetVMInfoRequest) ProtoMessage() {} func (*GetVMInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{5} + return fileDescriptor_a73317e9fb8da571, []int{6} } func (m *GetVMInfoRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetVMInfoRequest.Unmarshal(m, b) @@ -456,7 +546,7 @@ func (m *GetVMInfoResponse) Reset() { *m = GetVMInfoResponse{} } func (m *GetVMInfoResponse) String() string { return proto.CompactTextString(m) } func (*GetVMInfoResponse) ProtoMessage() {} func (*GetVMInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{6} + return fileDescriptor_a73317e9fb8da571, []int{7} } func (m *GetVMInfoResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetVMInfoResponse.Unmarshal(m, b) @@ -530,7 +620,7 @@ func (m *SetVMMetadataRequest) Reset() { *m = SetVMMetadataRequest{} } func (m *SetVMMetadataRequest) String() string { return proto.CompactTextString(m) } func (*SetVMMetadataRequest) ProtoMessage() {} func (*SetVMMetadataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{7} + return fileDescriptor_a73317e9fb8da571, []int{8} } func (m *SetVMMetadataRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetVMMetadataRequest.Unmarshal(m, b) @@ -576,7 +666,7 @@ func (m *UpdateVMMetadataRequest) Reset() { *m = UpdateVMMetadataRequest func (m *UpdateVMMetadataRequest) String() string { return proto.CompactTextString(m) } func (*UpdateVMMetadataRequest) ProtoMessage() {} func (*UpdateVMMetadataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{8} + return fileDescriptor_a73317e9fb8da571, []int{9} } func (m *UpdateVMMetadataRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateVMMetadataRequest.Unmarshal(m, b) @@ -621,7 +711,7 @@ func (m *GetVMMetadataRequest) Reset() { *m = GetVMMetadataRequest{} } func (m *GetVMMetadataRequest) String() string { return proto.CompactTextString(m) } func (*GetVMMetadataRequest) ProtoMessage() {} func (*GetVMMetadataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{9} + return fileDescriptor_a73317e9fb8da571, []int{10} } func (m *GetVMMetadataRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetVMMetadataRequest.Unmarshal(m, b) @@ -659,7 +749,7 @@ func (m *GetVMMetadataResponse) Reset() { *m = GetVMMetadataResponse{} } func (m *GetVMMetadataResponse) String() string { return proto.CompactTextString(m) } func (*GetVMMetadataResponse) ProtoMessage() {} func (*GetVMMetadataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{10} + return fileDescriptor_a73317e9fb8da571, []int{11} } func (m *GetVMMetadataResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetVMMetadataResponse.Unmarshal(m, b) @@ -726,7 +816,7 @@ func (m *JailerConfig) Reset() { *m = JailerConfig{} } func (m *JailerConfig) String() string { return proto.CompactTextString(m) } func (*JailerConfig) ProtoMessage() {} func (*JailerConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{11} + return fileDescriptor_a73317e9fb8da571, []int{12} } func (m *JailerConfig) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JailerConfig.Unmarshal(m, b) @@ -807,7 +897,7 @@ func (m *UpdateBalloonRequest) Reset() { *m = UpdateBalloonRequest{} } func (m *UpdateBalloonRequest) String() string { return proto.CompactTextString(m) } func (*UpdateBalloonRequest) ProtoMessage() {} func (*UpdateBalloonRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{12} + return fileDescriptor_a73317e9fb8da571, []int{13} } func (m *UpdateBalloonRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateBalloonRequest.Unmarshal(m, b) @@ -852,7 +942,7 @@ func (m *GetBalloonConfigRequest) Reset() { *m = GetBalloonConfigRequest func (m *GetBalloonConfigRequest) String() string { return proto.CompactTextString(m) } func (*GetBalloonConfigRequest) ProtoMessage() {} func (*GetBalloonConfigRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{13} + return fileDescriptor_a73317e9fb8da571, []int{14} } func (m *GetBalloonConfigRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBalloonConfigRequest.Unmarshal(m, b) @@ -890,7 +980,7 @@ func (m *GetBalloonConfigResponse) Reset() { *m = GetBalloonConfigRespon func (m *GetBalloonConfigResponse) String() string { return proto.CompactTextString(m) } func (*GetBalloonConfigResponse) ProtoMessage() {} func (*GetBalloonConfigResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{14} + return fileDescriptor_a73317e9fb8da571, []int{15} } func (m *GetBalloonConfigResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBalloonConfigResponse.Unmarshal(m, b) @@ -928,7 +1018,7 @@ func (m *GetBalloonStatsRequest) Reset() { *m = GetBalloonStatsRequest{} func (m *GetBalloonStatsRequest) String() string { return proto.CompactTextString(m) } func (*GetBalloonStatsRequest) ProtoMessage() {} func (*GetBalloonStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{15} + return fileDescriptor_a73317e9fb8da571, []int{16} } func (m *GetBalloonStatsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBalloonStatsRequest.Unmarshal(m, b) @@ -994,7 +1084,7 @@ func (m *GetBalloonStatsResponse) Reset() { *m = GetBalloonStatsResponse func (m *GetBalloonStatsResponse) String() string { return proto.CompactTextString(m) } func (*GetBalloonStatsResponse) ProtoMessage() {} func (*GetBalloonStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{16} + return fileDescriptor_a73317e9fb8da571, []int{17} } func (m *GetBalloonStatsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBalloonStatsResponse.Unmarshal(m, b) @@ -1124,7 +1214,7 @@ func (m *UpdateBalloonStatsRequest) Reset() { *m = UpdateBalloonStatsReq func (m *UpdateBalloonStatsRequest) String() string { return proto.CompactTextString(m) } func (*UpdateBalloonStatsRequest) ProtoMessage() {} func (*UpdateBalloonStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a73317e9fb8da571, []int{17} + return fileDescriptor_a73317e9fb8da571, []int{18} } func (m *UpdateBalloonStatsRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateBalloonStatsRequest.Unmarshal(m, b) @@ -1164,6 +1254,7 @@ func init() { proto.RegisterType((*CreateVMResponse)(nil), "CreateVMResponse") proto.RegisterType((*PauseVMRequest)(nil), "PauseVMRequest") proto.RegisterType((*ResumeVMRequest)(nil), "ResumeVMRequest") + proto.RegisterType((*CreateSnapshotRequest)(nil), "CreateSnapshotRequest") proto.RegisterType((*StopVMRequest)(nil), "StopVMRequest") proto.RegisterType((*GetVMInfoRequest)(nil), "GetVMInfoRequest") proto.RegisterType((*GetVMInfoResponse)(nil), "GetVMInfoResponse") @@ -1183,68 +1274,72 @@ func init() { func init() { proto.RegisterFile("firecracker.proto", fileDescriptor_a73317e9fb8da571) } var fileDescriptor_a73317e9fb8da571 = []byte{ - // 994 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xdd, 0x6e, 0xdb, 0x36, - 0x14, 0x9e, 0xaa, 0x38, 0x89, 0x8f, 0xe3, 0xfc, 0x10, 0x49, 0xaa, 0x16, 0x41, 0x60, 0x08, 0x5b, - 0x67, 0x14, 0x5b, 0x80, 0x25, 0xbb, 0x18, 0x76, 0xb3, 0x3a, 0x76, 0x9d, 0xba, 0x9d, 0x52, 0x83, - 0x4e, 0x02, 0x6c, 0xbb, 0x62, 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x36, - 0x3f, 0x33, 0xa3, 0xe3, 0xde, 0x69, 0x67, 0xd3, 0x39, 0x5e, 0xf9, 0xb9, 0x62, 0xff, 0x3c, 0x2f, - 0x97, 0xed, 0xe7, 0xe8, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2f, 0xc1, 0x9e, 0xd0, 0xa2, 0x0a, - 0x00, 0x00, + // 1067 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x51, 0x6f, 0xdb, 0x36, + 0x10, 0x9e, 0xa2, 0xd8, 0x89, 0xcf, 0x71, 0xe2, 0x70, 0x49, 0xaa, 0x16, 0x41, 0x60, 0x08, 0x5b, + 0x67, 0x14, 0x5b, 0x80, 0x25, 0x7b, 0x18, 0xf6, 0xb2, 0x3a, 0x76, 0x9d, 0xba, 0xad, 0x53, 0x83, + 0x4e, 0x02, 0x6c, 0x7b, 0x62, 0x94, 0xb3, 0xa3, 0x85, 0x16, 0x5d, 0x91, 0x4a, 0x9b, 0xbf, 0xb5, + 0x7f, 0xb2, 0xfd, 0x90, 0xbd, 0xed, 0x7d, 0x20, 0x25, 0x5b, 0xb2, 0xec, 0x39, 0x01, 0xf6, 0xd4, + 0x27, 0x91, 0xdf, 0x7d, 0x3a, 0xde, 0xdd, 0xc7, 0x23, 0x09, 0xdb, 0x03, 0x3f, 0x44, 0x2f, 0x64, + 0xde, 0x2d, 0x86, 0x87, 0xe3, 0x50, 0x28, 0xf1, 0xac, 0xac, 0xee, 0xc7, 0x28, 0xe3, 0x89, 0xfb, + 0x77, 0x11, 0xb6, 0x9a, 0x21, 0x32, 0x85, 0x97, 0x5d, 0x8a, 0x1f, 0x22, 0x94, 0x8a, 0x10, 0x58, + 0xbd, 0xec, 0x76, 0x5a, 0x8e, 0x55, 0xb3, 0xea, 0x25, 0x6a, 0xc6, 0xe4, 0x25, 0x40, 0x97, 0x79, + 0x37, 0x7e, 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, 0x29, 0x42, 0x0e, 0x81, 0xbc, + 0x8e, 0x86, 0xa8, 0xf8, 0x55, 0x83, 0x73, 0xe1, 0x99, 0x87, 0x97, 0x34, 0x7b, 0xc6, 0xa6, 0x0b, + 0x2c, 0x3a, 0xb2, 0x04, 0x6d, 0x33, 0x9f, 0x47, 0xa1, 0x79, 0xcc, 0x98, 0xc8, 0x72, 0xb0, 0x39, + 0x7b, 0xd9, 0xef, 0x22, 0x6c, 0xb3, 0x88, 0x2b, 0x69, 0x5e, 0x2a, 0x36, 0xcd, 0x42, 0x86, 0xe1, + 0x07, 0x53, 0x46, 0x29, 0x61, 0xa4, 0x10, 0xd9, 0x83, 0x62, 0xff, 0x23, 0x1b, 0x77, 0x02, 0xf3, + 0x0c, 0xb1, 0x69, 0x32, 0x23, 0x0e, 0xac, 0xe9, 0xd1, 0xfb, 0x48, 0x99, 0xa7, 0x86, 0x4d, 0x27, + 0x53, 0x5d, 0xf9, 0x73, 0x16, 0x0e, 0xd1, 0xec, 0xb6, 0x8d, 0xb8, 0xf2, 0x53, 0x40, 0xaf, 0x18, + 0x4f, 0xe2, 0xca, 0x57, 0xe2, 0x15, 0x33, 0x90, 0x61, 0x08, 0xc5, 0x78, 0x52, 0xb0, 0xcd, 0x84, + 0x91, 0x42, 0x2e, 0xc2, 0xd3, 0x99, 0xbd, 0xff, 0xd0, 0x46, 0xd1, 0x37, 0xbd, 0xe1, 0xf4, 0x04, + 0xe7, 0x7e, 0x30, 0x34, 0xef, 0xb9, 0x3b, 0xc6, 0x27, 0xc2, 0x2f, 0x36, 0xbe, 0xf8, 0x66, 0x41, + 0x93, 0x92, 0x75, 0x58, 0x6d, 0xbe, 0xef, 0xfd, 0x52, 0xfd, 0x42, 0x8f, 0x4e, 0x3a, 0x67, 0xad, + 0xaa, 0x75, 0xb2, 0xf6, 0x6b, 0xc1, 0x3c, 0xc6, 0xaf, 0x8a, 0xe6, 0x73, 0xfc, 0x6f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xf2, 0x50, 0x56, 0x97, 0xb5, 0x0b, 0x00, 0x00, } diff --git a/proto/firecracker.proto b/proto/firecracker.proto index dd8d8ac16..3c0aba106 100644 --- a/proto/firecracker.proto +++ b/proto/firecracker.proto @@ -44,6 +44,15 @@ message CreateVMRequest { // The network namespace of the VM. string NetNS = 15; + + // Whether the VM should be created by loading a snapshot. + bool LoadSnapshot = 16; + // Path to the file that contains the guest memory to be loaded. + string MemFilePath = 17; + // Path to the file that contains the VM state to be loaded. + string SnapshotPath = 18; + // Path to the disk device backing the container snapshot. + string ContainerSnapshotPath = 19; } message CreateVMResponse { @@ -62,6 +71,12 @@ message ResumeVMRequest { string VMID = 1; } +message CreateSnapshotRequest { + string VMID = 1; + string MemFilePath = 2; + string SnapshotPath = 3; +} + message StopVMRequest { string VMID = 1; uint32 TimeoutSeconds = 2; diff --git a/proto/service/fccontrol/fccontrol.proto b/proto/service/fccontrol/fccontrol.proto index 8306e7ca3..0a5af1ea1 100644 --- a/proto/service/fccontrol/fccontrol.proto +++ b/proto/service/fccontrol/fccontrol.proto @@ -16,6 +16,9 @@ service Firecracker { // Resumes a VM rpc ResumeVM(ResumeVMRequest) returns (google.protobuf.Empty); + // Creates a snapshot of a VM + rpc CreateSnapshot(CreateSnapshotRequest) returns (google.protobuf.Empty); + // Stops existing Firecracker instance by VM ID rpc StopVM(StopVMRequest) returns (google.protobuf.Empty); diff --git a/proto/service/fccontrol/ttrpc/fccontrol.pb.go b/proto/service/fccontrol/ttrpc/fccontrol.pb.go index 121e4fccf..e91bce762 100644 --- a/proto/service/fccontrol/ttrpc/fccontrol.pb.go +++ b/proto/service/fccontrol/ttrpc/fccontrol.pb.go @@ -27,36 +27,38 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("fccontrol.proto", fileDescriptor_b99f53e2bf82c5ef) } var fileDescriptor_b99f53e2bf82c5ef = []byte{ - // 357 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0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, 0xe6, 0xa7, 0x90, 0x0a, 0xdd, 0x44, - 0x87, 0x95, 0x2d, 0xa4, 0x91, 0xfd, 0xe4, 0xbb, 0x92, 0xd7, 0x61, 0xa3, 0xd5, 0x1c, 0xdf, 0x45, - 0xd9, 0x7b, 0xba, 0xac, 0x32, 0x5c, 0x41, 0x1b, 0x49, 0x4c, 0x04, 0x09, 0xde, 0x80, 0xbd, 0x5a, - 0xb7, 0xf3, 0x8e, 0xd5, 0x5e, 0x82, 0xc9, 0xfa, 0x46, 0x1b, 0x8b, 0x26, 0xe4, 0x91, 0xce, 0xa5, - 0xcb, 0x2a, 0x56, 0x2e, 0x85, 0x75, 0x3c, 0x45, 0x0e, 0x67, 0xaf, 0xb0, 0x58, 0xcd, 0x42, 0xea, - 0x09, 0xcf, 0x93, 0xd2, 0xef, 0x4b, 0xdf, 0x9d, 0x4d, 0x79, 0x13, 0xf2, 0x48, 0xb9, 0x5c, 0x1c, - 0xe9, 0x6c, 0xcf, 0x91, 0x66, 0xcf, 0xda, 0xbc, 0x01, 0x7b, 0xb5, 0xfe, 0x1c, 0xd5, 0xad, 0xf7, - 0x90, 0x04, 0x45, 0xfc, 0x1c, 0x72, 0x44, 0x79, 0x34, 0x0f, 0x1b, 0x59, 0x8a, 0x47, 0xc6, 0xf7, - 0xb6, 0xa6, 0x46, 0x2d, 0x38, 0x84, 0x9a, 0x3c, 0xbd, 0xab, 0xc5, 0xd2, 0x2c, 0x7c, 0x2f, 0xcd, - 0xc2, 0x67, 0x62, 0x1a, 0x8b, 0xc4, 0x34, 0xbe, 0x12, 0xd3, 0xf8, 0x49, 0x4c, 0xe3, 0xb5, 0xbc, - 0xf9, 0x95, 0xc6, 0xc5, 0xf5, 0xd0, 0xcd, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x66, 0x43, 0x0c, - 0x39, 0x5e, 0x03, 0x00, 0x00, + // 371 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 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 0x00, 0x00, } type FirecrackerService interface { CreateVM(ctx context.Context, req *proto1.CreateVMRequest) (*proto1.CreateVMResponse, error) PauseVM(ctx context.Context, req *proto1.PauseVMRequest) (*types.Empty, error) ResumeVM(ctx context.Context, req *proto1.ResumeVMRequest) (*types.Empty, error) + CreateSnapshot(ctx context.Context, req *proto1.CreateSnapshotRequest) (*types.Empty, error) StopVM(ctx context.Context, req *proto1.StopVMRequest) (*types.Empty, error) GetVMInfo(ctx context.Context, req *proto1.GetVMInfoRequest) (*proto1.GetVMInfoResponse, error) SetVMMetadata(ctx context.Context, req *proto1.SetVMMetadataRequest) (*types.Empty, error) @@ -91,6 +93,13 @@ func RegisterFirecrackerService(srv *github_com_containerd_ttrpc.Server, svc Fir } return svc.ResumeVM(ctx, &req) }, + "CreateSnapshot": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { + var req proto1.CreateSnapshotRequest + if err := unmarshal(&req); err != nil { + return nil, err + } + return svc.CreateSnapshot(ctx, &req) + }, "StopVM": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) { var req proto1.StopVMRequest if err := unmarshal(&req); err != nil { @@ -191,6 +200,14 @@ func (c *firecrackerClient) ResumeVM(ctx context.Context, req *proto1.ResumeVMRe return &resp, nil } +func (c *firecrackerClient) CreateSnapshot(ctx context.Context, req *proto1.CreateSnapshotRequest) (*types.Empty, error) { + var resp types.Empty + if err := c.client.Call(ctx, "Firecracker", "CreateSnapshot", req, &resp); err != nil { + return nil, err + } + return &resp, nil +} + func (c *firecrackerClient) StopVM(ctx context.Context, req *proto1.StopVMRequest) (*types.Empty, error) { var resp types.Empty if err := c.client.Call(ctx, "Firecracker", "StopVM", req, &resp); err != nil { diff --git a/runtime/service.go b/runtime/service.go index 7dd48f762..ba7cad8fe 100644 --- a/runtime/service.go +++ b/runtime/service.go @@ -589,6 +589,14 @@ func (s *service) createVM(requestCtx context.Context, request *proto.CreateVMRe opts = append(opts, jailedOpts...) + if request.LoadSnapshot { + if request.SnapshotPath == "" || request.MemFilePath == "" || request.ContainerSnapshotPath == "" { + return errors.New("failed to load snapshot: one of the snapshot loading parameters was not provided") + } + opts = append(opts, firecracker.WithSnapshot(request.MemFilePath, request.SnapshotPath, request.ContainerSnapshotPath, + func(c *firecracker.SnapshotConfig) { c.ResumeVM = true })) + } + // In the event that a noop jailer is used, we will pass in the shim context // and have the SDK construct a new machine using that context. Otherwise, a // custom process runner will be provided via options which will stomp over @@ -615,9 +623,11 @@ func (s *service) createVM(requestCtx context.Context, request *proto.CreateVMRe s.ioProxyClient = ioproxy.NewIOProxyClient(rpcClient) s.exitAfterAllTasksDeleted = request.ExitAfterAllTasksDeleted - err = s.mountDrives(requestCtx) - if err != nil { - return err + if !request.LoadSnapshot { + err = s.mountDrives(requestCtx) + if err != nil { + return err + } } s.logger.Info("successfully started the VM") @@ -692,6 +702,24 @@ func (s *service) PauseVM(ctx context.Context, req *proto.PauseVMRequest) (*type return &types.Empty{}, nil } +// CreateSnapshot creates a snapshot of a VM +func (s *service) CreateSnapshot(ctx context.Context, req *proto.CreateSnapshotRequest) (*types.Empty, error) { + defer logPanicAndDie(s.logger) + + err := s.waitVMReady() + if err != nil { + s.logger.WithError(err).Error() + return nil, err + } + + if err := s.machine.CreateSnapshot(ctx, req.MemFilePath, req.SnapshotPath); err != nil { + s.logger.WithError(err).Error() + return nil, err + } + + return &types.Empty{}, nil +} + // GetVMInfo returns metadata for the VM being managed by this shim. If the VM has not been created yet, this // method will wait for up to a hardcoded timeout for it to exist, returning an error if the timeout is reached. func (s *service) GetVMInfo(requestCtx context.Context, request *proto.GetVMInfoRequest) (*proto.GetVMInfoResponse, error) { @@ -1016,16 +1044,20 @@ func (s *service) buildVMConfiguration(req *proto.CreateVMRequest) (*firecracker containerCount = 1 } - s.containerStubHandler, err = CreateContainerStubs( - &cfg, s.jailer, containerCount, s.logger) - if err != nil { - return nil, fmt.Errorf("failed to create container stub drives: %w", err) + if !req.LoadSnapshot { + s.containerStubHandler, err = CreateContainerStubs( + &cfg, s.jailer, containerCount, s.logger) + if err != nil { + return nil, fmt.Errorf("failed to create container stub drives: %w", err) + } } - s.driveMountStubs, err = CreateDriveMountStubs( - &cfg, s.jailer, req.DriveMounts, s.logger) - if err != nil { - return nil, fmt.Errorf("failed to create drive mount stub drives: %w", err) + if !req.LoadSnapshot { + s.driveMountStubs, err = CreateDriveMountStubs( + &cfg, s.jailer, req.DriveMounts, s.logger) + if err != nil { + return nil, fmt.Errorf("failed to create drive mount stub drives: %w", err) + } } // If no value for NetworkInterfaces was specified (not even an empty but non-nil list) and