[pve-devel] [PATCH 6/6] hot-unplug : add some warnings for differents guest os
Dietmar Maurer
dietmar at proxmox.com
Tue Feb 19 10:37:01 CET 2013
Why do we need warnings? Users don't see those warnings anyways?
> -----Original Message-----
> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> bounces at pve.proxmox.com] On Behalf Of Alexandre Derumier
> Sent: Dienstag, 19. Februar 2013 10:22
> To: pve-devel at pve.proxmox.com
> Subject: [pve-devel] [PATCH 6/6] hot-unplug : add some warnings for
> differents guest os
>
>
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
> PVE/API2/Qemu.pm | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index
> 71d39a9..daada76 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -646,8 +646,17 @@ my $vmconfig_delete_option = sub {
> $rpcenv->check($authuser, "/storage/$sid", ['Datastore.Allocate']);
> }
> }
> -
> - die "error hot-unplug $opt" if
> !PVE::QemuServer::vm_deviceunplug($vmid, $conf, $opt);
> +
> + my $unplugwarning = "";
> + if($conf->{ostype} && $conf->{ostype} eq 'l26'){
> + $unplugwarning = "<br>verify that you have acpiphp && pci_hotplug
> modules loaded in your guest VM";
> + }elsif($conf->{ostype} && $conf->{ostype} eq 'l24'){
> + $unplugwarning = "<br>kernel 2.4 don't support hotplug, please
> disable hotplug in options";
> + }elsif(!$conf->{ostype} || ($conf->{ostype} && $conf->{ostype} eq
> 'other')){
> + $unplugwarning = "<br>verify that your guest support acpi hotplug";
> + }
> +
> + die "error hot-unplug $opt $unplugwarning" if
> + !PVE::QemuServer::vm_deviceunplug($vmid, $conf, $opt);
>
> PVE::QemuServer::vm_deviceplug(undef, $conf, $vmid, $opt) if $opt eq
> 'tablet';
>
> --
> 1.7.10.4
>
> _______________________________________________
> 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