Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidFormat = errors.New("vmdk: invalid format (must be streamOptimized)")
)
Functions ¶
Types ¶
type ImportParams ¶
type ImportParams struct {
Path string
Logger progress.Sinker
Type types.VirtualDiskType
Force bool
Datacenter *object.Datacenter
Pool *object.ResourcePool
Folder *object.Folder
Host *object.HostSystem
}
ImportParams contains the set of optional params to the Import function. Note that "optional" may depend on environment, such as ESX or vCenter.
type Info ¶ added in v0.39.0
type Info struct {
Header struct {
MagicNumber uint32
Version uint32
Flags uint32
Capacity uint64
}
Capacity uint64
Size int64
Name string
ImportName string
}
Info is used to inspect a vmdk and generate an ovf template
type VirtualDiskInfo ¶ added in v0.39.0
type VirtualDiskInfo struct {
CapacityInBytes int64
DeviceKey int32
FileName string
Size int64
UniqueSize int64
}
func GetVirtualDiskInfoByUUID ¶ added in v0.39.0
func GetVirtualDiskInfoByUUID( ctx context.Context, client *vim25.Client, mo mo.VirtualMachine, fetchProperties bool, diskUUID string) (VirtualDiskInfo, error)
GetVirtualDiskInfoByUUID returns information about a virtual disk identified by the provided UUID. This method is valid for the following backing types:
- VirtualDiskFlatVer2BackingInfo - VirtualDiskSeSparseBackingInfo - VirtualDiskRawDiskMappingVer1BackingInfo - VirtualDiskSparseVer2BackingInfo - VirtualDiskRawDiskVer2BackingInfo
These are the only backing types that have a UUID property for comparing the provided value.
Click to show internal directories.
Click to hide internal directories.