snapshot

package
v0.6.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 9 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package snapshot provides VM state snapshot helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles VM state snapshot operations.

func NewManager

func NewManager(vmDir string) *Manager

NewManager creates a snapshot manager for vmDir.

func (*Manager) Delete

func (m *Manager) Delete(name string) error

Delete removes a named snapshot.

func (*Manager) List

func (m *Manager) List() ([]Meta, error)

List returns all available snapshots sorted by creation time.

func (*Manager) Restore

func (m *Manager) Restore(machine vz.VZVirtualMachine, queue *vm.Queue, name string) error

Restore restores a VM from a previously saved snapshot.

func (*Manager) Save

func (m *Manager) Save(machine vz.VZVirtualMachine, queue *vm.Queue, name string) error

Save saves the current VM state to a named snapshot.

type Meta

type Meta struct {
	Name     string    `json:"name"`
	Created  time.Time `json:"created"`
	Size     int64     `json:"size"`
	VMState  string    `json:"vmState"`
	FilePath string    `json:"filePath"`
}

Meta is the on-disk metadata format for VM state snapshots.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL