search for: inspect_get_distro

Displaying 20 results from an estimated 82 matches for "inspect_get_distro".

2011 Apr 26
1
[PATCH] Don't set distro for non-Linux guests
...ter.pm b/lib/Sys/VirtConvert/Converter.pm index 28c57d5..6b9f8f9 100644 --- a/lib/Sys/VirtConvert/Converter.pm +++ b/lib/Sys/VirtConvert/Converter.pm @@ -102,7 +102,8 @@ sub convert my %desc; $desc{os} = $g->inspect_get_type($root); - $desc{distro} = $g->inspect_get_distro($root); + $desc{distro} = $g->inspect_get_distro($root) + if $desc{os} eq 'linux'; $desc{product_name} = $g->inspect_get_product_name($root); $desc{major_version} = $g->inspect_get_major_version($root); $desc{minor_version} = $g->insp...
2016 Feb 03
0
Re: [PATCH 1/3] sysprep, get-kernel: explicit the Guestfs parameter
...net_hostname.ml > @@ -22,7 +22,7 @@ open Common_gettext.Gettext > > module G = Guestfs > > -let net_hostname_perform g root side_effects = > +let net_hostname_perform (g : Guestfs.guestfs) root side_effects = > let typ = g#inspect_get_type root in > let distro = g#inspect_get_distro root in > match typ, distro with > diff --git a/sysprep/sysprep_operation_net_hwaddr.ml b/sysprep/sysprep_operation_net_hwaddr.ml > index 9052fcb..439da6d 100644 > --- a/sysprep/sysprep_operation_net_hwaddr.ml > +++ b/sysprep/sysprep_operation_net_hwaddr.ml > @@ -22,7 +22,7 @@...
2016 Feb 03
6
[PATCH 1/3] sysprep, get-kernel: explicit the Guestfs parameter
...name.ml +++ b/sysprep/sysprep_operation_net_hostname.ml @@ -22,7 +22,7 @@ open Common_gettext.Gettext module G = Guestfs -let net_hostname_perform g root side_effects = +let net_hostname_perform (g : Guestfs.guestfs) root side_effects = let typ = g#inspect_get_type root in let distro = g#inspect_get_distro root in match typ, distro with diff --git a/sysprep/sysprep_operation_net_hwaddr.ml b/sysprep/sysprep_operation_net_hwaddr.ml index 9052fcb..439da6d 100644 --- a/sysprep/sysprep_operation_net_hwaddr.ml +++ b/sysprep/sysprep_operation_net_hwaddr.ml @@ -22,7 +22,7 @@ open Common_gettext.Gettext...
2019 Apr 24
4
[PATCH 0/3] Few minor changes for bindings
*** BLURB HERE *** Pino Toscano (3): python: modernize inspect_vm example perl: silence usage of add_cdrom in test python: silence usage of add_cdrom in test perl/t/060-handle-properties.t | 7 +++++-- python/examples/inspect_vm.py | 26 ++++++++++++-------------- python/t/test050HandleProperties.py | 5 ++++- 3 files changed, 21 insertions(+), 17 deletions(-) -- 2.20.1
2014 Mar 14
5
Re: --rbd volume access--
...Ceph drives: $g->config ("-set", "drive.hd0.file=rbd:ssd-clonetest-rule5/ubuntu-12.04--1.raw.img"); $g->launch (); my @roots = $g->inspect_os (); if (@roots == 0) { die "no operating systems found"; } my $root = $roots[0]; my $distro = $g->inspect_get_distro ($root); print "distro = $distro\n"; ------------------------------------------------------------ Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN a...
2012 Apr 06
2
[PATCH] virt-sysprep:add logging feature
...p/sysprep_operation_hostname.ml +++ b/sysprep/sysprep_operation_hostname.ml @@ -25,7 +25,7 @@ module G = Guestfs let hostname = ref "localhost.localdomain" -let hostname_perform g root = +let hostname_perform g root show_log = let typ = g#inspect_get_type root in let distro = g#inspect_get_distro root in match typ, distro with @@ -42,10 +42,12 @@ let hostname_perform g root = String.concat "\n" lines ^ sprintf "\nHOSTNAME=%s\n" !hostname in g#write filename file; + logging show_log "Modified HOSTNAME to %s" !hostname [ `Created_fil...
2012 Sep 03
2
[PATCH] sysprep: remove hostname from ifcfg-*
...write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Utils +open Sysprep_operation +open Sysprep_gettext.Gettext + +module G = Guestfs + +let net_hostname_perform g root = + let typ = g#inspect_get_type root in + let distro = g#inspect_get_distro root in + match typ, distro with + | "linux", ("fedora"|"rhel"|"centos"|"scientificlinux"|"redhat-based") -> + let filenames = g#glob_expand "/etc/sysconfig/network-scripts/ifcfg-*" in + Array.iter ( + fun filenam...
2013 Jan 22
1
APIs affected by btrfs subvolumes
...th bindings? I would deprecate all of the apis below and replace them with alternative versions with a _ext suffix. The replacement apis would accept and return the enhanced descriptor. Inspection APIS: All take a root filesystem as an argument, which may not be a block device. inspect_get_arch inspect_get_distro inspect_get_drive_mappings inspect_get_filesystems inspect_get_format inspect_get_hostname inspect_get_icon inspect_get_major_version inspect_get_minor_version inspect_get_mountpoints inspect_get_package_format inspect_get_package_management inspect_get_product_name inspect_get_product_variant insp...
2013 Nov 07
6
[PATCH 0/4] virt-v2v: Add support for SUSE guest conversions
The following series of patches adds support for converting SUSE guests through virt-v2v. These changes should not impact non-SUSE guest conversions. Mike Latimer (4): Add perl-Bootloader support to grub packages Add conversion support for SUSE guests Add SUSE to capabilities db and conf Add SUSE support documentation lib/Sys/VirtConvert/Converter/Linux.pm | 480
2013 Oct 11
2
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...ts a Red Hat based guest to use KVM. +Sys::VirtConvert::Converter::Linux converts a Linux based guest to use KVM. =head1 METHODS @@ -541,12 +625,21 @@ sub _is_rhel_family my ($g, $root) = @_; return ($g->inspect_get_type($root) eq 'linux') && - ($g->inspect_get_distro($root) =~ /^(rhel|centos|scientificlinux| redhat-based)$/); + ($g->inspect_get_distro($root) =~ + /^(rhel|centos|scientificlinux|redhat-based)$/); +} + +sub _is_suse_family +{ + my ($g, $root) = @_; + + return ($g->inspect_get_type($root) eq 'linux') &amp...
2013 Oct 12
0
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...a Red Hat based guest to run on KV =head1 DESCRIPTION -Sys::VirtConvert::Converter::RedHat converts a Red Hat based guest to use KVM. +Sys::VirtConvert::Converter::Linux converts a Linux based guest to use KVM. =head1 METHODS @@ -544,9 +625,17 @@ sub _is_rhel_family ($g->inspect_get_distro($root) =~ /^(rhel|centos|scientificlinux| redhat-based)$/); } -=item Sys::VirtConvert::Converter::RedHat->can_handle(g, root) +sub _is_suse_family +{ + my ($g, $root) = @_; + + return ($g->inspect_get_type($root) eq 'linux') && + ($g->inspect_get_distro($...
2012 Aug 08
1
[PATCH] sysprep: remove the process accounting log files
...rogram; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Sysprep_operation +open Sysprep_gettext.Gettext + +module G = Guestfs + +let pacct_log_perform g root = + let typ = g#inspect_get_type root in + let distro = g#inspect_get_distro root in + match typ, distro with + | "linux", ("fedora"|"rhel"|"centos"|"scientificlinux"|"redhat-based") -> + let files = g#glob_expand "/var/account/pacct*" in + Array.iter ( + fun file -> + try g#rm f...
2014 Jan 21
1
[PATCH 1/2] sysprep: Update comments.
--- sysprep/sysprep_operation.mli | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysprep/sysprep_operation.mli b/sysprep/sysprep_operation.mli index 61dde72..eb89db4 100644 --- a/sysprep/sysprep_operation.mli +++ b/sysprep/sysprep_operation.mli @@ -16,14 +16,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -(** Structure used to describe sysprep
2012 Sep 21
3
[PATCH] sysprep: handle distro specific sysv scripts
...quot;suse-based") -> + install_sysvinit_suse g + | "debian" -> + install_sysvinit_debian g + | _ -> + failed "guest type %s is not supported" distro + let add_firstboot_script g root id content = let typ = g#inspect_get_type root in let distro = g#inspect_get_distro root in match typ, distro with | "linux", _ -> - install_service g root; + install_service g distro; let t = Int64.of_float (Unix.time ()) in let r = string_random8 () in let filename = sprintf "%s/scripts/%Ld-%s-%s" firstboot_dir t r id in -- 1.7....
2011 Apr 26
7
[PATCH 1/7] Push $desc creation into Sys::VirtConvert::Converter->convert
...ows7".$arch_suffix; } @@ -861,10 +862,10 @@ sub _get_os_type_windows sub _get_os_type_linux { - my ($desc, $arch_suffix) = @_; + my ($g, $root, $arch_suffix) = @_; - my $distro = $desc->{distro}; - my $major = $desc->{major_version}; + my $distro = $g->inspect_get_distro($root); + my $major = $g->inspect_get_major_version($root); # XXX: RHEV 2.2 doesn't support a RHEL 6 target, however RHEV 2.3+ will. # For the moment, we set RHEL 6 to be 'OtherLinux', however we will need to diff --git a/lib/Sys/VirtConvert/Converter.pm b/lib/Sys/Vi...
2018 Feb 21
0
[PATCH] make-repository: use inspect_get_osinfo
...string_of_arch a = Index.string_of_arch b @@ -260,14 +243,10 @@ let process_image acc_entries filename repo tmprepo index interactive let root = Array.get roots 0 in let inspected_arch = g#inspect_get_arch root in let product = g#inspect_get_product_name root in - let distro = g#inspect_get_distro root in - let version_major = g#inspect_get_major_version root in - let version_minor = g#inspect_get_minor_version root in + let shortid = g#inspect_get_osinfo root in let lvs = g#lvs () in let filesystems = g#inspect_get_filesystems root in - let shortid = compute_short_id...
2013 Oct 07
3
Re: [PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
On Friday, October 04, 2013 09:38:58 AM Matthew Booth wrote: > It's specifically an error if we're attempting to configure virtio, and > there's no detected virtio kernel. It shouldn't have been possible to > get here in that state, hence it's a programmer error. The code below > attempts to install *any* kernel in the case that we aren't configuring >
2016 Aug 19
1
[PATCH] virt-rescue rewrite in OCaml
Hi, I tried to rewrite virt-rescue from C to OCaml. Goals were feature parity with C implementation, smaller codebase and hopefully better maintainability. I still don't know if I've covered everything right. So, please check it out. PS: my git send-email seems to be broken, so I'm sending it from thunderbird Thanks! maros
2014 Mar 13
2
Re: --rbd volume access--
i will test it out and will update you.. Thankyou so much for your reply kind regards Shumaila Naeem Software Engineer , Ovex Technologies On Thu, Mar 13, 2014 at 5:15 PM, Richard W.M. Jones <rjones@redhat.com>wrote: > On Thu, Mar 13, 2014 at 03:06:17PM +0500, Shumaila Naeem wrote: > > >
2013 Jun 14
3
[PATCH 0/2] Fix inspection of Fedora guests (RHBZ#974489).
Here is a preliminary fix for this bug. I'm running the test suite on this now. Rich.