[et-mgmt-tools] [PATCH][virt-inst] add error message when the number of vcpus is out of range.
Hiroyuki Kaguchi
fj7025cf at aa.jp.fujitsu.com
Thu May 29 02:21:10 UTC 2008
Hi,
When the number of vcpus is out of range, the domain boots with vcpus=1
successfully.
This patch changes the policy that virt-install exits and shows error message.
Thanks,
Signed-off-by: Hiroyuki Kaguchi <fj7025cf at aa.jp.fujitsu.com>
diff -r 4776c61e0fa7 virtinst/cli.py
--- a/virtinst/cli.py Thu May 15 16:13:55 2008 -0400
+++ b/virtinst/cli.py Wed May 28 15:57:32 2008 +0900
@@ -183,11 +183,12 @@ def get_vcpus(vcpus, check_cpu, guest, c
vcpus = int(prompt_for_input(_("How many VCPUs should be attached?")))
except ValueError, e:
print _("ERROR: "), e
- if vcpus:
+ if vcpus is not None:
try:
guest.vcpus = vcpus
except ValueError, e:
print _("ERROR: "), e
+ sys.exit(1)
def get_cpuset(cpuset, mem, guest, conn):
if cpuset and cpuset != "auto":
More information about the et-mgmt-tools
mailing list