Review Request 12360: custom cpu model for kvm guest.the default model 'QEMU Virtual CPU version xxx' affect the activation of Windows OS and low performance.

2013-07-09 Thread Jijun Liu

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12360/
---

Review request for cloudstack, edison su, soren, and Wei Zhou.


Summary (updated)
-

custom cpu model for kvm guest.the default model 'QEMU Virtual CPU version xxx' 
affect the activation of Windows OS and low performance.


Repository: cloudstack-git


Description (updated)
---

Add cpu model for kvm guest.Now all the kvm guest's cpu model is 'QEMU Virtual 
CPU version xxx'. This will affect the activation of Windows OS and low 
performance. I add three mode for user to indicate the guest cpu model. some 
ideas come from openstack and libvirt.
user can uncomment guest.cpu.mode and guest.cpu.model in agent.properties to 
enable this feature.it is disabled by default.
some details as follows:
custom - user custom the CPU model which specified by guest.cpu.model.
host-model - identify the named CPU model which most closely matches the host, 
and then request additional CPU flags to complete the match. This should give 
close to maximum functionality/performance, which maintaining good 
reliability/compatibility if the guest is migrated to another host with 
slightly different host CPUs.
host-passthrough - tell KVM to passthrough the host CPU with no modifications. 
The difference to host-model, instead of just matching feature flags, every 
last detail of the host CPU is matched. This gives absolutely best 
performance,and can be important to some apps which check low level CPU 
details, but it comes at a cost wrt migration. The guest can only be migrated 
to an exactly matching host CPU. 


Diffs (updated)
-

  agent/conf/agent.properties 60030ae 
  
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 914017c 
  
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
5120870 
  
plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
 2c0ff8d 

Diff: https://reviews.apache.org/r/12360/diff/


Testing (updated)
---

1.set guest.cpu.mode=custom,guest.cpu.model=Nehalem in agent.properties,you can 
get more guest.cpu.model by execute virsh capabilities .create a new vm 
instance or reboot your vm instance,the guest's cpu model will change as 
guest.cpu.model specified.
2.set guest.cpu.mode=host-model,create a new vm instance or reboot your vm 
instance the guest's cpu model will be a closely cpu model as your hypervisor.
3.set guest.cpu.mode=host-passthrough,create a new vm instance or reboot your 
vm instance,the guest's cpu model should be the cpu model as your hypervisor.


Thanks,

Jijun Liu



Re: Review Request 12360: custom cpu model for kvm guest.the default model 'QEMU Virtual CPU version xxx' affect the activation of Windows OS and low performance.

2013-07-09 Thread Wei Zhou

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12360/#review22949
---



plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java


It is mentioned in http://libvirt.org/formatdomain.html that "Since 0.9.10, 
an optional mode attribute may be used to make it easier to configure a guest 
CPU to be as close to host CPU as possible". Hence, I think it is better to 
compare _libvirtVersion here. This feature supports from libvirt 0.9.10.


- Wei Zhou


On July 10, 2013, 3 a.m., Jijun Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12360/
> ---
> 
> (Updated July 10, 2013, 3 a.m.)
> 
> 
> Review request for cloudstack, edison su, soren, and Wei Zhou.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> ---
> 
> Add cpu model for kvm guest.Now all the kvm guest's cpu model is 'QEMU 
> Virtual CPU version xxx'. This will affect the activation of Windows OS and 
> low performance. I add three mode for user to indicate the guest cpu model. 
> some ideas come from openstack and libvirt.
> user can uncomment guest.cpu.mode and guest.cpu.model in agent.properties to 
> enable this feature.it is disabled by default.
> some details as follows:
> custom - user custom the CPU model which specified by guest.cpu.model.
> host-model - identify the named CPU model which most closely matches the 
> host, and then request additional CPU flags to complete the match. This 
> should give close to maximum functionality/performance, which maintaining 
> good reliability/compatibility if the guest is migrated to another host with 
> slightly different host CPUs.
> host-passthrough - tell KVM to passthrough the host CPU with no 
> modifications. The difference to host-model, instead of just matching feature 
> flags, every last detail of the host CPU is matched. This gives absolutely 
> best performance,and can be important to some apps which check low level CPU 
> details, but it comes at a cost wrt migration. The guest can only be migrated 
> to an exactly matching host CPU. 
> 
> 
> Diffs
> -
> 
>   agent/conf/agent.properties 60030ae 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
>  914017c 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
>  5120870 
>   
> plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
>  2c0ff8d 
> 
> Diff: https://reviews.apache.org/r/12360/diff/
> 
> 
> Testing
> ---
> 
> 1.set guest.cpu.mode=custom,guest.cpu.model=Nehalem in agent.properties,you 
> can get more guest.cpu.model by execute virsh capabilities .create a new vm 
> instance or reboot your vm instance,the guest's cpu model will change as 
> guest.cpu.model specified.
> 2.set guest.cpu.mode=host-model,create a new vm instance or reboot your vm 
> instance the guest's cpu model will be a closely cpu model as your hypervisor.
> 3.set guest.cpu.mode=host-passthrough,create a new vm instance or reboot your 
> vm instance,the guest's cpu model should be the cpu model as your hypervisor.
> 
> 
> Thanks,
> 
> Jijun Liu
> 
>



