Comment 3 for bug 1561019

Revision history for this message
Felipe Reyes (freyes) wrote : Re: [Bug 1561019] Re: copied cpu flags don't match host cpu

On Tue, 12 Apr 2016 16:49:39 -0000
ChristianEhrhardt <email address hidden> wrote:

> Hi,
> if no cpu model is set the default is qemu64 which is rather
> conservative for
> - maximum migratability
> - guaranteeing the same feature set will be available wherever you
> start your KVM
>
> But I thought svm/vmx would be part of that set.
>
> A short test at least on Xenial proved my assumption that for me that
> is flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl
> pni vmx cx16 x2apic popcnt hypervisor lahf_lm abm tpr_shadow vnmi
> flexpriority ept vpid Which contains vmx and kvm-ok is happy.
>
> Could you provide a "cat /proc/cpuinfo" of host and guest as well as
> the full commandline that libvirt generated for you?
Here is the output of cpuinfo (see attachment). And the qemu command
line generated is:

qemu-system-x86_64 -enable-kvm -name lp1561019 -S -machine \
   pc-i440fx-vivid,accel=kvm,usb=off -m 2048 -realtime \
   mlock=off -smp 2,sockets=2,cores=1,threads=1 \
   -uuid 464aa942-ff3d-4e37-b2f0-93b47b029e56 \
   -no-user-config -nodefaults -chardev \
   socket,id=charmonitor,path=/var/lib/libvirt/qemu/lp1561019.monitor,server,nowait \
   -mon chardev=charmonitor,id=monitor,mode=control \
   -rtc base=utc -no-shutdown -boot strict=on \
   -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive \
   file=/var/lib/uvtool/libvirt/images/lp1561019.qcow,if=none,id=drive-virtio-disk0,format=qcow2 \
   -device \
   virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
   -drive \
   file=/var/lib/uvtool/libvirt/images/lp1561019-ds.qcow,if=none,id=drive-virtio-disk1,format=raw \
   -device \
   virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 \
   -netdev tap,fd=27,id=hostnet0,vhost=on,vhostfd=28 -device \
   virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:74:40:d0,bus=pci.0,addr=0x3 \
   -chardev pty,id=charserial0 -device \
   isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:1 \
   -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device \
   virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -msg timestamp=on

Also here is the xml generated by libvirt can be found at http://paste.ubuntu.com/15856773/

The command line I used to create this vm was:
$ uvt-kvm create --memory 2048 --cpu 2 lp1561019 release=trusty arch=amd64

Using virt-manager for the bootstrap of the VM doesn't produce different results.

Best,
--
Felipe Reyes
Software Sustaining Engineer @ Canonical
STS Engineering Team
# Email: <email address hidden> (GPG:0x9B1FFF39)
# Phone: +56 9 7640 7887
# Launchpad: ~freyes | IRC: freyes