[libvirt-users] libvirt, OSX and VirtualBox - how?
by Brian Candler
I have a new OSX Lion Macbook and would like to control VirtualBox using
"virsh" (as I do with KVM under Ubuntu).
I've got this far:
* Installed VirtualBox
* Installed libvirt (brew install libvirt)
But now I'm a bit stuck :-)
I ran VirtualBox itself, and created a test VM successfully.
If I try to use virsh, this is what I get:
Brians-MacBook-Air:~ $ virsh -c vbox:///session
error: internal error unable to initialize VirtualBox driver API
error: failed to connect to the hypervisor
Brians-MacBook-Air:~ $ virsh -c vbox+unix:///session
error: Failed to connect socket to '@/Users/brian/.libvirt/libvirt-sock': No such file or directory
error: failed to connect to the hypervisor
If I try to start libvirtd, this is what I get:
Brians-MacBook-Air:~ $ /usr/local/sbin/libvirtd
00:00:18.970: -1: info : libvirt version: 0.9.6
00:00:18.970: -1: error : virNetSocketNewListenUNIX:340 : Failed to bind socket to '@/Users/brian/.libvirt/libvirt-sock': No such file or directory
[but directory /Users/brian/.libvirt was created]
However, VirtualBox itself is running OK:
Brians-MacBook-Air:~ $ VBoxManage list vms
"test" {d0d74c25-1dfc-44a4-8a2b-1d25b7972e7c}
Furthermore, dtruss suggests that virsh is finding the installed VirtualBox:
Brians-MacBook-Air:~ $ sudo dtruss -f virsh -c vbox:///session 2>&1 | grep -i virtualbox
error: internal error unable to initialize VirtualBox driver API
48916/0x3cc08: write_nocancel(0x2, "internal error unable to initialize VirtualBox driver API\n\0", 0x3A) = 58 0
48916/0x3cc08: access("/usr/lib/virtualbox/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/usr/lib/virtualbox-ose/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/usr/lib64/virtualbox/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/usr/lib64/virtualbox-ose/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/usr/lib/VirtualBox/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/opt/virtualbox/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/opt/VirtualBox/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/opt/virtualbox/i386/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/opt/VirtualBox/i386/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/opt/virtualbox/amd64/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/opt/VirtualBox/amd64/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/usr/local/lib/virtualbox/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/usr/local/lib/VirtualBox/VBoxXPCOMC.dylib\0", 0x0, 0x0) = -1 Err#2
48916/0x3cc08: access("/Applications/VirtualBox.app/Contents/MacOS/VBoxXPCOMC.dylib\0", 0x0, 0x0) = 0 0
48916/0x3cc08: stat64("/Applications/VirtualBox.app/Contents/MacOS/VBoxXPCOMC.dylib\0", 0x7FFF685D0980, 0x7FFF685D1810) = 0 0
48916/0x3cc08: open("/Applications/VirtualBox.app/Contents/MacOS/VBoxXPCOMC.dylib\0", 0x0, 0x0) = 4 0
48916/0x3cc08: stat64("/Applications/VirtualBox.app/Contents/MacOS/VBoxRT.dylib\0", 0x7FFF685D0750, 0x7FFF685D15D0) = 0 0
48916/0x3cc08: open("/Applications/VirtualBox.app/Contents/MacOS/VBoxRT.dylib\0", 0x0, 0x0) = 4 0
48916/0x3cc08: stat64("/Applications/VirtualBox.app/Contents/MacOS/VBoxXPCOM.dylib\0", 0x7FFF685D0750, 0x7FFF685D15D0) = 0 0
48916/0x3cc08: open("/Applications/VirtualBox.app/Contents/MacOS/VBoxXPCOM.dylib\0", 0x0, 0x0) = 4 0
But looking at the dtruss output shortly before it prints the error message
doesn't give me any clues as to what's going wrong.
...
48916/0x3cc08: stat64("/usr/lib/libbsm.0.dylib\0", 0x7FFF685D0090, 0x7FFF685D0F10) = 0 0
48916/0x3cc08: stat64("/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal\0", 0x7FFF685D0290, 0x7FFF685D1110) = 0 0
48916/0x3cc08: stat64("/usr/lib/libncurses.5.4.dylib\0", 0x7FFF685D05A0, 0x7FFF685D1420) = 0 0
48916/0x3cc08: getpid(0x7FFF685D1628, 0x108A16004, 0xEA60) = 48916 0
48916/0x3cc08: open("/dev/dtracehelper\0", 0x2, 0xFFFFFFFFFFFFFFB0) = 4 0
48916/0x3cc08: ioctl(0x4, 0x80086804, 0x7FFF685D1708) = 0 0
48916/0x3cc08: close(0x4) = 0 0
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: sigaction(0xD, 0x7FFF685D1978, 0x0) = 0 0
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: pipe(0x108BF1D90, 0x1000004, 0x7) = 4 0
48916/0x3cc08: fcntl(0x5, 0x3, 0x0) = 1 0
48916/0x3cc08: fcntl(0x5, 0x4, 0x5) = 0 0
48916/0x3cc08: fcntl(0x4, 0x3, 0x0) = 0 0
48916/0x3cc08: fcntl(0x4, 0x4, 0x4) = 0 0
48916/0x3cc08: fcntl(0x5, 0x1, 0x0) = 0 0
48916/0x3cc08: fcntl(0x5, 0x2, 0x1) = 0 0
48916/0x3cc08: fcntl(0x4, 0x1, 0x0) = 0 0
48916/0x3cc08: fcntl(0x4, 0x2, 0x1) = 0 0
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: getuid(0x7F9ABBC2B850, 0x108BED7A0, 0x0) = 0 0
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: gettid(0x0, 0x7FFF74AC9F00, 0x108A32B58) = -1 Err#3
48916/0x3cc08: write_nocancel(0x2, "error: \0", 0x7) = 7 0
48916/0x3cc08: write_nocancel(0x2, "internal error unable to initialize VirtualBox driver API\n\0", 0x3A) = 58 0
48916/0x3cc08: write_nocancel(0x2, "error: \0", 0x7) = 7 0
48916/0x3cc08: write_nocancel(0x2, "failed to connect to the hypervisor\n\0", 0x24) = 36 0
48916/0x3cc08: close(0x3) = 0 0
48916/0x3cc08: __sysctl(0x7FFF685D0F4C, 0x2, 0x7FFF685D0F38) = 0 0
48916/0x3cc08: bsdthread_register(0x7FFF8DCDCB68, 0x7FFF8DCDCB78, 0x2000) = 0 0
48916/0x3cc08: thread_selfid(0x7FFF8DCDCB68, 0x7FFF8DCDCB78, 0x0) = 248840 0
...
Has anybody got libvirt + OSX Lion + VirtualBox working, and if so, how did
you do it?
I see the same question asked here:
http://stackoverflow.com/questions/7946994/libvirt-and-virtualbox-on-osx
but unfortunately no response as yet.
Thanks in advance,
Brian.
12 years, 10 months
Re: [libvirt-users] ruby-libvirt 0.4.0
by Chris Lalancette
On 07/29/11 - 09:34:17AM, David M. Barlieb wrote:
> Hi, I'm fairly new to using libvirt. I have RHEL6 servers running KVM
> virtual environment. As I understand it, libvirt provides the tools to
> the KVM environment so that I can create domains or virtual guests. So,
> that being said, what does this ruby-libvirt provide me or enhance given
> my current setup.
>
>
>
> I'll understabnd if this is a little rudimentary but I really do not
> know who or where else to ask these types of question. I get quite a bit
> of email from the libvirt-users groups about libvirt and really have no
> idea if I can or should put any of these into my current setup, or if I
> should be asking RedHat this.
>
>
>
> I certainly wouldn't mind testing and contributing to these effort to
> enhance the libvirt tools and KVM hypervisor but think I need a better
> understanding of exactly how libvirt and KVM interact and what the
> enhancements bring to the table.
In the future it is usually best to keep one of the lists on an email; that
way, if I'm away or not responding, someone else can help you. I've added
libvirt-users to this response.
In any case, you have the right idea. Libvirt is a control plane for various
different virtualization solutions. Arguably the most popular virtualization
solution that libvirt can control is KVM, but it can also manage Xen, VMware
ESX, LXC (linux containers), UML, etc.
Libvirt provides both tools (like virsh and libvirtd) and APIs for interacting
with virtual machines. The APIs are things like virDomainShutdown(),
virDomainReboot(), etc. The ruby-libvirt package is a thin wrapper around
these APIs, so that you can use this functionality from ruby programs. That
is, you would be able to do something like:
dom.reboot
dom.shutdown
from your ruby programs. There are also bindings for other languages such
as python, php, and perl.
There is a lot more information at http://libvirt.org, and there is more
information specifically about the ruby bindings at http://libvirt.org/ruby
--
Chris Lalancette
12 years, 10 months
[libvirt-users] libvirtError: internal error cannot find PCI address for balloon virtio
by Wouter
Hi guys,
I have a little problem here. When I want to install a virtual machine I get
this error:
libvirtError: internal error cannot find PCI address for balloon virtio
Libvirt is running on a debian 5 system with kvm and of course libvirt. How
can I solve this problem, I searched on the Internet but there aren't posts
about this problem yet. So I don't have an idea where to look for.
I hope you guys can help me.
With kind regards,
Wouter.
12 years, 10 months
[libvirt-users] virt-manager: create lxc app container hangs
by sean darcy
libvirt-0.9.6-2.fc15.x86_64
virt-manager-0.9.0-7.fc15.noarch
I'm trying to use virt-manager create a simple lxc app container just to
see how it works. App is /bin/sh, 128 megs, 1 cpu.
All seems to go well, but when I click "Finish" and the "Creating
Virtual Machine" box comes up, "Creating Domain..." stays at 0B though
the slider keeps going back and forth.
Nothing in /var/log/libvirt/libvirtd.log
No relevant log in /var/log/libvirt/qemu/
Any help appreciated.
sean
12 years, 10 months
[libvirt-users] Finding out if Xen or KVM is used
by PREETHI RAMESH
I've got 2 doubts:
1.I've been trying to write an application using Libvirt's Java API which
should run on both Xen and KVM running machines and execute the Xen or KVM
code based on the hypervisor used. I want the physical machine to know if
it's running Xen or KVM and execute only that code.
While using getURI(), I need to use it as
conn.getURI()
but then I can't use conn without declaring it previously as Connect
conn=new Connect("URI");
Is there any way to get the URI used and hence the hypervisor used?
2. This question concerns the usage of the listDomains(). When I run this
piece of code in KVM, it works perfectly fine but throws an array out of
bounds exception in Xen.
Connect conn=null;
conn = new Connect("xen:///", true);
int[] id = conn.listDomains();
System.out.println("lD of VM " +id[0]);
Thanks for your time.
P Ramesh
12 years, 10 months
[libvirt-users] Libvirt exiting and respawning
by Stephen Eilert
Hi,
I'm trying to use Libvirt with LXC, under Ubuntu 11.04, but I can't get it
to work. It keeps exiting and being restarted by upstart. Log file follows.
It appears that it is complaining, among other things, of QEMU. I am not
running QEMU and would like to disable everything except for LXC, but I am
not sure it would fix my issue. I've set the log level to debug, even, but
didn't see anything out of ordinary. Even resorted to strace, but I don't
know enough about libvirtd to try and understand its behavior.
Anyone got any clue about what's causing it to decide to exit?
# libvirtd --version
libvirtd (libvirt) 0.9.2
# uname -a
Linux CI-Server-3-Backend-2 2.6.35.4-rscloud #2 SMP Sat Oct 29 21:16:49 UTC
2011 x86_64 x86_64 x86_64 GNU/Linux
# lxc-checkconfig
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled
--- Control groups ---
Cgroup: enabled
Cgroup namespace: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled
--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: enabled
# cat /var/log/syslog
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.696: 25820: info :
libvirt version: 0.9.2
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.696: 25820: info :
networkReloadIptablesRules:1410 : Reloading iptab
les rules
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.776: 25820: error
: virCommandWait:1393 : internal error Child proce
ss (/sbin/iptables --table mangle --delete POSTROUTING --out-interface
virbr0 --protocol udp --destination-port 68 --jump CHE
CKSUM --checksum-fill) status unexpected: exit status 1
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.817: 25820: error
: virCommandWait:1393 : internal error Child proce
ss (/sbin/iptables --table mangle --insert POSTROUTING --out-interface
virbr0 --protocol udp --destination-port 68 --jump CHE
CKSUM --checksum-fill) status unexpected: exit status 1
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.818: 25820:
warning : networkAddGeneralIptablesRules:1199 : Could not add rule to fixup
DHCP response checksums on network 'default'.
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.818: 25820:
warning : networkAddGeneralIptablesRules:1200 : May need to update iptables
package & kernel to support CHECKSUM rule.
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.888: 25820: error
: udevDeviceMonitorStartup:1616 : Failed to initialize libpciaccess: No
such file or directory
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.889: 25820: error
: virStateInitialize:830 : Initialization of udev state driver failed
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.930: 25820: info :
qemudStartup:525 : Unable to create cgroup for driver: Invalid argument
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.931: 25820: info :
qemudLoadDriverConfig:315 : Configured cgroup controller 'cpu'
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.931: 25820: info :
qemudLoadDriverConfig:315 : Configured cgroup controller 'memory'
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.931: 25820: info :
qemudLoadDriverConfig:315 : Configured cgroup controller 'devices'
Nov 5 18:42:50 CI-Server-3-Backend-2 libvirtd: 18:42:50.931: 25820: info :
qemudLoadDriverConfig:315 : Configured cgroup controller 'blkio'
Nov 5 18:42:51 CI-Server-3-Backend-2 libvirtd: 18:42:51.100: 25820: info :
virDomainLoadAllConfigs:9950 : Scanning for configs in /var/run/libvirt/qemu
Nov 5 18:42:51 CI-Server-3-Backend-2 libvirtd: 18:42:51.100: 25820: info :
virDomainLoadAllConfigs:9950 : Scanning for configs in /etc/libvirt/qemu
Nov 5 18:42:51 CI-Server-3-Backend-2 kernel: [ 442.486147] lo: Disabled
Privacy Extensions
Nov 5 18:42:51 CI-Server-3-Backend-2 libvirtd: 18:42:51.319: 25820: info :
virDomainLoadAllConfigs:9950 : Scanning for configs in /var/run/libvirt/lxc
Nov 5 18:42:51 CI-Server-3-Backend-2 libvirtd: 18:42:51.319: 25820: info :
virDomainLoadAllConfigs:9950 : Scanning for configs in /etc/libvirt/lxc
Nov 5 18:42:51 CI-Server-3-Backend-2 libvirtd: 18:42:51.320: 25820: info :
umlStartup:431 : Adding inotify watch on /var/run/libvirt/uml-guest
Nov 5 18:42:51 CI-Server-3-Backend-2 libvirtd: 18:42:51.321: 25820: info :
virDomainLoadAllConfigs:9950 : Scanning for configs in /etc/libvirt/uml
Nov 5 18:42:51 CI-Server-3-Backend-2 libvirtd: 18:42:51.321: 25820: error
: main:3390 : Driver state initialization failed
Nov 5 18:42:51 CI-Server-3-Backend-2 libvirtd: 18:42:51.321: 25821:
warning : qemudDispatchSignalEvent:424 : Shutting down on signal 3
-- Stephen
*"Kids these days.*
*Whatever happened to hard work?"*
-- Joel Spolsky, The perils of javaschools
12 years, 10 months
[libvirt-users] no connection driver available for openvz:///system
by 张立洪
dears.
I can not solved the problem:
vzctl works. But how do I connect to Virtuozzo? Using the openvz
>> > driver
>> > it doesn't work out of the box:
>> > virsh # connect openvz:///system
>> > error: Failed to connect to the hypervisor
>> > error: no connection driver available for openvz:///system
Why can not I connect to the openvz???
please help me , thanks.
12 years, 10 months
[libvirt-users] Event&Callback in QEMU
by huachao yao
Hi buddy,
I wanna to monitor a domain's life cycle event, so i register a event an a
virConnectDomainEventCallback, the code segment is as below:
------------------------
int DomainEventCallback(virConnectPtr conn,
virDomainPtr dom,
int event,
int detail,
void * opaque){
/*My code */
.......
}
int main(){
/* .....*/
virDomainPtr dom = domain.getDomains("xp");
virFreeCallback freecb = NULL;
void *opaque =NULL;
virConnectDomainEventCallback cb =DomainEventCallback;
virConnectDomainEventRegisterAny(conn, dom,
VIR_DOMAIN_EVENT_ID_LIFECYCLE,
VIR_DOMAIN_EVENT_CALLBACK(cb),opaque,freecb);
/* .....*/
}
but such a error happened:
libvir: Remote error : this function is not supported by the
connection driver: no event support
and the libvirt version is 0.9; the driver is QEMU-KVM ,version is 0.14.0.
I want to know why this Error will happen? Is the QEMU not support the
LIFECYCLE Event ? If it is , how can i monitor the domain's life cycle
event( such as started,defined and stopped..)
Pls help~~
12 years, 10 months
[libvirt-users] Cannot start VM after restart libvirt daemon
by Jean-Luc Derrien
Hello all,
I'm using libvirt 0.8.3 on Debian Lenny (package provided in
lenny-backports).
After restarting libvirtd, I cannot start VM anymore.
The daemon is restarted, but each time I try to start a domain, I get this
message :
virsh # start vm2
error: Failed to start domain vm2
error: internal error Process exited while reading console log output:
When daemon is started with -v argument :
18:20:26.142: warning : qemudParsePCIDeviceStrs:1422 : Unexpected exit
status '1', qemu probably failed
18:20:26.149: error : virExecDaemonize:782 : internal error Intermediate
daemon process exited with status 0.
18:20:26.230: error : qemudReadLogOutput:2118 : internal error Process
exited while reading console log output:
In /var/log/syslog :
Nov 3 18:20:26 ksm03 kernel: device vnet0 entered promiscuous mode
Nov 3 18:20:26 ksm03 kernel: br0: port 2(vnet0) entering learning state
Nov 3 18:20:26 ksm03 kernel: br0: port 2(vnet0) entering learning state
Nov 3 18:20:26 ksm03 kernel: libvirtd[13599]: segfault at 41882000 ip
000000000043ac8b sp 000000004187e3b0 error 4 in libvirtd[400000+db000]
Nov 3 18:20:26 ksm03 kernel: br0: port 2(vnet0) entering learning state
Nov 3 18:20:26 ksm03 kernel: device vnet0 left promiscuous mode
Nov 3 18:20:26 ksm03 kernel: br0: port 2(vnet0) entering disabled state
When I reboot the server it works.
Help welcome. Thanks in advance.
Regards,
Jean-Luc
12 years, 10 months
[libvirt-users] general protection errors
by Alex
Hi,
Some time ago I sent a message about some general protection errors,
and didn't receive a response. I hoped I could post again and that
someone might have some ideas. I really don't think it is a hardware
problem producing these errors, but am otherwise out of ideas.
I'm having a problem with a fedora15 x86_64 host with a fedora15
x86_64 guest on a Xeon E3-1240 with 8GB RAM on the guest. This is the
only guest. The server is configured as a mail server, using
spamassassin, postfix, amavisd, and clamav.
Have there been significant changes in the current version from 0.8.8
that is shipped with fedora15?
It was previously running without error on different hardware. I
migrated the disks to a more powerful server due to load. It's a new
server, and has been stress tested with memtest86, mprime, and
passmark's Linux test for more than 24 hours without producing a
problem.
However, when I run the kvm vm, I receive a bunch of errors similar to
these on the guest:
[169245.360511] clamscan[27448] general protection ip:7f125f2e6ffb
sp:7fff117566f0 error:0 in libclamav.so.6.1.11[7f125f229000+9ce000]
[29016.445470] clamd[1110] general protection ip:30df2c3981
sp:7fffa08f4fe0 error:0 in libclamav.so.6.1
.11[30df200000+9ce000]
There are other applications, such as pyzor, that produce similar errors.
Is this something that could be a result of some software
configuration error I've made? Is there something I can do to debug
this further? There also aren't any errors on the host indicating a
kernel problem or hardware issue.
Is it possible this is a known error?
I was previously trying to improve IO performance by using 'block'
instead of 'file' for the device, but had to abandon that idea because
it didn't work and I had to concentrate on this problem.
Could disabling the cache (cache=none) cause this?
I've included some info below, in hopes someone could guide me towards
a solution.
# rpm -qva|egrep 'kvm|libvirt|kernel|qemu'
libvirt-python-0.8.8-7.fc15.x86_64
kernel-2.6.40.6-0.fc15.x86_64
qemu-img-0.14.0-8.fc15.x86_64
gpxe-roms-qemu-1.0.1-4.fc15.noarch
kernel-2.6.40.4-5.fc15.x86_64
qemu-system-x86-0.14.0-8.fc15.x86_64
libvirt-0.8.8-7.fc15.x86_64
libvirt-client-0.8.8-7.fc15.x86_64
qemu-common-0.14.0-8.fc15.x86_64
kernel-headers-2.6.40.6-0.fc15.x86_64
qemu-kvm-0.14.0-8.fc15.x86_64
I've included my domain config below in hopes it helps.
<domain type='kvm'>
<name>mail02</name>
<uuid>ec4f3cf5-2f27-fb3e-72f6-3fa3176b13b6</uuid>
<memory>6291456</memory>
<currentMemory>6291456</currentMemory>
<vcpu>4</vcpu>
<os>
<type arch='x86_64' machine='pc-0.14'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<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' cache='none'/>
<source file='/var/lib/libvirt/images/mail02.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:67:2c:4c'/>
<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='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<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, 10 months