[pve-devel] [PATCH] add scsi boot workaround
Dietmar Maurer
dietmar at proxmox.com
Fri Dec 16 06:42:34 CET 2011
I doubt that this works with your hotplug code?
(print_drivedevice_full is used inside vm_deviceadd)
- Dietmar
> -----Original Message-----
> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> bounces at pve.proxmox.com] On Behalf Of Derumier Alexandre
> Sent: Donnerstag, 15. Dezember 2011 10:44
> To: pve-devel at pve.proxmox.com
> Subject: [pve-devel] [PATCH] add scsi boot workaround
>
> detect if lsi rom file exist and add bootindex on it if not, add bootindex on scsi
> device
>
> Signed-off-by: Derumier Alexandre <aderumier at odiso.com>
> ---
> PVE/QemuServer.pm | 12 +++++++++---
> 1 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 10c7d8e..734b0d2
> 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -908,9 +908,14 @@ sub print_drivedevice_full {
> } else {
> die "unsupported interface type";
> }
> -
> - $device .= ",bootindex=$drive->{bootindex}" if $drive->{bootindex};
> -
> +
> + if($drive->{interface} eq 'scsi') {
> + unless (-e '/usr/share/kvm/8xx_64.rom') {
> + $device .= ",bootindex=$drive->{bootindex}" if $drive->{bootindex};
> + }
> + } else {
> + $device .= ",bootindex=$drive->{bootindex}" if $drive->{bootindex};
> + }
> return $device;
> }
>
> @@ -2139,6 +2144,7 @@ sub config_to_command {
> my $controller = int($drive->{index} / $maxdev);
> $pciaddr = print_pci_addr("scsi$controller");
> push @$cmd, '-device', "lsi,id=scsi$controller$pciaddr" if !$scsicontroller-
> >{$controller};
> + push @$cmd, '-option-rom',
> + "8xx_64.rom,bootindex=$drive->{bootindex}" if ($drive->{bootindex} &&
> + (-e '/usr/share/kvm/8xx_64.rom') );
> $scsicontroller->{$controller}=1;
> }
>
> --
> 1.7.2.5
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list