mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0203-v2v-o-libvirt-Add-readonly-yes-to-UEFI-loader-attrib.patch

ffd6ed
From 23483d8fc3f3a6fad88648eeee4be61e19dfde0a Mon Sep 17 00:00:00 2001
ffd6ed
From: "Richard W.M. Jones" <rjones@redhat.com>
ffd6ed
Date: Mon, 6 Jul 2015 12:20:48 +0100
ffd6ed
Subject: [PATCH] v2v: -o libvirt: Add readonly=yes to UEFI <loader> attribute
ffd6ed
 (RHBZ#1184690).
ffd6ed
ffd6ed
Thanks: Junqin Zhou for diagnosing the bug and finding the correct
ffd6ed
solution.  https://bugzilla.redhat.com/show_bug.cgi?id=1184690#c22
ffd6ed
ffd6ed
This fixes commit 40558450dd87190c9dc2649cadbf284ae0a21606.
ffd6ed
ffd6ed
(cherry picked from commit 74e87a970b39864b8f38c9a8b0ddab61b9d9a76e)
ffd6ed
---
ffd6ed
 v2v/output_libvirt.ml | 2 +-
ffd6ed
 1 file changed, 1 insertion(+), 1 deletion(-)
ffd6ed
ffd6ed
diff --git a/v2v/output_libvirt.ml b/v2v/output_libvirt.ml
ffd6ed
index 6188aa6..40280dd 100644
ffd6ed
--- a/v2v/output_libvirt.ml
ffd6ed
+++ b/v2v/output_libvirt.ml
ffd6ed
@@ -125,7 +125,7 @@ let create_libvirt_xml ?pool source targets guestcaps
ffd6ed
           * until that day we have to use a bunch of heuristics. XXX
ffd6ed
           *)
ffd6ed
          let code, vars_template = find_uefi_firmware guestcaps.gcaps_arch in
ffd6ed
-         [ e "loader" ["type", "pflash"] [ PCData code ];
ffd6ed
+         [ e "loader" ["readonly", "yes"; "type", "pflash"] [ PCData code ];
ffd6ed
            e "nvram" ["template", vars_template] [] ] in
ffd6ed
 
ffd6ed
     (e "type" ["arch", guestcaps.gcaps_arch] [PCData "hvm"]) :: loader in
ffd6ed
-- 
ffd6ed
1.8.3.1
ffd6ed