[Libguestfs] [PATCH FOR DISCUSSION ONLY 0/2] v2v: Copy static IP address information over for Windows guests (RHBZ#1626503).

Richard W.M. Jones rjones at redhat.com
Wed Dec 5 11:01:43 UTC 2018


On Wed, Dec 05, 2018 at 09:01:16AM +0000, Roman Kagan wrote:
> On Tue, Dec 04, 2018 at 05:29:31PM +0000, Richard W.M. Jones wrote:
> > This patch is just for discussion.  There are still a couple of issues
> > that I'm trying to fix.
> 
> Sorry if I missed the original discussion on that, but why is copying
> the static IP configuraition even considered to be a good thing?
>
> For one, it's unlikely that the IP address will remain valid in the
> target environment.

For our v2v conversions (generally from VMware to oVirt or OpenStack)
we're trying to maintain a near-identical network configuration on
both sides.  So for example a guest will have the same MAC addresses
before and after and, if using DHCP, will pick up the exact same IP
address (probably served by the same DHCP server) and be able to
access the same set of services etc.

Also we're doing like 1000s of VMs in one go, so manual
reconfiguration of anything is a non-starter.

However let me describe the problem we're seeing, as it is a bit more
general and might even apply in some cloud scenarios.  If you have a
Windows guest which starts out with a static IP address (no DHCP) it
might be configured like this on VMware:

  00:50:56:01:02:03   192.168.128.10   vmxnet3  "Ethernet0"  EnableDHCP=0

After conversion we preserve the MAC address and add virtio drivers,
but the new netkvm.sys driver just adds a new network interface so
it'll end up like this:

  (no hardware)       192.168.128.10   vmxnet3  "Ethernet0"  EnableDHCP=0
  00:50:56:01:02:03   (no address)     netkvm   "Ethernet1"  EnableDHCP=1

It has no address in the second case because this is a non-DHCP
network.  (The DHCP situation is better because the second network
will be assigned the right IP address because of the preserved MAC
address, although it still has the unnecessary network adapter.)

Note that Windows < 10 doesn't have a concept of persistent network
names like we do in Linux which mostly solves this problem.  (Windows
10 on the other hand does save the MAC address in the Registry, but I
haven't fully investigated yet what it's doing.)

Anyway if you have another suggestion how to solve this, I'm all ears ...
For other areas we'd fix things up using an Ansible post-copy script,
but in this case we can't do that since Ansible cannot reconfigure a
guest that has no working network.

> For two, in a typical cloud setup static IP addresses are configured by
> some sort of a cloud-specific management agent, and bypassing it is
> likely to cause conflicts.
> 
> For three, network configuration is a notoriously complex thing.  I
> think I can recall a dozen of network configuration systems in Linux
> that claimed to provide the ultimate solution to all problems and none
> that delivered to the promise.  I guess in Windows the situation is
> hardly much simpler.  Creating yet another universal solution doesn't
> appear to be in scope for v2v (if realistic at all); and I'm not sure
> that having a very limited solution for a very basic use case only is
> better than explicitly telling the user not to rely on v2v for network
> configuration.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list