Skip to content

Commit

Permalink
Merge pull request #540 from kylelaker/use-virtio
Browse files Browse the repository at this point in the history
Use VirtIO for HD, ISO, and network
  • Loading branch information
ripleymj authored Jan 13, 2024
2 parents 3e9e190 + 7db40ca commit ab134a6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packer/main.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ source "virtualbox-iso" "base-build" {
gfx_controller = "vmsvga"
gfx_accelerate_3d = true
hard_drive_discard = true
hard_drive_interface = "sata"
hard_drive_interface = "virtio"
hard_drive_nonrotational = true
headless = "${var.headless}"
http_directory = "http"
iso_interface = "sata"
iso_interface = "virtio"
nic_type = "virtio"
rtc_time_base = "UTC"
sata_port_count = 2
sound = "${var.audio}"
Expand Down Expand Up @@ -62,11 +63,11 @@ source "virtualbox-iso" "base-build" {
["modifyvm", "{{ .Name }}", "--pae", "on"],
["modifyvm", "{{ .Name }}", "--vrde", "off"],
["storagectl", "{{ .Name }}", "--name", "IDE Controller", "--remove"],
["storagectl", "{{ .Name }}", "--name", "SATA Controller", "--hostiocache", "on"]
["storagectl", "{{ .Name }}", "--name", "VirtIO Controller", "--hostiocache", "on"]
]
vboxmanage_post = [
["modifyvm", "{{.Name}}", "--nat-localhostreachable1", "off"],
["storageattach", "{{ .Name }}", "--storagectl", "SATA Controller", "--port", "1", "--type", "dvddrive", "--medium", "emptydrive"]
["storageattach", "{{ .Name }}", "--storagectl", "VirtIO Controller", "--port", "1", "--type", "dvddrive", "--medium", "emptydrive"]
]
}

Expand Down

0 comments on commit ab134a6

Please sign in to comment.