Mike Latimer
2013-Sep-04 00:09 UTC
[Libguestfs] [PATCH] virt-v2v: Remove iface:ide parameter (RHBZ#895898)
The iface:ide parameter (used in the libguestfs add_drive call) does not work
with a libvirt backend. The error usually seen is:
'iface' parameter is not supported by the libvirt attach-method at
/usr/share/perl5/vendor_perl/Sys/VirtConvert/GuestfsHandle.pm line 96.
This issue was previously mentioned in this thread:
https://www.redhat.com/archives/libguestfs/2013-February/msg00057.html, and a
workaround of 'export LIBGUESTFS_ATTACH_METHOD=appliance' was suggested.
However, as mentioned in the bug, this parameter is likely no longer required.
Unless there is a use-case where this setting is required, it seems like a
good idea to remove it completely (which should work in
either libvirt or direct mode), rather than recommend the workaround.
---
lib/Sys/VirtConvert/GuestfsHandle.pm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/Sys/VirtConvert/GuestfsHandle.pm
b/lib/Sys/VirtConvert/GuestfsHandle.pm
index 549ba11..71f11da 100644
--- a/lib/Sys/VirtConvert/GuestfsHandle.pm
+++ b/lib/Sys/VirtConvert/GuestfsHandle.pm
@@ -73,21 +73,18 @@ sub new
# Open a guest handle
my $g;
my $open = sub {
- my $interface = "ide";
-
$g = Sys::Guestfs->new();
foreach my $disk (@{$disks}) {
my ($name, $path, $format) = @$disk;
$g->add_drive_opts($path,
format => $format,
- iface => $interface,
name => $name);
}
# Add the transfer iso if there is one
$g->add_drive_opts($transfer,
- format => 'raw', iface => $interface,
readonly =>
1)
+ format => 'raw', readonly => 1)
if defined($transfer);
# Enable networking in the guest
--
1.8.1.4
Mike Latimer
2013-Sep-04 05:30 UTC
Re: [Libguestfs] [PATCH] virt-v2v: Remove iface:ide parameter (RHBZ#895898)
On Tuesday, September 03, 2013 06:09:26 PM Mike Latimer wrote:> However, as mentioned in the bug, this parameter is likely no longer > required. Unless there is a use-case where this setting is required, it > seems like a good idea to remove it completely (which should work in > either libvirt or direct mode), rather than recommend the workaround.As much as I hate to reply to myself... I just did some additional testing and realized that if 'iface:ide' is removed, the disks could be inaccessible in environments that don't have virtio_scsi (in the guestfs environment). In other words, with just ata_piix, the 'iface:ide' might be required. Do we know if there are any environments which are commonly missing the virtio stack? (If the answer is not much, I'd still rather drop iface:ide, and work with both backend types (through virtio_scsi). -Mike
Richard W.M. Jones
2013-Sep-04 18:57 UTC
Re: [Libguestfs] [PATCH] virt-v2v: Remove iface:ide parameter (RHBZ#895898)
On Tue, Sep 03, 2013 at 11:30:07PM -0600, Mike Latimer wrote:> On Tuesday, September 03, 2013 06:09:26 PM Mike Latimer wrote: > > However, as mentioned in the bug, this parameter is likely no longer > > required. Unless there is a use-case where this setting is required, it > > seems like a good idea to remove it completely (which should work in > > either libvirt or direct mode), rather than recommend the workaround. > > As much as I hate to reply to myself... I just did some additional testing and > realized that if 'iface:ide' is removed, the disks could be inaccessible in > environments that don't have virtio_scsi (in the guestfs environment). In > other words, with just ata_piix, the 'iface:ide' might be required.I'll give you a bit of background to this (mis-)feature. The "iface" optional argument was added so that you could use qemu's IDE interface instead of whatever the default is (virtio-scsi, falling back to virtio-blk). This has no effect (only limitations) for ordinary libguestfs users, but for virt-v2v it allows us to run the 'mkinitrd' command in the guest and have it work for very old and buggy mkinitrd / guests that got confused by virtio. I think it was for RHEL 4 ... What it does do is cause endless problems, mainly because people want to use virt-v2v with more disks than IDE allows (just 2, once you take into account the transfer disk and the libguestfs appliance). So I wouldn't worry about removing iface => "ide".> Do we know if there are any environments which are commonly missing > the virtio stack?Even ARM has it these days. libguestfs doesn't work without it. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Apparently Analagous Threads
- [PATCH] virt-v2v: Remove iface:ide parameter (RHBZ#895898)
- Re: [PATCH] virt-v2v: Remove iface:ide parameter (RHBZ#895898)
- Re: [PATCH] virt-v2v: Remove iface:ide parameter (RHBZ#895898)
- virt-v2v fails 'iface' parameter is not supported by the libvirt attach-method
- Re: [PATCH 3/4] Add SUSE converter