[virt-tools-list] [virt-tool-list][PATCH]virt-manager: use host CPU configuration when creating new VM

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Tue Nov 19 05:45:38 UTC 2013


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

This patch will use host CPU configuration automatically
when creating new VM.

It's also a better way than using cpu mode='host-model'.
(see http://libvirt.org/formatdomain.html#elementsCPU)

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

diff --git a/virtManager/create.py b/virtManager/create.py
index 0aecb87..e6cabb9 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
@@ -1822,6 +1822,8 @@ class vmmCreate(vmmGObjectUI):
             return False
 
         self.rebuild_guest()
+        # Copy host CPU configuration when creating new VM
+        self.guest.cpu.copy_host_cpu()
         guest = self.guest
         disk = len(guest.disks) and guest.disks[0]
 
-- 
1.8.2.1




More information about the virt-tools-list mailing list