mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-19 12:57:56 +00:00
Set default VMware VM adapter type to e1000.
This commit is contained in:
parent
cdd54b951a
commit
851ba074e7
@ -253,12 +253,17 @@ class VMwareVM(BaseVM):
|
||||
for adapter_number in range(0, self._adapters):
|
||||
|
||||
# add/update the interface
|
||||
if self._adapter_type == "default":
|
||||
# force default to e1000 because some guest OS don't detect the adapter (i.e. Windows 2012 server)
|
||||
# when 'virtualdev' is not set in the VMX file.
|
||||
adapter_type = "e1000"
|
||||
else:
|
||||
adapter_type = self._adapter_type
|
||||
ethernet_adapter = {"ethernet{}.present".format(adapter_number): "TRUE",
|
||||
"ethernet{}.addresstype".format(adapter_number): "generated",
|
||||
"ethernet{}.generatedaddressoffset".format(adapter_number): "0"}
|
||||
"ethernet{}.generatedaddressoffset".format(adapter_number): "0",
|
||||
"ethernet{}.virtualdev".format(adapter_number): adapter_type}
|
||||
self._vmx_pairs.update(ethernet_adapter)
|
||||
if self._adapter_type != "default":
|
||||
self._vmx_pairs["ethernet{}.virtualdev".format(adapter_number)] = self._adapter_type
|
||||
|
||||
connection_type = "ethernet{}.connectiontype".format(adapter_number)
|
||||
if not self._use_any_adapter and connection_type in self._vmx_pairs and self._vmx_pairs[connection_type] in ("nat", "bridged", "hostonly"):
|
||||
|
Loading…
Reference in New Issue
Block a user