[libvirt-users] build error on CentOS 5
by Ben Clay
I'm getting the following error when building libvirt 10.2 from source in
CentOS 5:
CC libvirt_util_la-processinfo.lo
util/processinfo.c: In function 'virProcessInfoGetAffinity':
util/processinfo.c:164: error: invalid operands to binary |
The line in question is:
162 for (i = 0 ; i < maxcpu ; i++)
163 if (CPU_ISSET(i, &mask))
164 VIR_USE_CPU(map, i);
Where VIR_USE_CPU is defined as the following in libvirt.h:
#define VIR_USE_CPU(cpumap,cpu) (cpumap[(cpu)/8] |= (1<<((cpu)%8)))
I have glibc 2.5 installed, which is why CPU_ALLOC is undefined (added in
2.7). I'm also using a custom 2.6.32 kernel. I can provide configure
output and any additional system details if necessary.
Has anyone else seen this?
Ben Clay
rbclay(a)ncsu.edu
12 years
[libvirt-users] numa topology within domain XML
by Geert Geurts
Hello all,
I'm trying to setup a NUMA topology identical as the machine which hosts
the qemu-kvm VirtualMachine.
numactl -H on the host:
available: 8 nodes (0-7)
node 0 cpus: 0 1 2 3 4 5
node 0 size: 8189 MB
node 0 free: 7581 MB
node 1 cpus: 6 7 8 9 10 11
node 1 size: 8192 MB
node 1 free: 7061 MB
node 2 cpus: 12 13 14 15 16 17
node 2 size: 8192 MB
node 2 free: 6644 MB
node 3 cpus: 18 19 20 21 22 23
node 3 size: 8192 MB
node 3 free: 7747 MB
node 4 cpus: 24 25 26 27 28 29
node 4 size: 8192 MB
node 4 free: 7388 MB
node 5 cpus: 30 31 32 33 34 35
node 5 size: 8192 MB
node 5 free: 7593 MB
node 6 cpus: 36 37 38 39 40 41
node 6 size: 8192 MB
node 6 free: 3848 MB
node 7 cpus: 42 43 44 45 46 47
node 7 size: 8192 MB
node 7 free: 7502 MB
node distances:
node 0 1 2 3 4 5 6 7
0: 10 16 16 22 16 22 16 22
1: 16 10 22 16 22 16 22 16
2: 16 22 10 16 16 22 16 22
3: 22 16 16 10 22 16 22 16
4: 16 22 16 22 10 16 16 22
5: 22 16 22 16 16 10 22 16
6: 16 22 16 22 16 22 10 16
7: 22 16 22 16 22 16 16 10
I would like to use 2 numanodes for one VM but somehow the virsh edit
DOMAIN command doesn't apply the changes I make...
I tried specifying the numa topology within the <topology> sub-section
of the <cpu> section as in:
<cpu mode='custom' match='exact'>
<model fallback='allow'>Opteron_G4</model>
<vendor>AMD</vendor>
<topology sockets='1' cores='6' threads='2'>
<cells num='2'>
<cell id='0'>
<cpus num='6'>
<cpu id='0'/>
<cpu id='1'/>
<cpu id='2'/>
<cpu id='3'/>
<cpu id='4'/>
<cpu id='5'/>
</cpus>
</cell>
<cell id='1'>
<cpus num='6'>
<cpu id='6'/>
<cpu id='7'/>
<cpu id='8'/>
<cpu id='9'/>
<cpu id='10'/>
<cpu id='11'/>
</cpus>
</cell>
</cells>
</topology>
<feature policy='require' name='nodeid_msr'/>
<feature policy='require' name='wdt'/>
<feature policy='require' name='skinit'/>
<feature policy='require' name='ibs'/>
<feature policy='require' name='osvw'/>
<feature policy='require' name='cr8legacy'/>
<feature policy='require' name='extapic'/>
<feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='fxsr_opt'/>
<feature policy='require' name='mmxext'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='ht'/>
<feature policy='require' name='vme'/>
</cpu>
I tried specifying each numa cell using a <numa></numa> section as in:
<numa>
<cell cpus='0-5' memory='7596032'/>
<cell cpus='6-11' memory='7596032'/>
</numa>
In both situation virsh says it successfully applied the edit, but when
I edit it again right after that the changes have been removed and the
numa topology in the VM is one node with all cores.
Could someone please tell me what I'm doing wrong here?
Oooh, by the way, I'm using libvirt 0.10.2-0rc2 and
qemu-kvm-0.12.1.2-2.295.el6_3.2 on a Scientific linux 6.2 machine.
Thanks!
Best regards,
Geert Geurts
12 years
Re: [libvirt-users] libvirt-users Digest, Vol 34, Issue 35
by Gao Yongwei
2012/10/31 Chandana De Silva <chandana(a)desilva.id.au>
> You _can_ do NAT.
>
> Set up a different libvirt network on each machine, like this;
> 10.128.80.65 will have a libvirt network 192.168.65.0/24
> 10.128.80.66 will have a libvirt network 192.168.66.0/24
>
> Set up each of these networks as routed networks.
>
> Now set up routing/iptables rules on each host to send traffic to each
> other, and NAT into the internal routed network
>
> On 31/10/12 01:46, libvirt-users-request(a)redhat.**com<libvirt-users-request(a)redhat.com>wrote:
>
>> Message: 1
>> Date: Tue, 30 Oct 2012 07:10:55 +0000
>> From: ??<zhang_zhang(a)live.com>
>> To:<libvirt-users(a)redhat.com>
>> Subject: [libvirt-users] Can VMs on different machines communicate
>> with each other without IP?
>> Message-ID:<BLU172-**W4666B32A6C9C8E75734C67FC620(a)**phx.gbl>
>> Content-Type: text/plain; charset="gb2312"
>>
>>
>> Dear all,
>> I confront a somehow strange situation:
>> I have two machines configured with ip 10.128.80.65 and
>> 10.128.80.66 respectively. Each has several VMs running on it. The problem
>> is that I have no more ip ( such as 10.128.80.67...) to allocate to VMs,
>> but VMs need to communicate with each other even when they are on different
>> machines.
>> Two network options exist: NAT and bridge.
>> 1) NAT
>> But VMs on different machine cannot communicate with each other.
>> 2)bridge
>> But there is no more ip for vm to be bridged to host machine.
>> Is there any other way to work around this problem?
>>
>>
>> many thanks!
>>
>
> you can custom your iptable rules to solve it,i've noticed that you've got
a method which from my blog,good luck!
12 years
[libvirt-users] libvirt python api error
by 宣铭艺
I use the code below:
import libvirt
auth =
[[libvirt.VIR_CRED_AUTHNAME,libvirt.VIR_CRED_NOECHOPROMPT],'root',None]
conn = libvirt.openAuth("qemu:///system",auth,0)
with open("/root/cflinux.xml") as f:
xml=f.read()
domain = conn.defineXML(xml)
domain.createWithFlags(0)
and report the error:
libvir: Security Labeling error : internal error cannot load AppArmor
profile 'libvirt-f0655289-318d-4aa7-b87a-6ce7cdead4ee'
Traceback (most recent call last):
File "a.py", line 7, in <module>
domain.createWithFlags(0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 581, in
createWithFlags
if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed',
dom=self)
libvirt.libvirtError: internal error cannot load AppArmor profile
'libvirt-f0655289-318d-4aa7-b87a-6ce7cdead4ee'
who can help me fix the error?What may cause the error?
Thanks.
--
樱宝宝: http://www.xuanmingyi.com
12 years
[libvirt-users] SCSI/IDE Devices in Guest
by Douglas Russell
I'm experimenting with how to attach storage to a guest virtual machine (I
sent another message to th elist about that as it's slightly different)
Looking in the XML files for my virtual machine, I see this:
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/vm/myvm/tmpeuiVc9.qcow2'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
However, /dev/hda is not a device in the guest. It is /dev/sda. It's not
really a problem in it's own right, but it's one of several connected
things which don't make sense. Is there some explanation for this?
I believe this is linked to some weirdness when I attach some extra storage
like so:
virsh attach-disk myvm /dev/lvm-group1/mystorage sdb --driver qemu
--persistent
This adds the following stanza:
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/lvm-group1/mystorage'/>
<target dev='sdb' bus='scsi'/>
<address type='drive' controller='0' bus='0' unit='1'/>
</disk>
Looks about right. In the guest though, it pushes /dev/sda (root and swap
are here on sda1 and sda2) upto /dev/sdb (sdb1 and sdb2). Somehow it still
boots correctly despite fstab referrencing /dev/sda1 and /dev/sda2 for /
and swap. The new /dev/sda is this storage I tried to add as sdb. What
could be causing this?
Thanks,
Douglas
12 years
Re: [libvirt-users] error : virPidFileAcquirePath:345 : Failed to acquire pid file '/home/corey/.libvirt/libvirtd.pid': Resource temporarily unavailable
by 何鑫
I have checked that I removed all distro things, ran self-built virsh, libvirtd. To make sure, I use absolute paths for running. Also I will check process status in time. This is "ps" shown: 2996 1 3 08:48 ? 00:00:00 /usr/local/libvirt/sbin/libvirtd -d
Is there some thing wrong? I can't search "libvirt-sock" after runing it.
Sorry for top-posting.
Thanks a lot!
> Date: Wed, 31 Oct 2012 10:25:37 -0600
> From: eblake(a)redhat.com
> To: wherethriving(a)hotmail.com
> Subject: Re: [libvirt-users] error : virPidFileAcquirePath:345 : Failed to acquire pid file '/home/corey/.libvirt/libvirtd.pid': Resource temporarily unavailable
>
> On 10/31/2012 10:00 AM, 何鑫 wrote:
> > Actually I make sure that I build libvirt, using "./configure --prefix="/usr/local/libvrt"". I have checked that all related files are under the directory-"/usr/local/libvirt", additionally, libvirtd's path is "/usr/local/libvirt/sbin/libvirtd". I am confused why I can't search libvirt-sock in my disk after starting libvirtd.
> > Could you please give me some advises?
> > Thanks a lot!
>
> Note that '--prefix=/usr/local/libvrt' is a typo. Are you sure you are
> installing things where you think you are? Also note that
> /usr/local/libvirt is NOT where your distro installed things, so if you
> are using your distro's virsh, it won't connect to your self-built
> libvirtd. And have you double-checked that you are running your
> self-built libvirtd?
>
> Finally, you are STILL top-posting, and STILL sending mail to just me
> instead of the list. It's making it hard to help you when you can't
> follow our requests, and for others that might be following this thread
> in the archives in the future to learn whatever ends up being your final
> solution.
>
> --
> Eric Blake eblake(a)redhat.com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
12 years