Skip to content
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
3 changes: 3 additions & 0 deletions net.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ func (vb *VBox) AddNic(vm *VirtualMachine, nic *NIC) error {
}

args = append(args, fmt.Sprintf("--nictype%d", nic.Index), string(nic.Type))
if nic.MAC != "" {
args = append(args, fmt.Sprintf("--macaddress%d", nic.Index), nic.MAC)
}

_, err := vb.modify(vm, args...)
return err
Expand Down
2 changes: 1 addition & 1 deletion types.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type NIC struct {
Speedkbps int
BootPrio int
PromiscuousMode string
MAC string //auto assigns mac automatically
MAC string
}

type Network struct {
Expand Down