[libvirt-users] Setting CPU type for a vm

Eric Blake eblake at redhat.com
Thu Jul 19 13:54:49 UTC 2012


On 07/18/2012 08:45 PM, Mauricio Tavares wrote:
>     I have a Windows XP vm and would like to know how should I set its
> cpu so it is seen by the vm as a proper 32bit one. In its xml file, I have
> 
>   <os>
>     <type arch='i686' machine='rhel6.2.0'>hvm</type>

That's the correct way.

> and this is what virsh thinks my vm has:
> 
> [root at vmhost ~]# virsh vcpuinfo xp
> VCPU:           0

This looks like a bug - a guest cannot exist without at least one vcpu.

> CPU:            2

That only says your host has 2 cpus that the guest can utilize; it says
nothing about what type of cpu the guest will see.

> 
> But, the vm reports it not only as a 286 but also claims not to have the
> right drivers for it. How can I make the vm see it as a 686 or something
> like that?

Huh?  The guest should be seeing it's CPU as a 686.  What is the actual
error message you are seeing?

Also, note that you need not constrain your guest cpu to i686 unless you
specifically plan to migrate your guest to a different host where the
host is running in 32-bit mode instead of the more typical 64-bit mode;
all 32-bit operating systems will run equally well on x86_64 cpus.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120719/26175850/attachment.sig>


More information about the libvirt-users mailing list