Skip to content

Commit

Permalink
Merge pull request #104 from jpts/virtio-net
Browse files Browse the repository at this point in the history
Allow virtio network driver
  • Loading branch information
VoyTechnology authored Sep 21, 2021
2 parents 297dcc7 + d5b90f7 commit 76651f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions virtualbox/resource_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,8 @@ func netTfToVbox(d *schema.ResourceData) ([]vbox.NIC, error) {
return vbox.IntelPro1000TServer, nil
case "IntelPro1000MTServer":
return vbox.IntelPro1000MTServer, nil
case "VirtIO":
return vbox.VirtIO, nil
default:
return "", fmt.Errorf("Invalid virtual network device: %s", attr)
}
Expand Down Expand Up @@ -656,6 +658,8 @@ func netVboxToTf(vm *vbox.Machine, d *schema.ResourceData) error {
return "IntelPro1000TServer"
case vbox.IntelPro1000MTServer:
return "IntelPro1000MTServer"
case vbox.VirtIO:
return "VirtIO"
default:
return ""
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/vm.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The following arguments are supported:
`bridged`, `hostonly`, `internal`, `generic`.
- `.#.device`, string, optional, default="IntelPro1000MTServer": The model of
the virtual hardware device, allowed values: `PCIII`, `FASTIII`,
`IntelPro1000MTDesktop` `IntelPro1000TServer`, `IntelPro1000MTServer`.
`IntelPro1000MTDesktop` `IntelPro1000TServer`, `IntelPro1000MTServer`, `VirtIO`.
- `.#.host_interface`, string, optional: Some network type (hostonly,
bridged, etc) must bind to a host interface to work properly, use this field
to specify the name of the host interface you like to bind to (like 'en0',
Expand Down

0 comments on commit 76651f0

Please sign in to comment.