[PATCH febootstrap] Pull in febootstrap-supermin-helper (C version) from libguestfs.
by Richard W.M. Jones
This patch is FYI as it needs more testing, although feel free to take
a look at it if you want.
Background: We'd like to change libguestfs so that the appliance can
support optional features. This would mean you could have (for
example) a 'libguestfs' base package and a 'libguestfs-xfs' package
providing optional support for XFS filesystem tools. This would only
apply to the supermin case.
Currently the supermin appliance is built out of 3 files:
$ ls -1 /usr/lib64/guestfs/
initramfs.fedora-12.x86_64.supermin.hostfiles
# text file containing wildcards of files picked up from
# the host at runtime
initramfs.fedora-12.x86_64.supermin.img
# base appliance data (cpio file)
kmod.whitelist
# text file containing wildcards matching kernel modules
There are a number of problems with this: (1) The files have fixed
names. (2) The names are rather obscure. (3) You can't have optional
appliance modules.
The idea would be to replace this with a scheme where the supermin
builder looks in a directory and picks out all the files it needs from
there. It would look something like:
$ ls -1 /usr/lib64/guestfs/supermin.d/
base.img
hostfiles
optional-xfs.img # installed by libguestfs-xfs package
optional-zfs.img # installed by libguestfs-zfs package
(Similarly the kernel module whitelist could point to a directory, but
we don't need that now and aren't implementing that right away).
At the same time we have for a while been maintaining some significant
duplicate functionality in febootstrap, cf:
http://git.annexia.org/?p=libguestfs.git;a=blob;f=appliance/supermin-spli...
http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap-to-supermi...
and:
http://git.annexia.org/?p=libguestfs.git;a=blob;f=appliance/libguestfs-su...
http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap-supermin-h...
Since this is a major change to the way the appliance is built, it
makes sense at the same time to fold everything into febootstrap and
drop the custom libguestfs/appliance/*supermin* scripts.
This patch is the first part of this plan, porting the relevant
functionality from libguestfs into febootstrap.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
14 years, 6 months
FW: Emailing: Windows.pm
by Amos Benari
It assumes using the RHSrvAny packed with rhevm (with service name
'rhev-apt').
It uses the same registry keys for all windows version supported (XP, 2k3,
2k8 and 7).
Amos.
14 years, 6 months
[PATCH] Fix import of RHEL 3 kvm guests using kmod-virtio
by Matthew Booth
RHEL 3 doesn't have a dynamic /dev. kmod-virtio creates devices nodes for vdX
block devices based on what the major number of virtblk was at the time it was
installed. This is, in turn, based on the order the modules were loaded in
initrd.
To try to preserve this precarious state of affairs, when adding virtio drivers
to a new initrd we always load the same drivers as kmod-virtio in the same
order.
---
lib/Sys/VirtV2V/Converter/Linux.pm | 8 +++++++-
lib/Sys/VirtV2V/GuestOS/RedHat.pm | 8 ++++----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/lib/Sys/VirtV2V/Converter/Linux.pm b/lib/Sys/VirtV2V/Converter/Linux.pm
index df7c969..6c50cd1 100644
--- a/lib/Sys/VirtV2V/Converter/Linux.pm
+++ b/lib/Sys/VirtV2V/Converter/Linux.pm
@@ -332,7 +332,13 @@ sub _configure_boot
my ($guestos, $kernel, $virtio) = @_;
if($virtio) {
- $guestos->prepare_bootable($kernel, "virtio_pci", "virtio_blk");
+ # The order of modules here is deliberately the same as the order
+ # specified in the postinstall script of kmod-virtio in RHEL3. The
+ # reason is that the probing order determines the major number of vdX
+ # block devices. If we change it, RHEL 3 KVM guests won't boot.
+ $guestos->prepare_bootable($kernel, "virtio", "virtio_ring",
+ "virtio_blk", "virtio_net",
+ "virtio_pci");
} else {
$guestos->prepare_bootable($kernel, "sym53c8xx");
}
diff --git a/lib/Sys/VirtV2V/GuestOS/RedHat.pm b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
index 8b211f0..af64dfa 100644
--- a/lib/Sys/VirtV2V/GuestOS/RedHat.pm
+++ b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
@@ -1381,10 +1381,10 @@ sub prepare_bootable
# Backup the original initrd
$g->mv("$initrd", "$initrd.pre-v2v");
- # Create a new initrd which preloads the required kernel modules
- my @preload_args = ();
+ # Create a new initrd which probes the required kernel modules
+ my @module_args = ();
foreach my $module (@modules) {
- push(@preload_args, "--preload=$module");
+ push(@module_args, "--with=$module");
}
# mkinitrd reads configuration which we've probably changed
@@ -1407,7 +1407,7 @@ sub prepare_bootable
$g->modprobe("loop");
};
- $g->command(["/sbin/mkinitrd", @preload_args, $initrd, $version]);
+ $g->command(["/sbin/mkinitrd", @module_args, $initrd, $version]);
}
# Disable kudzu in the guest
--
1.6.6.1
14 years, 6 months