iso

package
v0.0.0-...-fc03e22 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDiskSize = 40 * 1024        // ~40GB
	MinDiskSize     = 256              // 256MB
	MaxDiskSize     = 64 * 1024 * 1024 // 64TB
	MaxVHDSize      = 2040 * 1024      // 2040GB

	DefaultDiskBlockSize = 32  // 32MB
	MinDiskBlockSize     = 1   // 1MB
	MaxDiskBlockSize     = 256 // 256MB

	DefaultRamSize                 = 1 * 1024  // 1GB
	MinRamSize                     = 32        // 32MB
	MaxRamSize                     = 32 * 1024 // 32GB
	MinNestedVirtualizationRamSize = 4 * 1024  // 4GB

	LowRam = 256 // 256MB

	DefaultUsername = ""
	DefaultPassword = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder implements packer.Builder and builds the actual Hyperv images.

func (*Builder) Cancel

func (b *Builder) Cancel()

Cancel.

func (*Builder) Prepare

func (b *Builder) Prepare(raws ...interface{}) ([]string, error)

Prepare processes the build configuration parameters.

func (*Builder) Run

func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error)

Run executes a Packer build and returns a packer.Artifact representing a Hyperv appliance.

type Config

type Config struct {
	common.PackerConfig         `mapstructure:",squash"`
	common.HTTPConfig           `mapstructure:",squash"`
	common.ISOConfig            `mapstructure:",squash"`
	common.FloppyConfig         `mapstructure:",squash"`
	bootcommand.BootConfig      `mapstructure:",squash"`
	hypervcommon.OutputConfig   `mapstructure:",squash"`
	hypervcommon.SSHConfig      `mapstructure:",squash"`
	hypervcommon.ShutdownConfig `mapstructure:",squash"`

	// The size, in megabytes, of the hard disk to create for the VM.
	// By default, this is 130048 (about 127 GB).
	DiskSize uint `mapstructure:"disk_size"`

	// The size, in megabytes, of the block size used to create the hard disk.
	// By default, this is 32768 (about 32 MB)
	DiskBlockSize uint `mapstructure:"disk_block_size"`

	// The size, in megabytes, of the computer memory in the VM.
	// By default, this is 1024 (about 1 GB).
	RamSize uint `mapstructure:"ram_size"`

	//
	SecondaryDvdImages []string `mapstructure:"secondary_iso_images"`

	// Should integration services iso be mounted
	GuestAdditionsMode string `mapstructure:"guest_additions_mode"`

	// The path to the integration services iso
	GuestAdditionsPath string `mapstructure:"guest_additions_path"`

	// This is the name of the new virtual machine.
	// By default this is "packer-BUILDNAME", where "BUILDNAME" is the name of the build.
	VMName string `mapstructure:"vm_name"`

	SwitchName                     string `mapstructure:"switch_name"`
	SwitchVlanId                   string `mapstructure:"switch_vlan_id"`
	MacAddress                     string `mapstructure:"mac_address"`
	VlanId                         string `mapstructure:"vlan_id"`
	Cpu                            uint   `mapstructure:"cpu"`
	Generation                     uint   `mapstructure:"generation"`
	EnableMacSpoofing              bool   `mapstructure:"enable_mac_spoofing"`
	EnableDynamicMemory            bool   `mapstructure:"enable_dynamic_memory"`
	EnableSecureBoot               bool   `mapstructure:"enable_secure_boot"`
	SecureBootTemplate             string `mapstructure:"secure_boot_template"`
	EnableVirtualizationExtensions bool   `mapstructure:"enable_virtualization_extensions"`
	TempPath                       string `mapstructure:"temp_path"`

	Communicator string `mapstructure:"communicator"`

	AdditionalDiskSize []uint `mapstructure:"disk_additional_size"`

	SkipCompaction bool `mapstructure:"skip_compaction"`

	SkipExport bool `mapstructure:"skip_export"`

	// Use differencing disk
	DifferencingDisk bool `mapstructure:"differencing_disk"`

	// Create the VM with a Fixed VHD format disk instead of Dynamic VHDX
	FixedVHD bool `mapstructure:"use_fixed_vhd_format"`

	Headless bool `mapstructure:"headless"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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