diff options
-rw-r--r-- | src/os-plugins/plugins/virtualbox/files/machine.include | 6 | ||||
-rw-r--r-- | src/os-plugins/plugins/virtualbox/files/run-virt.include | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/os-plugins/plugins/virtualbox/files/machine.include b/src/os-plugins/plugins/virtualbox/files/machine.include index 6367d3d9..d1c77f02 100644 --- a/src/os-plugins/plugins/virtualbox/files/machine.include +++ b/src/os-plugins/plugins/virtualbox/files/machine.include @@ -56,7 +56,11 @@ cat << EOF > "${machconfig}" <Adapter slot="0" enabled="true" MACAddress="${macaddr}" cable="true" speed="0" type="${vb_network_card}"> <${network_kind}/> </Adapter> - <Adapter slot="1" enabled="false" MACAddress="0800279312CC" cable="true" speed="0" type="Am79C973"/> + <Adapter slot="1" enabled="false" MACAddress="${vdemacaddr}" cable="true" speed="0" type="${vb_network_card}"> + <GenericInterface driver="VDE"> + <Properties name="network" value="/tmp/vde-switch"/> + </GenericInterface> + </Adapter> <Adapter slot="2" enabled="false" MACAddress="080027A3A3CC" cable="true" speed="0" type="Am79C973"/> <Adapter slot="3" enabled="false" MACAddress="0800277356CC" cable="true" speed="0" type="Am79C973"/> <Adapter slot="4" enabled="false" MACAddress="080027CEA8CC" cable="true" speed="0" type="Am79C973"/> diff --git a/src/os-plugins/plugins/virtualbox/files/run-virt.include b/src/os-plugins/plugins/virtualbox/files/run-virt.include index f5eb3c16..84410f8e 100644 --- a/src/os-plugins/plugins/virtualbox/files/run-virt.include +++ b/src/os-plugins/plugins/virtualbox/files/run-virt.include @@ -181,8 +181,10 @@ writelog "\tMachine config:\t\t$machconfig" ### Hardware checks ################################################################################ -# remove ':' from MAC addr for vbox +# remove ':' from MAC addr for vbox and generate a VDE (virtual device ethernet) +# MAC addr from the first one (put in prefix 0DE) macaddr=$(echo ${macaddr} | sed 's/://g') +vdemacaddr=$(echo ${macaddr} | sed 's/^..../00DE/g') # machine UUID, MAC addr part of it machineuuid="00000000-0000-0000-0000-${macaddr}" |