Documentation ¶
Overview ¶
Package to work with VHD images See https://technet.microsoft.com/en-us/virtualization/bb676673.aspx
Index ¶
Constants ¶
View Source
const FOURK_SECTOR_SIZE = 4096
View Source
const SECTOR_SIZE = 512
View Source
const VHD_BLOCK_SIZE = 2 * 1024 * 1024 // 2MB
View Source
const VHD_COOKIE = "636f6e6563746978" // conectix
View Source
const VHD_CREATOR_APP = "676f2d766864" // go-vhd
View Source
const VHD_CREATOR_HOST_OS = "5769326B" // Win2k
View Source
const VHD_DYN_COOKIE = "6378737061727365" // cxsparse
View Source
const VHD_EXTRA_HEADER_SIZE = 1024
View Source
const VHD_HEADER_SIZE = 512
Variables ¶
This section is empty.
Functions ¶
func RawToFixed ¶
func RawToFixed(f *os.File, options *VHDOptions)
Types ¶
type VHD ¶
type VHD struct { ExtraHeader VHDExtraHeader }
A VDH file
func VHDCreateSparse ¶
func VHDCreateSparse(size uint64, name string, options VHDOptions) VHD
type VHDExtraHeader ¶
type VHDExtraHeader struct { Cookie [8]byte DataOffset [8]byte TableOffset [8]byte HeaderVersion [4]byte MaxTableEntries [4]byte BlockSize [4]byte Checksum [4]byte ParentUUID [16]byte ParentTimestamp [4]byte Reserved [4]byte ParentUnicodeName [512]byte ParentLocatorEntry1 [24]byte ParentLocatorEntry2 [24]byte ParentLocatorEntry3 [24]byte ParentLocatorEntry4 [24]byte ParentLocatorEntry5 [24]byte ParentLocatorEntry6 [24]byte ParentLocatorEntry7 [24]byte ParentLocatorEntry8 [24]byte Reserved2 [256]byte }
VHD extra header, for dynamic and differential disks
func (*VHDExtraHeader) CookieString ¶
func (header *VHDExtraHeader) CookieString() string
type VHDHeader ¶
type VHDHeader struct { Cookie [8]byte Features [4]byte FileFormatVersion [4]byte DataOffset [8]byte Timestamp [4]byte CreatorApplication [4]byte CreatorVersion [4]byte CreatorHostOS [4]byte OriginalSize [8]byte CurrentSize [8]byte DiskGeometry [4]byte DiskType [4]byte Checksum [4]byte UniqueId [16]byte SavedState [1]byte Reserved [427]byte }
VHD Header
func CreateFixedHeader ¶
func CreateFixedHeader(size uint64, options *VHDOptions) VHDHeader
Click to show internal directories.
Click to hide internal directories.