[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



From: Chen Hanxiao <chenhanxiao 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 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]