Documentation
¶
Index ¶
- func DebugDiskCLIArgs(storageConfigs []*types.StorageConfig, cpuCount, diskQueueSize int, ...) []string
- func ReverseLayerSerials(storageConfigs []*types.StorageConfig) []string
- type CloudHypervisor
- func (ch *CloudHypervisor) Clone(ctx context.Context, vmID string, vmCfg *types.VMConfig, net types.NetSetup, ...) (*types.VM, error)
- func (ch *CloudHypervisor) Console(ctx context.Context, ref string) (io.ReadWriteCloser, error)
- func (ch *CloudHypervisor) Create(ctx context.Context, id string, vmCfg *types.VMConfig, ...) (*types.VM, error)
- func (ch *CloudHypervisor) Delete(ctx context.Context, refs []string, force bool) ([]string, error)
- func (ch *CloudHypervisor) DeviceAttach(ctx context.Context, vmRef string, spec vfio.Spec) (string, error)
- func (ch *CloudHypervisor) DeviceDetach(ctx context.Context, vmRef, id string) error
- func (ch *CloudHypervisor) DeviceList(ctx context.Context, vmRef string) ([]vfio.Attached, error)
- func (ch *CloudHypervisor) DirectClone(ctx context.Context, vmID string, vmCfg *types.VMConfig, net types.NetSetup, ...) (*types.VM, error)
- func (ch *CloudHypervisor) DirectRestore(ctx context.Context, vmRef string, vmCfg *types.VMConfig, ...) (*types.VM, error)
- func (ch *CloudHypervisor) DiskAttach(ctx context.Context, vmRef string, spec disk.Spec) (string, error)
- func (ch *CloudHypervisor) DiskDetach(ctx context.Context, vmRef, name string) error
- func (ch *CloudHypervisor) DiskList(ctx context.Context, vmRef string) ([]disk.Attached, error)
- func (ch *CloudHypervisor) FsAttach(ctx context.Context, vmRef string, spec fs.Spec) (string, error)
- func (ch *CloudHypervisor) FsDetach(ctx context.Context, vmRef, tag string) error
- func (ch *CloudHypervisor) FsList(ctx context.Context, vmRef string) ([]fs.Attached, error)
- func (ch *CloudHypervisor) Hibernate(ctx context.Context, ref string, ...) error
- func (ch *CloudHypervisor) NetResize(ctx context.Context, vmRef string, spec netresize.Spec, ...) (netresize.Result, error)
- func (ch *CloudHypervisor) Restore(ctx context.Context, vmRef string, vmCfg *types.VMConfig, snapshot io.Reader, ...) (*types.VM, error)
- func (ch *CloudHypervisor) Snapshot(ctx context.Context, ref string) (*types.SnapshotConfig, string, error)
- func (ch *CloudHypervisor) Start(ctx context.Context, refs []string) ([]string, error)
- func (ch *CloudHypervisor) Stop(ctx context.Context, refs []string) ([]string, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugDiskCLIArgs ¶
func DebugDiskCLIArgs(storageConfigs []*types.StorageConfig, cpuCount, diskQueueSize int, noDirectIO bool) []string
DebugDiskCLIArgs uses the same storage-to-disk mapping as launch.
func ReverseLayerSerials ¶
func ReverseLayerSerials(storageConfigs []*types.StorageConfig) []string
ReverseLayerSerials extracts layer serials, reversed for overlayfs lowerdir.
Types ¶
type CloudHypervisor ¶
type CloudHypervisor struct {
*hypervisor.Backend
// contains filtered or unexported fields
}
CloudHypervisor implements hypervisor.Hypervisor.
func New ¶
New creates a CloudHypervisor backend. rec may be nil; the backend falls back to NopRecorder for emit calls.
func (*CloudHypervisor) Console ¶
func (ch *CloudHypervisor) Console(ctx context.Context, ref string) (io.ReadWriteCloser, error)
Console returns a caller-closed bidirectional stream to the VM console: console.sock (UEFI) or the CH-allocated PTY (OCI).
func (*CloudHypervisor) Create ¶
func (ch *CloudHypervisor) Create(ctx context.Context, id string, vmCfg *types.VMConfig, storageConfigs []*types.StorageConfig, net types.NetSetup, bootCfg *types.BootConfig) (*types.VM, error)
func (*CloudHypervisor) DeviceAttach ¶ added in v0.3.9
func (*CloudHypervisor) DeviceDetach ¶ added in v0.3.9
func (ch *CloudHypervisor) DeviceDetach(ctx context.Context, vmRef, id string) error
func (*CloudHypervisor) DeviceList ¶ added in v0.3.9
func (*CloudHypervisor) DirectClone ¶
func (ch *CloudHypervisor) DirectClone(ctx context.Context, vmID string, vmCfg *types.VMConfig, net types.NetSetup, snapshotConfig *types.SnapshotConfig, srcDir string) (*types.VM, error)
DirectClone clones from a local snapshot dir. Per-type: hardlink memory-range-*, reflink/copy COW, plain copy metadata; cidata is regenerated.
func (*CloudHypervisor) DirectRestore ¶
func (ch *CloudHypervisor) DirectRestore(ctx context.Context, vmRef string, vmCfg *types.VMConfig, srcDir, sourceSnapshotID string) (*types.VM, error)
DirectRestore restores a VM in place from a local snapshot dir.
func (*CloudHypervisor) DiskAttach ¶ added in v0.4.9
func (*CloudHypervisor) DiskDetach ¶ added in v0.4.9
func (ch *CloudHypervisor) DiskDetach(ctx context.Context, vmRef, name string) error
func (*CloudHypervisor) FsDetach ¶ added in v0.3.9
func (ch *CloudHypervisor) FsDetach(ctx context.Context, vmRef, tag string) error
func (*CloudHypervisor) Hibernate ¶ added in v0.4.8
func (ch *CloudHypervisor) Hibernate(ctx context.Context, ref string, persist func(cfg *types.SnapshotConfig, srcDir string) error) error
Hibernate captures like Snapshot but persists and then terminates the VMM inside the pause window instead of resuming.
func (*CloudHypervisor) NetResize ¶ added in v0.4.0
func (ch *CloudHypervisor) NetResize(ctx context.Context, vmRef string, spec netresize.Spec, plumbing netresize.Plumbing) (netresize.Result, error)
NetResize brings the VM's NIC count to spec.Target on a running CH VM.
func (*CloudHypervisor) Snapshot ¶
func (ch *CloudHypervisor) Snapshot(ctx context.Context, ref string) (*types.SnapshotConfig, string, error)
Snapshot pauses, captures CH state+COW, resumes, and returns the capture dir.
type Config ¶
type Config struct {
hypervisor.BaseConfig
}
Config holds Cloud Hypervisor specific configuration.