[libvirt-users] problem defining ipaddress
by gary artim
I have a fedora system configured and running with virsh using
kvm/qemu. All I want is to have a fixed ipaddress for that virtual
machine. I know that there is the Host and Guest sides to the network.
The host has virbr0 interface, which i guess is a bridge. Seem when
ever I define a interface to the guest with a type=routed it hoses my
other interfaces on the host and requires a console reboot --
completely hanging the network. I'm no networking expert, but there
must be a simple N step procedure for defining a static IPaddress to
route to a guest machine? Has anyone got this working and have a
procedure. My network has 2 nic, eth0 and eth1 (10.0.0.253 and
10.0.1.253), one nic has a route to an nfs machine, the other passes
through a linux based router to the wan. I can alias the 10.0.1.253
(eth0) to another address in the subnet, like 10.0.1.251 (eth0:0) and
would like to use it in some way to connect to the guest -- I have the
nat/routing working fine from the router to eth0:0. The network for
libvirt is confusing. It not obvious which side (guest or host) your
defining and seem to keep multiple definitions around, even after a
restart of libvirtd.service. An help would be great! I have read all
the libvirt web info and find it difficult to put the steps
together...
12 years, 2 months
[libvirt-users] Fwd: non-blocking virtConnectOpen
by lulin Fan
Hi
I am writing a web-based management tool for KVM, it will manager a lot of
remote KVM host, when user add a new connection from the UI, it will take a
long time to open the libvirt connection sometimes due to the network
problem, during this progress, the management tool will block the request
of other user, it is not a good idea for users.
BR
Fan
On 5 September 2012 14:55, Timon Wang <timonwst(a)gmail.com> wrote:
>
>
> On Wed, Sep 5, 2012 at 11:53 AM, lulin Fan <fan.luliin(a)gmail.com> wrote:
> > Hi all,
> >
> > does anybody know how to do non-blocking virtConnectOpen? does libvirt
> > support it or not cause I can't find any document about it? or should I
> need
> > create a thread to do it?
>
> It's worth to use non-blocking? What will you do without connect? If it's
> not related with libvirt connection, you can do in it in another thread if
> you like.
> >
> >
> > Thanks
> >
> > Fan
> >
> > _______________________________________________
> > libvirt-users mailing list
> > libvirt-users(a)redhat.com
> > https://www.redhat.com/mailman/listinfo/libvirt-users
>
>
>
> --
> Focus on: Server Vitualization, Network security,Scanner,NodeJS,JAVA,WWW
> Blog: http://www.nohouse.net
>
12 years, 2 months
[libvirt-users] non-blocking virtConnectOpen
by lulin Fan
Hi all,
does anybody know how to do non-blocking virtConnectOpen? does libvirt
support it or not cause I can't find any document about it? or should I
need create a thread to do it?
Thanks
Fan
12 years, 2 months
[libvirt-users] virDomainMemoryPeek: bad behavior under workload
by NoxDaFox
Greetings,
I am working on a platform for analysis automation.
I need to run several Virtual Environments concurrently and record
information about their behavior.
I wrote some months ago about the capability of reading the Memory
during the Environment's execution (in paused state).
What do I need is the complete linear memory image, byte per byte,
nothing special; I will give this output to tools and parsers like
Volatility to get the value from it.
I looked around and the only way to get the memory in such a way is
using the QEMU monitor command `pmemsave`.
I am using libvirt through its Python bindings and the
virDomainQemuMonitorCommand seems not to be exposed by the API so, as
suggested in some mails I read into the mailig list, I switched to
virDomainMemoryPeek.
Using this function keeps up to 14-16 seconds to read 512Mb of memory
with the 64Kb limitation and 2-3 seconds with the 1Mb one; but the
most annoying thing is that I can't run several environment
concurrently as the function keeps failing.
Here's the typical output:
File "/home/nox/workspace/NOX/src/NOX/hooks.py", line 134, in trigger
hook.trigger(event)
File "/home/nox/workspace/NOX/src/NOX/hooks.py", line 33, in trigger
self.handlers[event]()
File "/home/nox/workspace/NOX/hooks/volatility.py", line 81, in memory_dump
for block in Memory(self.ctx):
File "/home/see/workspace/NOX/src/NOX/lib/libtools.py", line 179, in next
libvirt.VIR_MEMORY_PHYSICAL)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1759, in memoryPeek
ret = libvirtmod.virDomainMemoryPeek(self._o, start, size, flags)
SystemError: error return without exception set
I can't run more than 3 environments concurrently on a Xeon Quad with
8Gb of memory.
I guess the RPC reply goes in timeout because the system is under
heavy load but I'm not sure as the error output is quite obscure.
Is there any solution to this issue? Is it possible to raise the RPC
reply timeout value so that, even if slowly, I eventually get the
memory dump?
If through virsh I use the QEMU `pmemsave` command, I get the memory
dump in less than one second; is there any way to obtain the same
performance?
Thanks anyway for making libvirt the great tool it is!
NoxDaFox
12 years, 2 months
[libvirt-users] Libvirt daemon segfaults when run as root
by Shawn Furrow
Hi all,
For some reason when I run "libvirtd -d" as root it seems to not start. I
investigate by running "libvirtd -v" as root and I get a segfault. Here is
the output:
2012-08-23 19:01:23.237+0000: 27464: info : libvirt version: 0.10.0
> 2012-08-23 19:01:23.237+0000: 27464: error : virDriverLoadModule:78 :
> failed to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so: undefined
> symbol: virSecurityManagerGetProcessLabel
> 2012-08-23 19:01:23.238+0000: 27464: error : virDriverLoadModule:78 :
> failed to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so: undefined
> symbol: virSecurityManagerGetProcessLabel
> Caught Segmentation violation dumping internal log buffer:
>
> ====== start of log =====
> 2012-08-23 19:01:23.235+000027464: debug : main:1120 : Decided on pid file
> path '/usr/local/var/run/libvirtd.pid'
> 2012-08-23 19:01:23.235+000027464: debug : main:1130 : Decided on socket
> paths '/usr/local/var/run/libvirt/libvirt-sock' and
> '/usr/local/var/run/libvirt/libvirt-sock-ro'
> 2012-08-23 19:01:23.235+000027464: debug : main:1168 : Ensuring run dir
> '/usr/local/var/run/libvirt' exists
> 2012-08-23 19:01:23.235+000027464: debug : virEventRegisterDefaultImpl:204
> : registering default event implementation
> 2012-08-23 19:01:23.235+000027464: debug : virEventPollAddHandle:111 :
> Used 0 handle slots, adding at least 10 more
> 2012-08-23 19:01:23.235+000027464: debug : virEventPollInterruptLocked:697
> : Skip interrupt, 0 0
> 2012-08-23 19:01:23.236+000027464: debug : virEventPollAddHandle:136 :
> EVENT_POLL_ADD_HANDLE: watch=1 fd=5 events=1 cb=0x7f323cd415a0 opaque=(nil)
> ff=(nil)
> 2012-08-23 19:01:23.236+000027464: debug : virEventRegisterImpl:177 :
> addHandle=0x7f323cd423d0 updateHandle=0x7f323cd414a0
> removeHandle=0x7f323cd41360 addTimeout=0x7f323cd42220
> updateTimeout=0x7f323cd415e0 removeTimeout=0x7f323cd41260
> 2012-08-23 19:01:23.236+000027464: debug : virNetServerNew:407 :
> srv=0xdd8890 refs=1
> 2012-08-23 19:01:23.236+000027464: debug : main:1206 : Dropping privileges
> (if required)
> 2012-08-23 19:01:23.236+000027464: debug : virDriverModuleInitialize:53 :
> Module dir /usr/local/lib/libvirt/connection-driver
> 2012-08-23 19:01:23.236+000027464: debug : virDriverLoadModule:66 : Module
> load network
> 2012-08-23 19:01:23.236+000027464: debug : virRegisterNetworkDriver:564 :
> registering Network as network driver 4
> 2012-08-23 19:01:23.236+000027464: debug : virDriverLoadModule:66 : Module
> load storage
> 2012-08-23 19:01:23.236+000027464: debug : virRegisterStorageDriver:624 :
> registering storage as storage driver 4
> 2012-08-23 19:01:23.236+000027464: debug : virDriverLoadModule:66 : Module
> load secret
> 2012-08-23 19:01:23.237+000027464: debug : virRegisterSecretDriver:684 :
> registering secret as secret driver 3
> 2012-08-23 19:01:23.237+000027464: debug : virDriverLoadModule:66 : Module
> load nwfilter
> 2012-08-23 19:01:23.237+000027464: debug : virRegisterNWFilterDriver:714 :
> registering nwfilter as network filter driver 3
> 2012-08-23 19:01:23.237+000027464: debug : virDriverLoadModule:66 : Module
> load qemu
> 2012-08-23 19:01:23.237+000027464: error : virDriverLoadModule:78 : failed
> to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so: undefined
> symbol: virSecurityManagerGetProcessLabel
> 2012-08-23 19:01:23.238+000027464: debug : virDriverLoadModule:66 : Module
> load lxc
> 2012-08-23 19:01:23.238+000027464: error : virDriverLoadModule:78 : failed
> to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so: undefined
> symbol: virSecurityManagerGetProcessLabel
> 2012-08-23 19:01:23.238+000027464: debug : virDriverLoadModule:66 : Module
> load uml
> 2012-08-23 19:01:23.238+000027464: debug : virRegisterDriver:732 :
> driver=0x7f3232ec7760 name=UML
> 2012-08-23 19:01:23.238+000027464: debug : virRegisterDriver:747 :
> registering UML as driver 6
> 2012-08-23 19:01:23.238+000027464: debug : virDriverLoadModule:66 : Module
> load xen
> 2012-08-23 19:01:23.239+000027464: debug : virRegisterDriver:732 :
> driver=0x7f3232caad00 name=Xen
> 2012-08-23 19:01:23.239+000027464: debug : virRegisterDriver:747 :
> registering Xen as driver 7
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerProgramNew:63 :
> prog=0xddca40 refs=1
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerProgramRef:84 :
> prog=0xddca40 refs=2
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerProgramNew:63 :
> prog=0xddcbc0 refs=1
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerProgramRef:84 :
> prog=0xddcbc0 refs=2
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollInterruptLocked:697
> : Skip interrupt, 0 0
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollAddHandle:136 :
> EVENT_POLL_ADD_HANDLE: watch=2 fd=7 events=1 cb=0x7f323ce241e0
> opaque=0xdd8890 ff=(nil)
> 2012-08-23 19:01:23.239+000027464: debug : main:1257 : Attempting to
> configure auditing subsystem
> 2012-08-23 19:01:23.239+000027464: debug : main:1263 : Proceeding without
> auditing
> 2012-08-23 19:01:23.239+000027464: debug : virHookCheck:119 : No hook
> script /usr/local/etc/libvirt/hooks/daemon
> 2012-08-23 19:01:23.239+000027464: debug : virHookCheck:119 : No hook
> script /usr/local/etc/libvirt/hooks/qemu
> 2012-08-23 19:01:23.239+000027464: debug : virHookCheck:119 : No hook
> script /usr/local/etc/libvirt/hooks/lxc
> 2012-08-23 19:01:23.239+000027464: debug : daemonSetupNetworking:464 :
> Registering unix socket /usr/local/var/run/libvirt/libvirt-sock
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketNew:119 :
> localAddr=0x7fff419bf530 remoteAddr=(nil) fd=9 errfd=-1 pid=0
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketNew:179 :
> RPC_SOCKET_NEW: sock=0xddcbf0 refs=1 fd=9 errfd=-1 pid=0
> localAddr=127.0.0.1;0, remoteAddr=(null)
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketRef:713 :
> RPC_SOCKET_REF: sock=0xddcbf0 refs=2
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollInterruptLocked:697
> : Skip interrupt, 0 0
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollAddHandle:136 :
> EVENT_POLL_ADD_HANDLE: watch=3 fd=9 events=0 cb=0x7f323ce2ab10
> opaque=0xddcbf0 ff=0x7f323ce2ba60
> 2012-08-23 19:01:23.239+000027464: debug : daemonSetupNetworking:474 :
> Registering unix socket /usr/local/var/run/libvirt/libvirt-sock-ro
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketNew:119 :
> localAddr=0x7fff419bf530 remoteAddr=(nil) fd=10 errfd=-1 pid=0
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketNew:179 :
> RPC_SOCKET_NEW: sock=0xddd430 refs=1 fd=10 errfd=-1 pid=0
> localAddr=127.0.0.1;0, remoteAddr=(null)
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketRef:713 :
> RPC_SOCKET_REF: sock=0xddd430 refs=2
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollInterruptLocked:697
> : Skip interrupt, 0 0
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollAddHandle:136 :
> EVENT_POLL_ADD_HANDLE: watch=4 fd=10 events=0 cb=0x7f323ce2ab10
> opaque=0xddd430 ff=0x7f323ce2ba60
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerRef:420 :
> srv=0xdd8890 refs=2
> 2012-08-23 19:01:23.239+000027464: debug : virNetlinkEventServiceStart:656
> : libnl was not available at build time
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerRun:714 :
> srv=0xdd8890 quit=0
> 2012-08-23 19:01:23.239+000027464: debug : virEventRunDefaultImpl:244 :
> running default event implementation
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollCleanupTimeouts:501
> : Cleanup 0
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollCleanupTimeouts:537
> : Found 0 out of 0 timeout slots used, releasing 0
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollCleanupHandles:549
> : Cleanup 4
> 2012-08-23 19:01:23.240+000027464: debug : virEventPollMakePollFDs:378 :
> Prepare n=0 w=1, f=5 e=1 d=0
> 2012-08-23 19:01:23.240+000027475: debug : virStateInitialize:798 :
> Running global init for Remote state driver
> 2012-08-23 19:01:23.240+000027475: debug : virStateInitialize:798 :
> Running global init for Network state driver
> 2012-08-23 19:01:23.240+000027464: debug : virEventPollMakePollFDs:378 :
> Prepare n=1 w=2, f=7 e=1 d=0
> 2012-08-23 19:01:23.240+000027464: debug : virEventPollMakePollFDs:378 :
> Prepare n=2 w=3, f=9 e=0 d=0
> 2012-08-23 19:01:23.240+000027464: debug : virEventPollMakePollFDs:378 :
> Prepare n=3 w=4, f=10 e=0 d=0
> 2012-08-23 19:01:23.240+000027464: debug :
> virEventPollCalculateTimeout:320 : Calculate expiry of 0 timers
> 2012-08-23 19:01:23.240+000027464: debug :
> virEventPollCalculateTimeout:346 : Timeout at 0 due in -1 ms
> 2012-08-23 19:01:23.240+000027464: debug : virEventPollRunOnce:614 :
> EVENT_POLL_RUN: nhandles=2 timeout=-1
>
> ====== end of log =====
> Segmentation fault/
However, when I run "libvirtd -d" as me, it does not segfault and continues
running. However I cannot connect to the libvirt-sock because it gets
created at "$HOME/.cache/libvirt/libvirt-sock" but virsh looks for it at
"/usr/local/var/run/libvirt-sock".
Here is what I get when I run "libvirtd -v" as me:
2012-08-23 19:02:15.145+0000: 27483: info : libvirt version: 0.10.0
> 2012-08-23 19:02:15.145+0000: 27483: error : virDriverLoadModule:78 :
> failed to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so: undefined
> symbol: virSecurityManagerGetProcessLabel
> 2012-08-23 19:02:15.145+0000: 27483: error : virDriverLoadModule:78 :
> failed to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so: undefined
> symbol: virSecurityManagerGetProcessLabel
Any ideas why this is happening? I am on Ubuntu 10.04 running libvirt
0.10.0 with qemu-kvm 1.1
Thanks,
Shawn
--
Virginia Tech
Bradley Department of Electrical and Computer Engineering
B.S. Electrical Engineering
B.S. Computer Engineering
12 years, 2 months
Re: [libvirt-users] about open vswitch supporting?
by yue wang
On Tue, Sep 4, 2012 at 2:20 PM, yue wang <heuye.wang(a)gmail.com> wrote:
> it seems the 'generic ethernet connection' network doesn't have the
> 'virtualport ' element, so there is no way to associate it with an
> interface's uuid.
> are there any workaround?
>
>
> On Mon, Sep 3, 2012 at 6:41 PM, yue wang <heuye.wang(a)gmail.com> wrote:
>
>> Hi:
>>
>> i used to use linux bridge and specify interfaces by 'Generic ethernet connection'
>> mode,after reading this page:
>> http://libvirt.org/formatdomain.html#elementsNICS
>> i am not sure if i need to change to another mode(eg:'virtual network') to
>> specify interfaces when switching linux bridge to open vswitch?
>> any suggestions?
>>
>>
>> thanks!
>> heuye
>>
>
>
12 years, 2 months
[libvirt-users] virtual network bug?
by Gene Czarcinski
I have had a number of occasions lately where a virtual "NAT" network
(such as default) has stopped working. I have attempted to stop and
then restart the network from the "network details" but the only thing
that seems to work is to restart all of the virtual guests which use
that network. I don't believe that I should have to do that. Is there
some command which will "fix" things?
I have had this happen to me a number of times but I am currently
uncertain of the cause. Anyone know what is going on? I am not going
to bugzilla this until.
I do know one way to cause the problem. Disable the network in a
virtual machine. Then using virt-manager's connection details menu,
stop that (default) network ... then start it up again. Everything
sort-of looks ok but it is not. Go back to the virtual machine and
re-enable the previously disable network. Nope ... cannot connect.
Start another virtual machine which uses that network and it works fine.
In the "real world", I can disable a network, then remove a cable,
connect the cable back up, re-enable the network and everything works.
BTW, NetworkManager is used in all cases.
Any ideas?
Gene
12 years, 2 months
[libvirt-users] error: Failed to start pool (already mounted)
by Ragnar Skúlason
Hi everyone,
I have storage-pool that for some reason became inactive (possibly due to
an error with pool-refresh in an old version of a Java API binding).
I want to restart the pool but am unable to, due to the volume being
mounted:
# virsh pool-start [uuid]
error: Failed to start pool [uuid]
error: Requested operation is not valid: Target '/mnt/[uuid]' is already
mounted
We have tested this with versions 0.9.12 and 0.9.13.
Is it possible to bypass this mount check and start the storage pool
(forcefully)?
Many thanks,
Ragnar Skúlason
12 years, 2 months