Re: Review Request 12360: custom cpu model for kvm guest.the default model 'QEMU Virtual CPU version xxx' affect the activation of Windows OS and low performance.

2013-07-11 Thread Jijun Liu


> On July 10, 2013, 6:50 a.m., Wei Zhou wrote:
> > plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java,
> >  line 956
> > 
> >
> > It is mentioned in http://libvirt.org/formatdomain.html that "Since 
> > 0.9.10, an optional mode attribute may be used to make it easier to 
> > configure a guest CPU to be as close to host CPU as possible". Hence, I 
> > think it is better to compare _libvirtVersion here. This feature supports 
> > from libvirt 0.9.10.

i will do the version check in LibvirtComputingResource.java.


- Jijun


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12360/#review22949
---


On July 10, 2013, 3 a.m., Jijun Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12360/
> ---
> 
> (Updated July 10, 2013, 3 a.m.)
> 
> 
> Review request for cloudstack, edison su, soren, and Wei Zhou.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> ---
> 
> Add cpu model for kvm guest.Now all the kvm guest's cpu model is 'QEMU 
> Virtual CPU version xxx'. This will affect the activation of Windows OS and 
> low performance. I add three mode for user to indicate the guest cpu model. 
> some ideas come from openstack and libvirt.
> user can uncomment guest.cpu.mode and guest.cpu.model in agent.properties to 
> enable this feature.it is disabled by default.
> some details as follows:
> custom - user custom the CPU model which specified by guest.cpu.model.
> host-model - identify the named CPU model which most closely matches the 
> host, and then request additional CPU flags to complete the match. This 
> should give close to maximum functionality/performance, which maintaining 
> good reliability/compatibility if the guest is migrated to another host with 
> slightly different host CPUs.
> host-passthrough - tell KVM to passthrough the host CPU with no 
> modifications. The difference to host-model, instead of just matching feature 
> flags, every last detail of the host CPU is matched. This gives absolutely 
> best performance,and can be important to some apps which check low level CPU 
> details, but it comes at a cost wrt migration. The guest can only be migrated 
> to an exactly matching host CPU. 
> 
> 
> Diffs
> -
> 
>   agent/conf/agent.properties 60030ae 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
>  914017c 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
>  5120870 
>   
> plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
>  2c0ff8d 
> 
> Diff: https://reviews.apache.org/r/12360/diff/
> 
> 
> Testing
> ---
> 
> 1.set guest.cpu.mode=custom,guest.cpu.model=Nehalem in agent.properties,you 
> can get more guest.cpu.model by execute virsh capabilities .create a new vm 
> instance or reboot your vm instance,the guest's cpu model will change as 
> guest.cpu.model specified.
> 2.set guest.cpu.mode=host-model,create a new vm instance or reboot your vm 
> instance the guest's cpu model will be a closely cpu model as your hypervisor.
> 3.set guest.cpu.mode=host-passthrough,create a new vm instance or reboot your 
> vm instance,the guest's cpu model should be the cpu model as your hypervisor.
> 
> 
> Thanks,
> 
> Jijun Liu
> 
>



Re: Review Request 12360: custom cpu model for kvm guest.the default model 'QEMU Virtual CPU version xxx' affect the activation of Windows OS and low performance.

2013-07-13 Thread Jijun Liu

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12360/
---

(Updated July 14, 2013, 3:38 a.m.)


