[libvirt-users] Preferred CPU model not allowed by hypervisor
by Jared
Hi, all. I posted this message to libvir-list last night, but just realized
that was geared toward development rather than support. Apologies to those
who are subscribed to both for the dupe.
I'm having a weird problem where libvirt/qemu/kvm won't let me use the model
processor I have defined in my domain's config file. Instead, I get the
error message in libvirtd.log that:
warning : x86Decode:1346 : Preferred CPU model Nehalem not allowed by
hypervisor; closest supported model will be used
If I review the qemu log for that particular domain, I see that my CPU has
been changed to this:
-cpu kvm64,+lahf_lm,+popcnt,+sse4.2,+sse4.1,+ssse3
(in other places, I see it set to core2duo rather than kvm64)
However, it *should* be Nehalem. For some background, I'm running kvm on a
westmere proc, which is the successor to Nehalem. I'm specifying Nehalem as
the target platform, though, to make it easier to migrate to another server
if necessary. I do have this same problem if I set this to Westmere,
though, so it's not unique to Nehalem.
As for support and capabilities, libvirt correctly detects my host CPU as
Westmere:
$ virsh capabilities | grep model
<model>Westmere</model>
qemu-kvm does (as far as I can tell) support Nehalem:
$ qemu-kvm -cpu ?model | grep Nehalem
x86 Nehalem Intel Core i7 9xx (Nehalem Class Core i7)
Nehalem is defined in qmeu's target-x86_64.conf:
grep Nehalem /etc/qemu/target-x86_64.conf
name = "Nehalem"
model_id = "Intel Core i7 9xx (Nehalem Class Core i7)"
And if I run a cpu check on the processor, it seems to work fine:
$ qemu-kvm -cpu Nehalem,check
VNC server running on `127.0.0.1:5900'
So, I I'm creating the new domain as a virt-install with the qemu-kvm
backend as follows:
virt-install --name=test --ram=1024 --arch=x86_64 --vcpus=2 --cpu=Nehalem
--virt-type=kvm <SNIP>
This results in the following cpu configuration:
<cpu mode='custom' match='exact'>
<model fallback='allow'>Nehalem</model>
</cpu>
But then, when I start this domain, I get the error message posted above.
Any ideas what's going on here? I'm at a loss, and unfortunately I don't
have much experience with kvm/libvirt just yet so I don't know what I should
be focusing on for troubleshooting. Would appreciate any suggestions or
guidance.
Thanks.
--
Jared
12 years, 5 months
[libvirt-users] duplicate domain ids!?
by matt cowan
Somehow I've ended up with duplicate domids. domid=15 name=node14
(names sanitized)
# virsh list --all
Id Name State
----------------------------------------------------
1 node1 running
2 node2 running
3 node3 running
5 node4 running
6 node5 running
7 node6 running
8 node7 running
9 node8 running
10 node9 running
11 node10 running
12 node11 running
13 node12 running
14 node13 running
15 node14 running
15 node14 running
16 node16 running
node15 is up and running, can ssh into it.
virt manager only lists 15 guests (ie, doesn't show the duplicate domid)
# virsh domid node14
15
# virsh domid node15
15
Doesn't *seem* to be causing a problem (other than above
virsh/virt-manager issues), but this shouldn't happen right?
Any potential for screwiness I should be concerned about? I was
actually checking that node15 (a test system we don't need running at
the moment) wasn't running when I noticed this; now I'm tempted to
just leave it be until a maintenance period when node14 (production db
server) can afford potential downtime, at which point I'd try
'shutdown -h now' within node14 and then 'virsh shutdown node15; virsh
start node14'?
node15 has been up for 9 days, other nodes for 50 days, so guess it's
been like this for 9 days. hrm... yum.log also shows libvirt-client
and libvirt-python were both updated 9 days ago.
suggestions?
thanks.
-matt
Scientific Linux release 6.2 (Carbon)
2.6.32-220.17.1.el6.x86_64
qemu-kvm-0.12.1.2-2.209.el6_2.4.x86_64
libvirt-0.9.10-21.el6.x86_64
libvirt-client-0.9.10-21.el6.x86_64
libvirt-python-0.9.10-21.el6.x86_64
virt-manager-0.9.0-7.el6.x86_64
python-virtinst-0.600.0-5.el6.noarch
12 years, 5 months
[libvirt-users] Virsh Failing to Snapshot VMWare VM with Multiple Disks
by Elizabeth Griffith
I am trying to use virsh's snapshot-create command on a VMWare vm that has multiple disks in its device list, but the command is failing with the error:
"Could not create snapshot: FileNotFound - file [pool] filename.vmx".
However, this command works if my vm only has one disk in its device list.
I am using libvirt 0.9.10, and the storage pool is nfs mounted between the machine that I am running virsh on and the hypervisor.
Can anyone tell me what I am doing wrong or if this is even supported by virsh?
Thanks.
12 years, 5 months
[libvirt-users] Matching host and guest CPU
by Alex
Hi,
I have an fc17 server with an Opteron 6128 with a few fc17/16 guests.
How can I be sure I'm best matching the guest CPU with that of the
server?
I've used virt-manager to create the guests, and it currently shows
the processor is a "Phenom(tm) 9550 Quad-Core":
processor : 1
vendor_id : AuthenticAMD
cpu family : 16
model : 2
model name : AMD Phenom(tm) 9550 Quad-Core Processor
stepping : 3
microcode : 0x1000065
cpu MHz : 2000.138
cache size : 512 KB
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext
fxsr_opt pdpe1gb lm rep_good nopl extd_apicid pni cx16 popcnt
hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse
3dnowprefetch npt
bogomips : 4000.27
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
The guests seem to run very slowly, and just wondered if this may be
the cause. Can someone recommend some basic optimizations I may
already be missing from my guest config?
<domain type='kvm'>
<name>boxtech-new</name>
<uuid>66887405-a34b-2ec2-1d6c-308aafb1f32e</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64' machine='pc-0.14'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu match='exact'>
<model>Opteron_G3</model>
<vendor>AMD</vendor>
<feature policy='require' name='skinit'/>
<feature policy='require' name='vme'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='fxsr_opt'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='ht'/>
<feature policy='require' name='3dnowprefetch'/>
<feature policy='require' name='3dnowext'/>
<feature policy='require' name='wdt'/>
<feature policy='require' name='extapic'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='osvw'/>
<feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='3dnow'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/boxtech-new.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
</disk>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:bc:55:64'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
</sound>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</memballoon>
</devices>
</domain>
Thanks,
Alex
12 years, 5 months
[libvirt-users] virsh define function question
by zhanggp
Hi,
How do I view the libvirt virsh domxml-to-native function implementation? I think this function contains some error.
Because we use libvirt to manage some host and vms on vmware hypervisor.
We use openenbula generate a template for libvirt ,such as my attachment windows2008.xml.
but when i use domxml-to-native to convert xml file to vmware config file vmx as below. This may not be accurate.
For example:
1. guestOs type : could I config this parameter in xml file ,so after domxml-to-native to vmware.vmx , guestOS in my vmx file is "windows7srv-64 ".
And also my pciBridge disappeared !
So could someone help me and tell us about 'virsh-c the esx :/ /@host?no_verify=1 define windows2008.xml' function realization。
Thanks all!
virsh # domxml-to-native vmware-vmx windows2008.xml
.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "7"
guestOS = "other-64"
uuid.bios = "42 11 25 27 fd b6 7b 6d-72 3f 75 c6 25 fe ef 3e"
displayName = "windows2008"
memsize = "2048"
numvcpus = "2"
sched.cpu.shares = "normal"
ide0:0.present = "true"
ide0:0.deviceType = "ata-hardDisk"
ide0:0.fileName = "/vmfs/volumes/349969f9-070dee8d/./windows2008.vmdk"
floppy0.present = "false"
floppy1.present = "false"
ethernet0.present = "true"
ethernet0.virtualDev = "e1000"
ethernet0.networkName = "VM Network"
ethernet0.connectionType = "bridged"
ethernet0.addressType = "vpx"
ethernet0.generatedAddress = "00:50:56:91:00:07"
svga.vramSize = "8388608"
zhanggp
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from
your system. Thank you.
---------------------------------------------------------------------------------------------------
12 years, 5 months
[libvirt-users] Questions related to the snapshot
by lin tan
Hi,
I faced two problems with the snapshot:
First issue, I can use the snapshot functions via the virsh correctly such
as snapshot-list. And when I removed the snapshot XML files from
/var/lib/libvirt/qemu/snapshot/**/, I don't see the snapshot of the Virtual
Machine any more. That's correct.
But after I copying the XML files back, I can't see the the snapshot as
well. Only if I restart my laptop can I see them. However, restarting is
what I want to avoid. Because I wish I could utilize the functions in a
server in the future.
Does anyone have ideas about this, Did I do something wrong or it's a
limitation.
So far, I am using the qemu-img command to check the snapshot and do the
revert without restarting my laptop. Because the snapshots are already
embedded in the img file.
Second issue, I find if I create the XML file of snapshot by using
getXMLDesc and output to a new file in python, there is a slightly
different. But, the new XML file can't be recognized even if I restart my
laptop. The new XML file miss the attribute <active> as far as I can see,
is it so important?
Here is one example:
The original XML in the default folder:
<domainsnapshot>
<name>Ex</name>
<description>Snapshot of OS updates</description>
<state>running</state>
<parent>
<name>1342427860</name>
</parent>
<creationTime>1342428835</creationTime>
<domain>
<uuid>2c853de2-6bba-ad26-bf05-0045e5f1beb9</uuid>
</domain>
<active>0</active>
</domainsnapshot>
The new XML file I created:
<domainsnapshot>
<name>Ex</name>
<description>Snapshot of OS updates</description>
<state>running</state>
<parent>
<name>1342427860</name>
</parent>
<creationTime>1342428835</creationTime>
<domain>
<uuid>2c853de2-6bba-ad26-bf05-0045e5f1beb9</uuid>
</domain>
</domainsnapshot>
Thank you so much.
Best Regards
Tan
12 years, 5 months
[libvirt-users] save / restore RAM state - Problem
by Evaggelos Balaskas
Hi all,
i am trying (test) to save / restore a state of a winxp virtual machine.
Perhaps i am missing that i can not restore save image to LVM partition.
"error: Failed to read file '/root/winxp.save': Value too large for
defined data type"
Below are my settings
libvirt 0.9.13
qemu-kvm 1.1.1
# virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # list
Id Name State
----------------------------------------------------
3 winxp running
virsh # save winxp /root/winxp.save
Domain winxp saved to /root/winxp.save
virsh # list
Id Name State
----------------------------------------------------
virsh # list --all
Id Name State
----------------------------------------------------
- winxp shut off
virsh # restore winxp /root/winxp.save
error: Failed to read file '/root/winxp.save': Value too large for
defined data type
# du -h /root/winxp.save
278M /root/winxp.save
# virsh dumpxml winxp | more
<domain type='kvm'>
<name>winxp</name>
<uuid>b528a71f-aca1-5024-c460-892100b97ef2</uuid>
<memory unit='KiB'>1597440</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc-1.1'>hvm</type>
<boot dev='hd'/>
</os>
--- Logical volume ---
LV Path /dev/vg01/winxp
LV Name winxp
VG Name vg01
LV UUID hrXdl6-oRMC-dl7l-mkad-SSDl-y1hf-1Q1MPp
LV Write Access read/write
LV Creation host, time mywork, 2012-03-16 10:54:08 +0200
LV Status available
# open 0
LV Size 5.00 GiB
Current LE 1280
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:4
--
Evaggelos Balaskas - Unix System Engineer
http://gr.linkedin.com/in/evaggelosbalaskas
12 years, 5 months
[libvirt-users] I can't virt-clone into an existing LVM now (ERROR: clone onto existing storage volume is not supported:) - i could in previous lbvirt versions? (deployment scripts no longer work...)
by Morgan Cox
Hi
To deploy KVM vms I use a KVM template + script - which is cloned, then
cloned again and resized - using virt-resize.
i.e
----------------------------------------------------
virt-clone --original debian6template-DONTSTART --name NAME.test -f
/dev/vgpool/NAME.test
virsh vol-create-as vgpool NAME 8G
virt-clone --original NAME.test --name NAME -f /dev/vgpool/NAME
virt-resize --expand /dev/sda1 /dev/vgpool/NAME.test /dev/vgpool/NAME
----------------------------------------------------
The reason I clone twice is because I know that virt-clone does things to
prep it for a new install, also the whole point was to be able to specify a
size to be clone into (hence the use of virt-resize)
This worked fine on our Ubuntu 11.10 server, however in Ubuntu 12.04 when I
try to do the same I get the error
'ERROR Clone onto existing storage volume is not supported:
'/dev/vgpool/test'
If I can't virt-clone into an existing LVM I know I can clone once - then
resize with LVM, then virt-resize into the partition (then virt-sysprep) -
however the issue with that is that it is far more fiddly to mange...
Previously could just make a 20GB partition and use virt-resize to expand
into - using the above method I would have to increase the LVM to the value
I want minus the size of the template..
i.e I have to specify - the amount to increase by, rather than the final
size I want.... The templates also change size (when I update them, etc)
which would mean re-writting the script after every update.
Is there a way I can re-enable being able to virt-clone to an existing LVM
partition ? As mentioned it works 100% fine in Ubuntu 10.04
Regards
12 years, 5 months
[libvirt-users] virDomainMemoryStats call
by Parakkal, Navin S
Hi,
I'm using the API virDomainMemoryStats to fetch memory stats for a domain/guest on Fedora 16/RHEL 6.3 . I don't get these counters filled up
VIR_DOMAIN_MEMORY_STAT_UNUSED, VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON,VIR_DOMAIN_MEMORY_STAT_AVAILABLE , VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT and VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT. The version of libvirt 0.9.11 on Fedora 16 . How to get all the counters filled up ? Should I take a specific version of qemu or should I do some config settings so that these values are filled up ?
P.S. Please copy me in reply
Regards,
Navin Parakkal
HP Software
12 years, 5 months
[libvirt-users] Attaching usb devices
by Mauricio Tavares
Is the only way to attach a usb device to a vm first specifying the device,
<hostdev mode='subsystem' type='usb' managed='no'>
<source>
<vendor id='0x3080'/>
<product id='0x1234'/>
</source>
</hostdev>
and then booting the vm while the device is attached? Can't I
attach/detach a USB device to the vm later? I did try the method
suggested in
http://david.wragg.org/blog/2009/03/usb-pass-through-with-libvirt-and-kvm...
but did not have much luck.
Also, can anyone explain me what happened in this log excerpt:
husb: open device 1.18
husb: grabbed usb device 1.18
husb: config #1 need 1
husb: 1 interfaces claimed for configuration 1
husb: device 1.18 disconnected
12 years, 5 months