[pve-devel] [PATCH] add romfile option to hostpci

Alexandre Derumier aderumier at odiso.com
Fri Jan 6 18:18:52 CET 2017


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 3c9d30a..654a985 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -999,6 +999,13 @@ EODESCR
 	optional => 1,
 	default => 1,
     },
+    romfile => {
+        type => 'string',
+        pattern => '\S+',
+        format_description => 'string',
+        description => "Custom romfile.",
+        optional => 1,
+    },
     pcie => {
 	type => 'boolean',
         description =>  "Choose the PCI-express bus (needs the 'q35' machine model).",
@@ -2908,6 +2915,8 @@ sub config_to_command {
 	}
 
 	my $rombar = defined($d->{rombar}) && !$d->{rombar} ? ',rombar=0' : '';
+	my $romfile = $d->{romfile} if $d->{romfile};
+
 	my $xvga = '';
 	if ($d->{'x-vga'}) {
 	    $xvga = ',x-vga=on';
@@ -2934,6 +2943,7 @@ sub config_to_command {
 	    if($j == 0){
 		$devicestr .= "$rombar$xvga";
 		$devicestr .= ",multifunction=on" if $multifunction;
+		$devicestr .= ",romfile=$romfile" if $romfile;
 	    }
 
 	    push @$devices, '-device', $devicestr;
-- 
2.1.4




More information about the pve-devel mailing list