[pve-devel] [PATCH] add scsi boot workaround

Alexandre DERUMIER aderumier at odiso.com
Fri Dec 16 09:33:50 CET 2011


hotplug is only for virtio disk for the moment. (not sure it can be done for scsi devices).


----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Derumier Alexandre" <aderumier at odiso.com>, pve-devel at pve.proxmox.com 
Envoyé: Vendredi 16 Décembre 2011 06:42:34 
Objet: RE: [pve-devel] [PATCH] add scsi boot workaround 

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 





-- 

-- 




	
	Alexandre Derumier 
Ingénieur système 
e-mail : aderumier at odiso.com 
Tél : +33 (0)3 20 68 88 90 
Fax : +33 (0)3 20 68 90 81 
45 Bvd du Général Leclerc 
59100 ROUBAIX - FRANCE 













-------------- next part --------------
A non-text attachment was scrubbed...
Name: aderumier.vcf
Type: text/x-vcard
Size: 183 bytes
Desc: not available
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20111216/e0dd27dd/attachment.vcf>


More information about the pve-devel mailing list