Let network adapter use DHCP server to get network configuration.
To do this we use PrlVmDevNet_SetConfigureWithDhcp to enable it and
PrlVmDevNet_SetAutoApply to makes necessary settings within guest OS
In linux case it creates network startup scripts
/etc/sysconfig/network-scripts/ifcfg-ethN and fills it with necessary
parameters.
---
src/vz/vz_sdk.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 98f7a57..090a3ad 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -2815,6 +2815,12 @@ static int prlsdkAddNet(PRL_HANDLE sdkdom,
pret = PrlVmDevNet_SetMacAddress(sdknet, macstr);
prlsdkCheckRetGoto(pret, cleanup);
+ pret = PrlVmDevNet_SetConfigureWithDhcp(sdknet, true);
+ prlsdkCheckRetGoto(pret, cleanup);
+
+ pret = PrlVmDevNet_SetAutoApply(sdknet, true);
+ prlsdkCheckRetGoto(pret, cleanup);
+
if (isCt) {
if (net->model)
VIR_WARN("Setting network adapter for containers is not "
--
1.7.1