mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-19 19:04:43 +00:00
feat: power-cycle
This commit is contained in:
parent
0e5e989192
commit
d0f0530ca2
7 changed files with 242 additions and 18 deletions
|
|
@ -265,6 +265,14 @@ func (d *Daemon) RestoreSnapshot(ctx context.Context, snapshotID contracthost.Sn
|
|||
clearOperation = true
|
||||
return nil, fmt.Errorf("copy system disk for restore: %w", err)
|
||||
}
|
||||
if err := injectMachineIdentity(ctx, newSystemDiskPath, req.MachineID); err != nil {
|
||||
clearOperation = true
|
||||
return nil, fmt.Errorf("inject machine identity for restore: %w", err)
|
||||
}
|
||||
if err := injectGuestConfig(ctx, newSystemDiskPath, guestConfig); err != nil {
|
||||
clearOperation = true
|
||||
return nil, fmt.Errorf("inject guest config for restore: %w", err)
|
||||
}
|
||||
|
||||
type restoredUserVolume struct {
|
||||
ID contracthost.VolumeID
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue