VirtualBox Import & Same Mac Address

You can change the macaddress of a machine with

vboxmanage modifyvm VMName --macaddressN macaddress

where N is the interface number and macaddress matches the regexp [0-9A-Fa-f][02468ACEace][0-9A-Fa-f]{10}

eg

vboxmanage modifyvm VMName --macaddress1 000027D15bE8

Did you set a static IP address on your base VM ?

EDIT

Based on the discussion below I think you will be better off using

vboxmanage modifyvm VMName --macaddressN auto

Which will set a new mac address once. The machine will then retain that new mac address.


Here is a simple sample script that I created. It may be useful as an example of what you can do.

A little side not there are only 8 network interfaces available for configuration

#!/bin/bash

# this script changes the network set up $cable a virtual box vim
vmname="floating"
nic=1
hostinterface="eth0"
cable="off"

#vboxmanage showvminfo "floating" | grep NIC
# usefull to see your vms configuration

((nic=1))
echo "network interface $nic"
vboxmanage modifyvm $vmname --nic$nic bridged --nictype$nic "82540EM" --cableconnected$nic $cable --bridgeadapter$nic $hostinterface --macaddress$nic 08002713F6EA

((nic=2))
echo "network interface $nic"
vboxmanage modifyvm $vmname --nic$nic bridged --nictype$nic "82540EM" --cableconnected$nic $cable --bridgeadapter$nic $hostinterface --macaddress$nic 08002713F6EB

vboxmanage showvminfo $vmname | grep NIC
#vboxmanage startvm "$vmname"