Review request for cloudstack, edison su, soren, and Wei Zhou.


Changes
---

add libvirt version check


Repository: cloudstack-git


Description
---

Add cpu model for kvm guest.Now all the kvm guest's cpu model is 'QEMU Virtual 
CPU version xxx'. This will affect the activation of Windows OS and low 
performance. I add three mode for user to indicate the guest cpu model. some 
ideas come from openstack and libvirt.
user can uncomment guest.cpu.mode and guest.cpu.model in agent.properties to 
enable this feature.it is disabled by default.
some details as follows:
custom - user custom the CPU model which specified by guest.cpu.model.
host-model - identify the named CPU model which most closely matches the host, 
and then request additional CPU flags to complete the match. This should give 
close to maximum functionality/performance, which maintaining good 
reliability/compatibility if the guest is migrated to another host with 
slightly different host CPUs.
host-passthrough - tell KVM to passthrough the host CPU with no modifications. 
The difference to host-model, instead of just matching feature flags, every 
last detail of the host CPU is matched. This gives absolutely best 
performance,and can be important to some apps which check low level CPU 
details, but it comes at a cost wrt migration. The guest can only be migrated 
to an exactly matching host CPU. 


Diffs (updated)
-

  agent/conf/agent.properties 60030ae 
  
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 24f9ee0 
  
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
5120870 
  
plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
 2c0ff8d 

Diff: https://reviews.apache.org/r/12360/diff/


Testing
---

1.set guest.cpu.mode=custom,guest.cpu.model=Nehalem in agent.properties,you can 
get more guest.cpu.model by execute virsh capabilities .create a new vm 
instance or reboot your vm instance,the guest's cpu model will change as 
guest.cpu.model specified.
2.set guest.cpu.mode=host-model,create a new vm instance or reboot your vm 
instance the guest's cpu model will be a closely cpu model as your hypervisor.
3.set guest.cpu.mode=host-passthrough,create a new vm instance or reboot your 
vm instance,the guest's cpu model should be the cpu model as your hypervisor.


Thanks,

Jijun Liu



Re: Review Request 12360: custom cpu model for kvm guest.the default model 'QEMU Virtual CPU version xxx' affect the activation of Windows OS and low performance.

2013-07-17 Thread Wei Zhou

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12360/#review23262
---


It looks fine.
Anyone want to verify it? I do not have Windows templates.

- Wei Zhou


On July 14, 2013, 3:38 a.m., Jijun Liu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12360/
> ---
> 
> (Updated July 14, 2013, 3:38 a.m.)
> 
> 
> Review request for cloudstack, edison su, soren, and Wei Zhou.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> ---
> 
> Add cpu model for kvm guest.Now all the kvm guest's cpu model is 'QEMU 
> Virtual CPU version xxx'. This will affect the activation of Windows OS and 
> low performance. I add three mode for user to indicate the guest cpu model. 
> some ideas come from openstack and libvirt.
> user can uncomment guest.cpu.mode and guest.cpu.model in agent.properties to 
> enable this feature.it is disabled by default.
> some details as follows:
> custom - user custom the CPU model which specified by guest.cpu.model.
> host-model - identify the named CPU model which most closely matches the 
> host, and then request additional CPU flags to complete the match. This 
> should give close to maximum functionality/performance, which maintaining 
> good reliability/compatibility if the guest is migrated to another host with 
> slightly different host CPUs.
> host-passthrough - tell KVM to passthrough the host CPU with no 
> modifications. The difference to host-model, instead of just matching feature 
> flags, every last detail of the host CPU is matched. This gives absolutely 
> best performance,and can be important to some apps which check low level CPU 
> details, but it comes at a cost wrt migration. The guest can only be migrated 
> to an exactly matching host CPU. 
> 
> 
> Diffs
> -
> 
>   agent/conf/agent.properties 60030ae 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
>  24f9ee0 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
>  5120870 
>   
> plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
>  2c0ff8d 
> 
> Diff: https://reviews.apache.org/r/12360/diff/
> 
> 
> Testing
> ---
> 
> 1.set guest.cpu.mode=custom,guest.cpu.model=Nehalem in agent.properties,you 
> can get more guest.cpu.model by execute virsh capabilities .create a new vm 
> instance or reboot your vm instance,the guest's cpu model will change as 
> guest.cpu.model specified.
> 2.set guest.cpu.mode=host-model,create a new vm instance or reboot your vm 
> instance the guest's cpu model will be a closely cpu model as your hypervisor.
> 3.set guest.cpu.mode=host-passthrough,create a new vm instance or reboot your 
> vm instance,the guest's cpu model should be the cpu model as your hypervisor.
> 
> 
> Thanks,
> 
> Jijun Liu
> 
>



