]> git.proxmox.com Git - qemu-server.git/commitdiff
add romfile option to hostpci
authorAlexandre Derumier <aderumier@odiso.com>
Mon, 9 Jan 2017 13:36:24 +0000 (14:36 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 9 Jan 2017 14:31:18 +0000 (15:31 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/QemuServer.pm

index 3c9d30a83355fc22fd7457c8ecd8e35dfa6a945a..dc6bd6d9d37cb12b2bd85afd5d8bcdc428067613 100644 (file)
@@ -999,6 +999,13 @@ EODESCR
        optional => 1,
        default => 1,
     },
+    romfile => {
+        type => 'string',
+        pattern => '[^,;]+',
+        format_description => 'string',
+        description => "Custom pci device rom filename (must be located in /usr/share/kvm/).",
+        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=/usr/share/kvm/$romfile" if $romfile;
            }
 
            push @$devices, '-device', $devicestr;