Tuesday, February 24, 2015

Converting Physical Servers to VM's and getting the "Unable to query the live linux source machine" error

The famous "Unable to query the live linux source machine" error.  

So you could be trying to convert a physical box that has interfaces that look like this:

[root@linux01 ~]# ifconfig 
eth0      Link encap:Ethernet  HWaddr 78:2B:CB:11:71:B4  
          inet6 addr: fe80::7a2b:cbff:fe11:71b4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:571643146 errors:0 dropped:0 overruns:0 frame:0
          TX packets:260652914 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:734439978 (700.4 MiB)  TX bytes:679368267 (647.8 MiB)
          Interrupt:90 Memory:da000000-da012800 

eth0.28  Link encap:Ethernet  HWaddr 78:2B:CB:11:71:B4  
          inet addr:10.28.0.2  Bcast:10.225.255.255  Mask:255.255.0.0
          inet6 addr: fe80::7a2b:cbff:fe11:71b4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:493616754 errors:0 dropped:0 overruns:0 frame:0
          TX packets:260652917 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1212214321 (1.1 GiB)  TX bytes:2853259219 (2.6 GiB)

eth1      Link encap:Ethernet  HWaddr 78:2B:CB:11:71:B5  
          inet addr:10.23.1.2  Bcast:10.233.255.255  Mask:255.255.0.0
          inet6 addr: fe80::7a2b:cbff:fe11:71b5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:91354729 errors:0 dropped:0 overruns:0 frame:0
          TX packets:55239822 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:311977801 (297.5 MiB)  TX bytes:4190442061 (3.9 GiB)
          Interrupt:98 Memory:dc000000-dc012800 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:102371 errors:0 dropped:0 overruns:0 frame:0
          TX packets:102371 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:109111704 (104.0 MiB)  TX bytes:109111704 (104.0 MiB)


Problem is, when you try to convert them using the VMware Converter, you will  get this error:

"unable to query the live linux source machine"

unable to query the live linux source machine
In the example here it's RedHat but the concept works on many flavors.

Due to a programming issue in the VMware converter, the converter gets confused with this dot (.) in the interface name, and bombs out.  So you need to change the interface from something like ifcfg-eth0.28 to ifcfg-vlan28




Please do this using an iDRAC or iLO or console, as more likely than not, you will lose network connectivity over an SSH session....



Now to the details, you need the configuration inside the interface look like this:

VLAN=yes
VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD
DEVICE=vlan28
PHYSDEV=eth0
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
IPADDR=10.28.0.2
NETMASK=255.255.0.0

(note the VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD line, that's crucial, as the line in there may read VLAN_NAME_TYPE=DEV_PLUS_VID_NO_PAD and that won't work!!)

Now you need to remove the vlan that was already there, you can do it with vconfig:

#vconfig rem eth0.28
Removed VLAN -:eth0.28:-

Now issue a "service network restart" (or /etc/init.d/network restart

and you should see the new name (vlan28) in the interface list.  

You can see what vlans there are like this:

#ls /proc/net/vlan
config       vlan28

(this is after I restarted the network of course)  


[root@linux01 ~]# ifconfig 
---snip---
vlan28   Link encap:Ethernet  HWaddr 78:2B:CB:10:2B:6F  
          inet addr:10.28.0.2  Bcast:10.225.255.255  Mask:255.255.0.0
          inet6 addr: fe80::7a2b:cbff:fe10:2b6f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26368 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3701 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2942976 (2.8 MiB)  TX bytes:496224 (484.5 KiB)