[virt-tools-list] [virt-manager PATCH 1/2] virt-install: add support for option "--cpu host-model-basic"

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Mon Jan 27 07:48:48 UTC 2014


From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>

commit 7003a3a52821e2813d41989ab7a88d2b7aa590f1 introduced
a "nearest host cpu model" option.
This patch add an option "--cpu host-model-basic" to virt-install.

Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 virtinst/cli.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/virtinst/cli.py b/virtinst/cli.py
index e4d20d9..5bb7954 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -1435,6 +1435,9 @@ class ParserCPU(VirtCLIParser):
             ignore = cliname
             if val == "host":
                 inst.cpu.copy_host_cpu()
+            elif (val == "host-model-basic" and
+                  self.guest.conn.caps.host.cpu.model):
+                inst.cpu.model = self.guest.conn.caps.host.cpu.model
             else:
                 inst.cpu.model = val
 
-- 
1.8.2.1




More information about the virt-tools-list mailing list