Skip to content

Commit

Permalink
fixup! Fix #73: OpenBSD VM fails during "Initializing VM" with QEMU o…
Browse files Browse the repository at this point in the history
…n macOS
  • Loading branch information
jacob-carlborg committed Jan 3, 2024
1 parent 424460b commit cd90e3e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
9 changes: 9 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/operating_systems/openbsd/qemu_vm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ export class QemuVm extends Vm {
protected override get netDevive(): string {
return this.architecture.networkDevice
}

protected override get firmwareFlags(): string[] {
return [
'-drive',
`if=pflash,format=raw,unit=0,file=${this.configuration.firmware},readonly=on`
]
}
}
4 changes: 4 additions & 0 deletions src/qemu_vm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export abstract class Vm extends vm.Vm {

protected abstract get hardDriverFlags(): string[]

protected get firmwareFlags(): string[] {
return ['-bios', this.configuration.firmware!.toString()]
}

protected get defaultHardDriveFlags(): string[] {
// prettier-ignore
return [
Expand Down

0 comments on commit cd90e3e

Please sign in to comment.