[rhos-list] Problem with Snapshots.

Richard W.M. Jones rjones at redhat.com
Wed Apr 10 17:08:30 UTC 2013


On Wed, Apr 10, 2013 at 12:22:30PM -0400, Perry Myers wrote:
> Did you 'sysprep' the guest image before importing it into glance?
> 
> The udev rule you mention above needs to be removed/disabled from guest
> images in order to prevent this I think.
> 
> There is a tool called virt-sysprep that you can run on guest images
> prior to import and one of the default things it does is to remove that
> troublesome udev rule
> 
> I've added the libguestfs maintainer (which virt-sysprep is part of) to
> provide any add'l insight here.

The man page for virt-sysprep is here:

http://libguestfs.org/virt-sysprep.1.html

Note this tool was completely rewritten from scratch in libguestfs 1.18.
If you are using RHEL 6 then unfortunately you'll have the old tool
which wasn't nearly so capable.

To make ad-hoc changes to the persistent-net.rules file I would
recommend using guestfish or virt-edit (-e option).  For example:

  virt-edit -a /path/to/your/guest \
    /etc/udev/rules.d/70-persistent-net.rules \
    -e '$_ = "" if /52:54:00:01:02:03/'

would delete only the persistent rule matching the given MAC address.
Or:

  virt-edit -a /path/to/your/guest \
    /etc/udev/rules.d/70-persistent-net.rules \
    -e '$_ = "" if /NAME=.*eth1/'

would delete only the eth1 rule.

You mustn't do this on live guests.

http://libguestfs.org/virt-edit.1.html#non-interactive-editing

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
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 rhos-list mailing list