Re: Review Request 12360: custom cpu model for kvm guest.the default model 'QEMU Virtual CPU version xxx' affect the activation of Windows OS and low performance.

2013-08-02 Thread Wei Zhou

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12360/#review24514
---

Ship it!


Ship It!

- Wei Zhou


On July 14, 2013, 3:38 a.m., Jijun wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12360/
> ---
> 
> (Updated July 14, 2013, 3:38 a.m.)
> 
> 
> Review request for cloudstack, edison su, soren, and Wei Zhou.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> ---
> 
> Add cpu model for kvm guest.Now all the kvm guest's cpu model is 'QEMU 
> Virtual CPU version xxx'. This will affect the activation of Windows OS and 
> low performance. I add three mode for user to indicate the guest cpu model. 
> some ideas come from openstack and libvirt.
> user can uncomment guest.cpu.mode and guest.cpu.model in agent.properties to 
> enable this feature.it is disabled by default.
> some details as follows:
> custom - user custom the CPU model which specified by guest.cpu.model.
> host-model - identify the named CPU model which most closely matches the 
> host, and then request additional CPU flags to complete the match. This 
> should give close to maximum functionality/performance, which maintaining 
> good reliability/compatibility if the guest is migrated to another host with 
> slightly different host CPUs.
> host-passthrough - tell KVM to passthrough the host CPU with no 
> modifications. The difference to host-model, instead of just matching feature 
> flags, every last detail of the host CPU is matched. This gives absolutely 
> best performance,and can be important to some apps which check low level CPU 
> details, but it comes at a cost wrt migration. The guest can only be migrated 
> to an exactly matching host CPU. 
> 
> 
> Diffs
> -
> 
>   agent/conf/agent.properties 60030ae 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
>  24f9ee0 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
>  5120870 
>   
> plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
>  2c0ff8d 
> 
> Diff: https://reviews.apache.org/r/12360/diff/
> 
> 
> Testing
> ---
> 
> 1.set guest.cpu.mode=custom,guest.cpu.model=Nehalem in agent.properties,you 
> can get more guest.cpu.model by execute virsh capabilities .create a new vm 
> instance or reboot your vm instance,the guest's cpu model will change as 
> guest.cpu.model specified.
> 2.set guest.cpu.mode=host-model,create a new vm instance or reboot your vm 
> instance the guest's cpu model will be a closely cpu model as your hypervisor.
> 3.set guest.cpu.mode=host-passthrough,create a new vm instance or reboot your 
> vm instance,the guest's cpu model should be the cpu model as your hypervisor.
> 
> 
> Thanks,
> 
> Jijun
> 
>



Re: Review Request 12360: custom cpu model for kvm guest.the default model 'QEMU Virtual CPU version xxx' affect the activation of Windows OS and low performance.

2013-08-02 Thread Wei Zhou


> On Aug. 2, 2013, 9:57 a.m., Wei Zhou wrote:
> > Ship It!

committed: 2903bb5fd9d59803980102854d11e33ebe56088b in master, and 
725d281cb28c89b8f1536de769d7acf87f53fbe6 in 4.2


- Wei


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12360/#review24514
---


