search for: have_selinux

Displaying 20 results from an estimated 41 matches for "have_selinux".

2019 Apr 08
0
[PATCH 01/11] v2v: Move have_selinux to utils.
...+108,6 @@ class input_libvirt_vddk input_conn input_password vddk_options parsed_uri (* Compute the LD_LIBRARY_PATH that we may have to pass to nbdkit. *) let library_path = Option.map (fun libdir -> libdir // libNN) libdir in - (* Is SELinux enabled and enforcing on the host? *) - let have_selinux = - 0 = Sys.command "getenforce 2>/dev/null | grep -isq Enforcing" in - (* Check that the VDDK path looks reasonable. *) let error_unless_vddk_libdir () = (match libdir with diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml index 77c39107e..0709c8152 100644...
2019 May 27
2
[PATCH] Use proper label for nbdkit sockets
...libvirt_vddk.ml index e2efef842e8e..4e36ff71f783 100644 --- a/v2v/input_libvirt_vddk.ml +++ b/v2v/input_libvirt_vddk.ml @@ -286,7 +286,7 @@ object add_arg "--newstyle"; (* use newstyle NBD protocol *) add_arg "--exportname"; add_arg "/"; if have_selinux then ( (* label the socket so qemu can open it *) - add_arg "--selinux-label"; add_arg "system_u:object_r:svirt_t:s0" + add_arg "--selinux-label"; add_arg "system_u:object_r:svirt_socket_t:s0" ); (* Name of the plugin. Ev...
2019 May 28
0
Re: [PATCH] Use proper label for nbdkit sockets
...2e8e..4e36ff71f783 100644 > --- a/v2v/input_libvirt_vddk.ml > +++ b/v2v/input_libvirt_vddk.ml > @@ -286,7 +286,7 @@ object > add_arg "--newstyle"; (* use newstyle NBD protocol *) > add_arg "--exportname"; add_arg "/"; > if have_selinux then ( (* label the socket so qemu can open it *) > - add_arg "--selinux-label"; add_arg "system_u:object_r:svirt_t:s0" > + add_arg "--selinux-label"; add_arg "system_u:object_r:svirt_socket_t:s0" > ); > > (...
2019 Apr 08
12
[PATCH 00/11] v2v: Change virt-v2v to use nbdkit for input in several modes.
This series (except the last one) changes virt-v2v to use nbdkit for several input modes: -i vmx -it vddk: No change in functionality, as this already uses nbdkit-vddk-plugin, but the code is refactored for the other modes to use. -i libvirtxml: Use nbdkit-curl-plugin instead of qemu curl. vCenter: Use nbdkit-curl-plugin instead of qemu curl. xen: Use nbdkit-ssh-plugin instead of qemu
2019 Sep 20
0
[PATCH v4 01/12] v2v: Factor out the nbdkit VDDK code into a new module.
...ive mode while doing the conversion.") - in - object (self) inherit input_libvirt libvirt_conn guest as super method precheck () = - error_unless_vddk_libdir (); - error_unless_nbdkit_working (); - error_unless_nbdkit_vddk_working (); - error_unless_thumbprint (); - if have_selinux then - error_unless_nbdkit_compiled_with_selinux () + error_unless_thumbprint () method as_options = let pt_options = @@ -231,79 +130,40 @@ object (self) | None -> error (f_"<vmware:moref> was not found in the output of ‘virsh dumpxml \"%s\&quot...
2019 Sep 20
4
Re: [PATCH v4 07/12] v2v: nbdkit: Add the readahead filter unconditionally if it is available.
...bdkit --dump-config output did not contain filterdir") in >+ > (* Get the nbdkit plugin_name --dump-plugin output, which also > * checks that the plugin is available and loadable. > *) >@@ -133,9 +142,17 @@ let common_create plugin_name plugin_args plugin_env = > if have_selinux then ( (* label the socket so qemu can open it *) > add_arg "--selinux-label"; add_arg "system_u:object_r:svirt_socket_t:s0" > ); >+ >+ (* Adding the readahead filter is always a win for our access >+ * patterns. However if it doesn't exist do...
2019 Sep 20
0
[PATCH v4 07/12] v2v: nbdkit: Add the readahead filter unconditionally if it is available.
...+ error (f_"nbdkit --dump-config output did not contain filterdir") in + (* Get the nbdkit plugin_name --dump-plugin output, which also * checks that the plugin is available and loadable. *) @@ -133,9 +142,17 @@ let common_create plugin_name plugin_args plugin_env = if have_selinux then ( (* label the socket so qemu can open it *) add_arg "--selinux-label"; add_arg "system_u:object_r:svirt_socket_t:s0" ); + + (* Adding the readahead filter is always a win for our access + * patterns. However if it doesn't exist don't worry. + *...
2020 Jan 28
0
[v2v PATCH 2/2] -o rhv-upload: check guest arch with cluster
...et_string "rhv_storagedomain_uuid" json); rhv_cluster_uuid <- Some (JSON_parser.object_get_string "rhv_cluster_uuid" json); + rhv_cluster_cpu_architecture <- + Some (JSON_parser.object_get_string "rhv_cluster_cpu_architecture" json); if have_selinux then error_unless_nbdkit_compiled_with_selinux () @@ -290,7 +294,19 @@ object (* rhev-apt.exe will be installed (if available). *) method install_rhev_apt = true - method prepare_targets source_name overlays _ = + method prepare_targets source_name overlays guestcaps = + let r...
2020 Jan 28
2
[v2v PATCH 1/2] Add back guestcaps as parameter of output#prepare_targets
It will be used to do extra checks in the output before copying the disks. Partially revert commit 3bafec4e693a25ef1c84abc0fd1bc3251862c7de. --- v2v/output_glance.ml | 2 +- v2v/output_json.ml | 2 +- v2v/output_libvirt.ml | 2 +- v2v/output_local.ml | 2 +- v2v/output_null.ml | 2 +- v2v/output_openstack.ml | 2 +- v2v/output_qemu.ml | 2 +- v2v/output_rhv.ml
2020 Apr 06
0
[v2v PATCH 2/2] Consolidate handling of temporary files/dirs
..._guestfs ())#get_cachedir () in + let cachedir = Mkdtemp.temp_dir ~base_dir "virt-v2v." in + rmdir_on_exit cachedir; + cachedir + ) + +let tmpdir = + Lazy.force lazy_tmpdir + +let cachedir = + Lazy.force lazy_cachedir + (* Is SELinux enabled and enforcing on the host? *) let have_selinux = 0 = Sys.command "getenforce 2>/dev/null | grep -isq Enforcing" @@ -112,7 +134,7 @@ let qemu_img_supports_offset_and_size () = (* We actually attempt to create a qcow2 file with a raw backing * file that has an offset and size. *) - let tmp = Filename.temp_file "v2...
2019 Sep 20
0
Re: [PATCH v4 07/12] v2v: nbdkit: Add the readahead filter unconditionally if it is available.
...The readahead filter is a self-configuring filter that makes >> sequential reads faster when the plugin is slow (and all of the >> plugins we use here are always slow). >> >> @@ -133,9 +142,17 @@ let common_create plugin_name plugin_args >> plugin_env = >>   if have_selinux then (        (* label the socket so qemu can open >> it *) >>     add_arg "--selinux-label"; add_arg >> "system_u:object_r:svirt_socket_t:s0" >>   ); >> + >> +  (* Adding the readahead filter is always a win for our access >> +   * patt...
2020 Apr 06
0
[PATCH virt-v2v v2 2/2] v2v: Allow large temporary directory to be set on a global basis.
.../v2v/utils.ml +++ b/v2v/utils.ml @@ -24,6 +24,10 @@ open Std_utils open Tools_utils open Common_gettext.Gettext +let large_tmpdir = + try Sys.getenv "VIRT_V2V_TMPDIR" + with Not_found -> (open_guestfs ())#get_cachedir () + (* Is SELinux enabled and enforcing on the host? *) let have_selinux = 0 = Sys.command "getenforce 2>/dev/null | grep -isq Enforcing" @@ -113,6 +117,7 @@ let qemu_img_supports_offset_and_size () = * file that has an offset and size. *) let tmp = Filename.temp_file "v2vqemuimgtst" ".img" in + unlink_on_exit tmp; Unix...
2019 Sep 20
15
[PATCH v4 00/12] v2v: Change virt-v2v to use nbdkit for input in several modes.
v3 posted here: https://www.redhat.com/archives/libguestfs/2019-July/msg00200.html v4: - The first patch in the v3 series was just a trivial doc whitespace fix so I pushed it. - There's a new patch using the nbdkit-retry-filter. This is not actually upstream in nbdkit but we know enough about how it will work. - Rebased against master and reran the tests. Rich.
2019 Sep 16
0
[PATCH 3/8] v2v: -o rhv-upload: improve lookup of specified resources (RHBZ#1612653)
...(JSON.string_of_doc ~fmt:JSON.Indented ["", json]); + rhv_storagedomain_uuid <- + Some (JSON_parser.object_get_string "rhv_storagedomain_uuid" json); + rhv_cluster_uuid <- + Some (JSON_parser.object_get_string "rhv_cluster_uuid" json); if have_selinux then error_unless_nbdkit_compiled_with_selinux () @@ -383,11 +392,11 @@ If the messages above are not sufficient to diagnose the problem then add the diskid ) targets in - (* We don't have the storage domain UUID, but instead we write - * in a magic value wh...
2018 Mar 08
6
[PATCH v5 0/4] v2v: Add -o rhv-upload output mode.
Mainly minor fixes and code cleanups over the v4 patch. There are still several problems with this patch, but it is in a reviewable state, especially the Python code. Rich.
2019 Jul 19
12
[PATCH v3 00/12] v2v: Change virt-v2v to use nbdkit for input in several modes.
v2 was posted here: https://www.redhat.com/archives/libguestfs/2019-July/msg00115.html This also has links to earlier versions. v3: - The 01/11 patch in v2 included a bunch of unnecessary plus one necessary change to how input_password is passed around. I moved the necessary change into the final patch (implementing SSH password authentication) and dropped the rest. - The 01/11
2018 Mar 08
0
[PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...+ plugin in + let createvm = + let createvm = tmpdir // "rhv-upload-createvm.py" in + with_open_out + createvm + (fun chan -> output_string chan Output_rhv_upload_createvm_source.code); + createvm in + + (* Is SELinux enabled and enforcing on the host? *) + let have_selinux = + 0 = Sys.command "getenforce 2>/dev/null | grep -isq Enforcing" in + + (* Check that nbdkit is available and new enough. *) + let error_unless_nbdkit_working () = + if 0 <> Sys.command "nbdkit --version >/dev/null" then + error (f_"nbdkit is not...
2018 Mar 08
2
Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...t createvm = tmpdir // "rhv-upload-createvm.py" in > + with_open_out > + createvm > + (fun chan -> output_string chan > Output_rhv_upload_createvm_source.code); > + createvm in > + > + (* Is SELinux enabled and enforcing on the host? *) > + let have_selinux = > + 0 = Sys.command "getenforce 2>/dev/null | grep -isq Enforcing" in > + > + (* Check that nbdkit is available and new enough. *) > + let error_unless_nbdkit_working () = > + if 0 <> Sys.command "nbdkit --version >/dev/null" then > +...
2019 Jul 11
11
[PATCH v2 00/11] v2v: Change virt-v2v to use nbdkit for input in several modes.
Originally posted here: https://www.redhat.com/archives/libguestfs/2019-April/thread.html#00054 https://www.redhat.com/archives/libguestfs/2019-April/msg00076.html https://www.redhat.com/archives/libguestfs/2019-April/msg00126.html This is a rebase on top of current master branch with no other changes. The first patch in the old series was pushed a while back, and the last "TEMPORARY"
2018 Mar 11
2
Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...let createvm = tmpdir // "rhv-upload-createvm.py" in > + with_open_out > + createvm > + (fun chan -> output_string chan Output_rhv_upload_createvm_source.code); > + createvm in > + > + (* Is SELinux enabled and enforcing on the host? *) > + let have_selinux = > + 0 = Sys.command "getenforce 2>/dev/null | grep -isq Enforcing" in > + > + (* Check that nbdkit is available and new enough. *) > + let error_unless_nbdkit_working () = > + if 0 <> Sys.command "nbdkit --version >/dev/null" then > +...