Archive for the ‘Virtualization’ Category.

MAC Address Conflict – ESXi management interface could not communicate to another ESXi box

When I first put together my home ESXi box, I used a Intel Pro/1000 PT quad port NIC. All was great until I wanted to pass-through individual ports to specific virtual machines. So I purchased a newer Intel I350 quad port NIC that supported what I wanted to do. Then I gave my old Pro/1000 quad port to a friend that needed it for his home ESXi box. Months down the road, my friends ESXi box came to live next to mine. With both machines running, connecting to the vSphere management or SSH was terrible. Connection was unreliable but guest OS’s networking seemed to work fine. On my workstation I would ping each ESXi box and neither would respond at the same time. I launched wireshark and noticed there were constant ARP requests for each ESXi management IP. These ARP requests were getting the same MAC for each IP. Doh! Little research on google and found this VMware KB.To sum it up, once you create a ESXi management interface it uses the physical mac address. If you replace the physical hardware it will keep the old mac address. It required me to remove the management interface and re-create it. Now the management interface has the physical address of my newer I350 NIC. In VMwares’s KB they have this work around.
esxcfg-advcfg -s 1 /Net/FollowHardwareMac
Above command in ESXi Shell should update the Management interface mac to the physical mac address if the underlying hardware changes.

Map raw image file to VirtualBox

In the attempt to restore data off a failing hard drive I use ddrescue to make raw copy of a hard disk. But I wanted to attempt to boot the system in a virtual box for a more simple data recovery. Because the VirtualBox GUI does not have the ability to make raw device mapping you must do it by VBoxManage command. I just open up a terminal, cd into my VirtualBox storage folder and run:

VBoxManage internalcommands createrawvmdk -filename my_raw_mapping.vmdk -rawdisk /path/to/backup.img

Now map the newly created vdmk file to your VM and off you go.

Mapping RAW Disks (RDM) in ESXi 4.0, 4.1, 5.0, 5.1

When you need have raw drive to a VM in ESXi without passing the whole controller to the VM, you’ll need RDM (Raw Device Mapping).
Here is the jist, in a SSH session with ESXi server:
vmkfstools -z /vmfs/devices/disks/<diskname> /vmfs/volumes/<datastorename>/<vmfolder>/<vmname>.vmdk

More details
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1017530