On July 14, 2013, 3:38 a.m., Jijun wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12360/
> ---
> 
> (Updated July 14, 2013, 3:38 a.m.)
> 
> 
> Review request for cloudstack, edison su, soren, and Wei Zhou.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> ---
> 
> Add cpu model for kvm guest.Now all the kvm guest's cpu model is 'QEMU 
> Virtual CPU version xxx'. This will affect the activation of Windows OS and 
> low performance. I add three mode for user to indicate the guest cpu model. 
> some ideas come from openstack and libvirt.
> user can uncomment guest.cpu.mode and guest.cpu.model in agent.properties to 
> enable this feature.it is disabled by default.
> some details as follows:
> custom - user custom the CPU model which specified by guest.cpu.model.
> host-model - identify the named CPU model which most closely matches the 
> host, and then request additional CPU flags to complete the match. This 
> should give close to maximum functionality/performance, which maintaining 
> good reliability/compatibility if the guest is migrated to another host with 
> slightly different host CPUs.
> host-passthrough - tell KVM to passthrough the host CPU with no 
> modifications. The difference to host-model, instead of just matching feature 
> flags, every last detail of the host CPU is matched. This gives absolutely 
> best performance,and can be important to some apps which check low level CPU 
> details, but it comes at a cost wrt migration. The guest can only be migrated 
> to an exactly matching host CPU. 
> 
> 
> Diffs
> -
> 
>   agent/conf/agent.properties 60030ae 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
>  24f9ee0 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
>  5120870 
>   
> plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
>  2c0ff8d 
> 
> Diff: https://reviews.apache.org/r/12360/diff/
> 
> 
> Testing
> ---
> 
> 1.set guest.cpu.mode=custom,guest.cpu.model=Nehalem in agent.properties,you 
> can get more guest.cpu.model by execute virsh capabilities .create a new vm 
> instance or reboot your vm instance,the guest's cpu model will change as 
> guest.cpu.model specified.
> 2.set guest.cpu.mode=host-model,create a new vm instance or reboot your vm 
> instance the guest's cpu model will be a closely cpu model as your hypervisor.
> 3.set guest.cpu.mode=host-passthrough,create a new vm instance or reboot your 
> vm instance,the guest's cpu model should be the cpu model as your hypervisor.
> 
> 
> Thanks,
> 
> Jijun
> 
>



Re: Review Request 12360: custom cpu model for kvm guest.the default model 'QEMU Virtual CPU version xxx' affect the activation of Windows OS and low performance.

2013-08-02 Thread Jenkins Cloudstack.org

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12360/#review24525
---


Review 12360 failed the build test : FAILURE
The url of build cloudstack-master-with-patch #107 is : 
http://jenkins.cloudstack.org/job/cloudstack-master-with-patch/107/

- Jenkins Cloudstack.org


On July 14, 2013, 3:38 a.m., Jijun wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12360/
> ---
> 
> (Updated July 14, 2013, 3:38 a.m.)
> 
> 
> Review request for cloudstack, edison su, soren, and Wei Zhou.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> ---
> 
> Add cpu model for kvm guest.Now all the kvm guest's cpu model is 'QEMU 
> Virtual CPU version xxx'. This will affect the activation of Windows OS and 
> low performance. I add three mode for user to indicate the guest cpu model. 
> some ideas come from openstack and libvirt.
> user can uncomment guest.cpu.mode and guest.cpu.model in agent.properties to 
> enable this feature.it is disabled by default.
> some details as follows:
> custom - user custom the CPU model which specified by guest.cpu.model.
> host-model - identify the named CPU model which most closely matches the 
> host, and then request additional CPU flags to complete the match. This 
> should give close to maximum functionality/performance, which maintaining 
> good reliability/compatibility if the guest is migrated to another host with 
> slightly different host CPUs.
> host-passthrough - tell KVM to passthrough the host CPU with no 
> modifications. The difference to host-model, instead of just matching feature 
> flags, every last detail of the host CPU is matched. This gives absolutely 
> best performance,and can be important to some apps which check low level CPU 
> details, but it comes at a cost wrt migration. The guest can only be migrated 
> to an exactly matching host CPU. 
> 
> 
> Diffs
> -
> 
>   agent/conf/agent.properties 60030ae 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
>  24f9ee0 
>   
> plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
>  5120870 
>   
> plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java
>  2c0ff8d 
> 
> Diff: https://reviews.apache.org/r/12360/diff/
> 
> 
> Testing
> ---
> 
> 1.set guest.cpu.mode=custom,guest.cpu.model=Nehalem in agent.properties,you 
> can get more guest.cpu.model by execute virsh capabilities .create a new vm 
> instance or reboot your vm instance,the guest's cpu model will change as 
> guest.cpu.model specified.
> 2.set guest.cpu.mode=host-model,create a new vm instance or reboot your vm 
> instance the guest's cpu model will be a closely cpu model as your hypervisor.
> 3.set guest.cpu.mode=host-passthrough,create a new vm instance or reboot your 
> vm instance,the guest's cpu model should be the cpu model as your hypervisor.
> 
> 
> Thanks,
> 
> Jijun
> 
>