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

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

 



From: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>
---
 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

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux