[pve-devel] [PATCH 10/11] add balloon device
Derumier Alexandre
aderumier at odiso.com
Wed Sep 7 15:34:45 CEST 2011
new vm config option:
balloon: 1/0 enable/disable balloon device
Signed-off-by: Derumier Alexandre <aderumier at odiso.com>
---
PVE/QemuServer.pm | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 5cce444..07bc7f1 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -296,6 +296,12 @@ EODESC
type => 'string',
description => "Action on watchdog event reset/shutdown/poweroff/pause/debug/none",
},
+ balloon => {
+ optional => 1,
+ type => 'boolean',
+ description => "Enable/disable Balloon device.",
+ default => 1,
+ },
hostpci => {
optional => 1,
type => 'string', format => 'pve-qm-hostpci',
@@ -2037,6 +2043,10 @@ sub config_to_command {
my $kb = $conf->{keyboard} || $defaults->{keyboard};
push @$cmd, '-k', $kb if $kb;
+ # enable balloon device
+ my $balloon = $conf->{balloon} || $defaults->{balloon};
+ push @$cmd, '-device', 'virtio-balloon-pci,id=balloon0';
+
# enable watchdog device
my $watchdog = $conf->{watchdog} || $defaults->{watchdog};
push @$cmd, '-device', $watchdog.',id=watchdog0' if $watchdog;
--
1.7.2.5
More information about the pve-devel
mailing list