@@ -205,7 +205,7 @@ func (c *coordinator) orchStartVM(ctx context.Context, image, revision string, m
205205
206206 if ! c .withoutOrchestrator {
207207 trackDirtyPages := c .isSparseSnaps
208- resp , _ , err = c .orch .StartVM (ctxTimeout , vmID , image , memSizeMib , vCPUCount , trackDirtyPages , c . isFullLocal )
208+ resp , _ , err = c .orch .StartVM (ctxTimeout , vmID , image , memSizeMib , vCPUCount , trackDirtyPages )
209209 if err != nil {
210210 logger .WithError (err ).Error ("coordinator failed to start VM" )
211211 }
@@ -243,7 +243,7 @@ func (c *coordinator) orchStartVMSnapshot(
243243 ctxTimeout , cancel := context .WithTimeout (ctx , time .Second * 30 )
244244 defer cancel ()
245245
246- resp , _ , err = c .orch .LoadSnapshot (ctxTimeout , vmID , snap , c . isFullLocal )
246+ resp , _ , err = c .orch .LoadSnapshot (ctxTimeout , vmID , snap )
247247 if err != nil {
248248 logger .WithError (err ).Error ("failed to load VM" )
249249 return nil , err
@@ -307,13 +307,17 @@ func (c *coordinator) orchCreateSnapshot(ctx context.Context, funcInst *FuncInst
307307 return nil
308308 }
309309
310- err = c .orch .CreateSnapshot (ctxTimeout , funcInst .vmID , snap , c . isFullLocal )
310+ err = c .orch .CreateSnapshot (ctxTimeout , funcInst .vmID , snap )
311311 if err != nil {
312312 funcInst .logger .WithError (err ).Error ("failed to create snapshot" )
313313 return nil
314314 }
315315
316- _ , err = c .orch .ResumeVM (ctx , funcInst .vmID )
316+ // TODO: StopVM does not work for fullLocal snapshots without resuming. Might be the same for offloaded since
317+ // those are never stopped
318+ if c .isFullLocal {
319+ _ , err = c .orch .ResumeVM (ctx , funcInst .vmID )
320+ }
317321
318322 if err := c .snapshotManager .CommitSnapshot (id ); err != nil {
319323 funcInst .logger .WithError (err ).Error ("failed to commit snapshot" )
@@ -328,7 +332,7 @@ func (c *coordinator) orchOffloadVM(ctx context.Context, funcInst *FuncInstance)
328332 return nil
329333 }
330334
331- if err := c .orch .OffloadVM (ctx , funcInst .vmID , c . isFullLocal ); err != nil {
335+ if err := c .orch .OffloadVM (ctx , funcInst .vmID ); err != nil {
332336 funcInst .logger .WithError (err ).Error ("failed to offload VM" )
333337 return err
334338 }
@@ -341,7 +345,7 @@ func (c *coordinator) orchStopVM(ctx context.Context, funcInst *FuncInstance) er
341345 return nil
342346 }
343347
344- if err := c .orch .StopSingleVM (ctx , funcInst .vmID , c . isFullLocal ); err != nil {
348+ if err := c .orch .StopSingleVM (ctx , funcInst .vmID ); err != nil {
345349 funcInst .logger .WithError (err ).Error ("failed to stop VM for instance" )
346350 return err
347351 }
0 commit comments