disk

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager added in v0.48.0

type Manager struct {
	Client              *vim25.Client
	Datastore           *object.Datastore
	ObjectManager       *vslm.ObjectManager
	GlobalObjectManager *vslm.GlobalObjectManager
}

Manager provides a layer for switching between Virtual Storage Object Manager (VSOM) and Virtual Storage Lifecycle Manager (VSLM). The majority of VSOM methods require a Datastore param, and most VSLM methods do not as it uses the "Global Catalog". VSOM was introduced in vSphere 6.5 (11/2016) and VSLM in vSphere 6.7 U2 (04/2019). The govc disk commands were introduced prior to 6.7 U2 and continue to use VSOM when an optional Datastore (-ds flag) is provided. Otherwise, VSLM global methods are used when a Datastore is not specified. Also note that VSOM methods can be used when connected directly to an ESX hosts, but VSLM global methods require vCenter. A disk managed by these methods are also known as a "First Class Disk" (FCD).

func NewManager added in v0.48.0

func NewManager(ctx context.Context, c *vim25.Client, ds *object.Datastore) (*Manager, error)

func NewManagerFromFlag added in v0.48.0

func NewManagerFromFlag(ctx context.Context, cmd *flags.DatastoreFlag) (*Manager, error)

func (*Manager) AttachDisk added in v0.48.0

func (m *Manager) AttachDisk(ctx context.Context, vm *object.VirtualMachine, id string) error

func (*Manager) AttachTag added in v0.48.0

func (m *Manager) AttachTag(ctx context.Context, id string, tag types.VslmTagEntry) error

func (*Manager) CreateDisk added in v0.48.0

func (m *Manager) CreateDisk(ctx context.Context, spec types.VslmCreateSpec) (*types.VStorageObject, error)

func (*Manager) CreateSnapshot added in v0.48.0

func (m *Manager) CreateSnapshot(ctx context.Context, id, desc string) (types.ID, error)

func (*Manager) Delete added in v0.48.0

func (m *Manager) Delete(ctx context.Context, id string) error

func (*Manager) DeleteSnapshot added in v0.48.0

func (m *Manager) DeleteSnapshot(ctx context.Context, id, sid string) error

func (*Manager) DetachTag added in v0.48.0

func (m *Manager) DetachTag(ctx context.Context, id string, tag types.VslmTagEntry) error

func (*Manager) List added in v0.48.0

func (*Manager) ListAttachedObjects added in v0.48.0

func (m *Manager) ListAttachedObjects(ctx context.Context, category, tag string) ([]types.ID, error)

func (*Manager) ListAttachedTags added in v0.48.0

func (m *Manager) ListAttachedTags(ctx context.Context, id string) ([]types.VslmTagEntry, error)

func (*Manager) ReconcileDatastoreInventory added in v0.48.0

func (m *Manager) ReconcileDatastoreInventory(ctx context.Context) error

func (*Manager) RegisterDisk added in v0.48.0

func (m *Manager) RegisterDisk(ctx context.Context, path, name string) (*types.VStorageObject, error)

func (*Manager) Retrieve added in v0.48.0

func (m *Manager) Retrieve(ctx context.Context, id string) (*types.VStorageObject, error)

func (*Manager) RetrieveSnapshotInfo added in v0.48.0

type VStorageObject

type VStorageObject struct {
	types.VStorageObject
	Tags []types.VslmTagEntry `json:"tags"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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