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

Add qemuramfb gfx option #148

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .web-docs/components/builder/iso/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ necessary for this build to succeed and can be found further down the page.
When set to vboxvga, the graphics controller is VirtualBox VGA. This is the default.
When set to vboxsvga, the graphics controller is VirtualBox SVGA.
When set to vmsvga, the graphics controller is VMware SVGA.
When set to qemuramfb, the graphics controller is Qemu based.
When set to none, the graphics controller is disabled.

- `gfx_vram_size` (uint) - The VRAM size to be used. By default, this is 4 MiB.
Expand Down
5 changes: 3 additions & 2 deletions builder/virtualbox/iso/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ type Config struct {
// When set to vboxvga, the graphics controller is VirtualBox VGA. This is the default.
// When set to vboxsvga, the graphics controller is VirtualBox SVGA.
// When set to vmsvga, the graphics controller is VMware SVGA.
// When set to qemuramfb, The graphics controller is Qemu based.
// When set to none, the graphics controller is disabled.
GfxController string `mapstructure:"gfx_controller" required:"false"`
// The VRAM size to be used. By default, this is 4 MiB.
Expand Down Expand Up @@ -275,11 +276,11 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
b.config.GfxController = "vboxvga"
}
switch b.config.GfxController {
case "vboxvga", "vboxsvga", "vmsvga", "none":
case "vboxvga", "vboxsvga", "vmsvga", "none", "qemuramfb":
// do nothing
default:
errs = packersdk.MultiErrorAppend(
errs, errors.New("Graphics controller type can only be vboxvga, vboxsvga, vmsvga, none"))
errs, errors.New("Graphics controller type can only be vboxvga, vboxsvga, vmsvga, qemuramfb, none"))
}

if b.config.GfxVramSize == 0 {
Expand Down