On 08/04/10 10:41, Richard W.M. Jones wrote:
On Wed, Apr 07, 2010 at 12:05:45PM +0100, Matthew Booth wrote:
If the transfer iso was mounted during conversion, virt-v2v would always give the following error on shutdown:
(in cleanup) umount: /tmp/transferb7icam: umount: /sysroot/tmp/transferb7icam: not found at /home/mbooth/src/virt-v2v/blib/lib/Sys/VirtV2V/GuestOS/RedHat.pm line 1171.
This was because the GuestOS::RedHat cleanup was being called implicitly on exit, which is after umount_all has been called explicitly on the libguestfs handle. This change garbage collects the guestos explicitly before the libguestfs handle. --- v2v/virt-v2v.pl | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl index 08f1c8d..c7ebad3 100755 --- a/v2v/virt-v2v.pl +++ b/v2v/virt-v2v.pl @@ -366,6 +366,9 @@ END {
sub close_guest_handle { + # Perform GuestOS cleanup before closing the handle + $guestos = undef; +
Not sure what if anything is the difference between this and
undef $guestos;
but in any case it looks like a good change, ACK.
Thanks. Note that I'm still on a drive to eliminate GuestOS. I'm hoping to get a patch out today which moves config management out of it and into a separate config module. The driver for this is to allow installation of viostor.sys using the config file and transfer.iso without having to touch GuestOS for Windows support. Matt -- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team M: +44 (0)7977 267231 GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490