Merge pull request #8380 from bennu/qemu-args
fix: persist default drive/device
This commit is contained in:
commit
ef137a8f08
|
@ -266,14 +266,11 @@ func getCommandArgs(bootDrive string, state multistep.StateBag) ([]string, error
|
||||||
arg = defaultArgs[key].([]string)
|
arg = defaultArgs[key].([]string)
|
||||||
}
|
}
|
||||||
inArgs[key] = arg
|
inArgs[key] = arg
|
||||||
|
} else {
|
||||||
|
if key == "-device" || key == "-drive" {
|
||||||
|
inArgs[key] = append(defaultArgs[key].([]string), inArgs[key]...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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
|
// Flatten to array of strings
|
||||||
|
|
Loading…
Reference in New Issue