[linux-elitists] legacy host to virtual machine conundrum (RH7.2 inside modern machine vdekvm)

Tony Godshall togo at of.net
Sun Sep 6 19:49:48 PDT 2009


Hi guys

I'm moving a legacy machine with a lot of cruft into a VM.

The legacy machine is a Red Hat 7.2 machine and runs in a private
network and they want as little change to it as possible.  I.e. it
should appear on the external network with the same addr as the
original.  Let's call it A.

The host is Debian lenny by the way with 2X the CPUs and 2X the RAM
and a 4-way RAID-1 (configured for redundancy and fast-read obviously)

I configured a first run with a seemingly straightforward vdekvm +
vde_switch + dnsmasq (with fixed-ip dhcp) + iptables solution.  The
guest system was copied into the partitions with a livecd and the
changes were isolated into three files- /etc/fstab (partitions moved
and enlarged, driver changed), /boot/grub/grub.conf (drop splash, drop
initrd) and /etc/sysconfig/network-scripts/ifcfg-eth0 (simplified to
just dhcp since dnsmasq provides the specific addr etc)

It worked well enough for most things but it turned out there were
numerous scripts that should not be changed that run ifconfig and
decide to behave as this machine if they see the right ip address or
subnet and as some other machine if they see something else.

So the host needs to be at ip address A and the guest needs to see
itself at ip address A.

Any iptables magic that would allow a host to forward all traffic to a
guest of the same ip address?  And keep it from getting itself
confused?  Or some other thing that would do the job?

Best Regards.
Tony


More information about the linux-elitists mailing list