Merge pull request #6807 from dev-rowbot/qemu-net-device-6804

Fix for #6804 - KVM/QEMU Network "has no peer"
pull/6879/head
Megan Marsh 8 years ago committed by GitHub
commit 3175dcdf81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -217,6 +217,13 @@ func getCommandArgs(bootDrive string, state multistep.StateBag) ([]string, error
}
}
// Check if we are missing the netDevice #6804
if x, ok := inArgs["-device"]; ok {
if !strings.Contains(strings.Join(x, ""), config.NetDevice) {
inArgs["-device"] = append(inArgs["-device"], fmt.Sprintf("%s,netdev=user.0", config.NetDevice))
}
}
// Flatten to array of strings
outArgs := make([]string, 0)
for key, values := range inArgs {

Loading…
Cancel
Save