Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for floppy_content #63

Open
braheezy opened this issue Apr 30, 2022 · 0 comments
Open

Missing support for floppy_content #63

braheezy opened this issue Apr 30, 2022 · 0 comments
Labels

Comments

@braheezy
Copy link

Overview of the Issue

The current VirtualBox ISO Builder docs mention a floppy_content setting that can be used to add content to a floppy disk. This setting is currently not implemented in the plugin. I believe it applies to all builders, not just the ISO.

Reproduction Steps

Use a VirtualBox builder and set the floppy_content setting:

floppy_content = {
  "user-data" ="foo"
}

Observe the following after running PACKER_LOG=1 packer build:

packer-builder-virtualbox-iso plugin: No floppy disk, not attaching.

Plugin and Packer version

Packer version: 1.8.0
VirtualBox plugin version: Whatever is being included in Packer 1.8.0

Simplified Packer Buildfile

source "virtualbox-iso" "test" {
  guest_os_type        = "Windows10_64"
  iso_url              = "windows.iso"
  iso_checksum         = "md5:6E7CF41B5387293E55BF693432F6C97B"
  communicator         = "winrm"
  winrm_username       = "packer"
  winrm_password       = "packer"
  winrm_insecure       = true
  winrm_use_ssl        = true
  shutdown_command     = "shutdown /s /t 10 /f /d p:4:1 /c Packer"
  guest_additions_mode = "disable"
  headless             = false
  memory               = 4096
  cpus                 = 2
  gfx_vram_size        = 128
  gfx_controller       = "vboxsvga"
  format               = "ova"
  floppy_content = {
    "user-data" = "foo"
  }
}

build {
  sources = ["sources.virtualbox-iso.test"]

  provisioner "powershell" {
    inline = ["write-output hello"]
  }
}

Operating system and Environment details

  • Ubuntu 20.04 on WSL 2
  • VirtualBox 6.1.32

Notes

I did some investigating and while the FloppyContent config is defined in packer-plugin-sdk/multistep/commonsteps/floppy_config.go:

type FloppyConfig struct {
	FloppyFiles []string `mapstructure:"floppy_files"`
	FloppyDirectories []string `mapstructure:"floppy_dirs"`
	FloppyContent map[string]string `mapstructure:"floppy_content"`
	FloppyLabel   string            `mapstructure:"floppy_label"`
}

It doesn't appear to be used when creating the floppy:

&commonsteps.StepCreateFloppy{
Files: b.config.FloppyConfig.FloppyFiles,
Directories: b.config.FloppyConfig.FloppyDirectories,
Label: b.config.FloppyConfig.FloppyLabel,
},

@braheezy braheezy added the bug label Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant