[libvirt-users] Failed to query file context on : No data available
by #█er
Hi:I downloaded a cirros-0.3.0-x86_64-rootfs.img and mount it to /tmp/bak
then I edit a xml file ,here is the content:
<domain type='lxc'>
<name>vm1</name>
<memory>500000</memory>
<os>
<type>exe</type>
<init>/bin/sh</init>
</os>
<vcpu>1</vcpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='mount'>
<source dir='/tmp/bak'/>
<target dir='/'/>
</filesystem>
<interface type='network'>
<source network='default'/>
</interface>
<console type='pty' />
</devices>
</domain>
I defined it and no error , but when I start it , it comes with
error: Failed to start domain vm1
error: internal error guest failed to start: 2012-10-24 13:08:14.684+0000: 16935: info : libvirt version: 0.9.10, package: 21.el6_3.4 (CentOS BuildSystem <http://bugs.centos.org>, 2012-08-23-18:28:26, c6b9.bsys.dev.centos.org)
2012-10-24 13:08:14.684+0000: 16935: error : lxcControllerRun:1484 : Failed to query file context on /tmp/bak: No data available
here is the ls -al /tmp/bak
total 92
drwxr-xr-x 21 root root 4096 Oct 24 20:43 .
drwxrwxrwt. 5 root root 4096 Oct 24 21:08 ..
drwxr-xr-x 2 root root 4096 Oct 24 20:43 bin
drwxr-xr-x 3 root root 4096 Oct 24 20:43 boot
drwxr-xr-x 3 root root 4096 Oct 24 20:43 dev
drwxr-xr-x 7 root root 4096 Oct 24 20:43 etc
drwxr-xr-x 4 root root 4096 Oct 24 20:43 home
-rwxr-xr-x 1 root root 2785 Oct 24 20:43 init
lrwxrwxrwx 1 root root 32 Oct 24 20:43 initrd.img -> boot/initrd.img-3.0.0-12-virtual
drwxr-xr-x 4 root root 4096 Oct 24 20:43 lib
lrwxrwxrwx 1 root root 11 Oct 24 20:43 linuxrc -> bin/busybox
drwx------ 2 root root 4096 Oct 24 20:43 lost+found
drwxr-xr-x 2 root root 4096 Oct 24 20:43 mnt
drwxr-xr-x 2 root root 4096 Oct 24 20:43 .oldroot
drwxr-xr-x 2 root root 4096 Oct 24 20:43 old-root
drwxr-xr-x 2 root root 4096 Oct 24 20:43 opt
drwxr-xr-x 2 root root 4096 Oct 24 20:43 proc
drwx------ 2 root root 4096 Oct 24 20:43 root
drwxr-xr-x 2 root root 4096 Oct 24 20:43 run
drwxr-xr-x 2 root root 4096 Oct 24 20:43 sbin
drwxr-xr-x 2 root root 4096 Oct 24 20:43 sys
drwxr-xr-t 3 root root 4096 Oct 24 20:43 tmp
drwxr-xr-x 6 root root 4096 Oct 24 20:43 usr
drwxr-xr-x 8 root root 4096 Oct 24 20:43 var
lrwxrwxrwx 1 root root 29 Oct 24 20:43 vmlinuz -> boot/vmlinuz-3.0.0-12-virtual
How can I solve this problem?
Thanks :-)
12 years, 1 month
[libvirt-users] Libvirt event for disk change is not being registered by DomainEventRegisterAny()
by Abhishek Srivastava
Hi,
I am writing an application which would monitor the changes on the domain
on the KVM hypervisor through libvirt events.
Recently I have upgraded my libvirt from 9.4 to 9.10 and I have this issue.
While *de-registering* for DomainEventDiskChangeCallback, I get a libvirt
error saying
'libvirtError: internal error domain event 2 not registered;'
where 2 is the callbackid returned by virConnectDomainEventRegisterAny()
for the disk change event type.
This error didn’t occur when I used libvirt 0.9.4-23.el6_2.6
Can you please enlighten me on the recent changes that has been made?
Also, is the diskchange event a part of the domains life cycle event?
Any help on this issue will be highly appreciated.
Thanks and regards,
Abhishek
12 years, 1 month
[libvirt-users] Questions and a blockpull issue
by Abbas
Coming off of xen environment; still testing with kvm, just a few
questions:
1. What is the roadmap for release of qemu-kvm 1.1 and libvirt 0.10.2 for
el6, cause I had to compile from upstream to get the latest stuff.
2. Should not virt-manager show the sparsed disk size instead of actual
reserved size of a vm?
3. Where is the virsh bash_completion conf.d file from upstream; since el6
rpm for it seems have tab completion built right into virsh shell.
4. Created a disk-only snapshot of a vm CO1 called capture1 but the syntax
of blockpulling seems to be opposite from what has been advertised on
Fedora and other relative wikis. Check below and the error with first
blockpull command.
[root@KVM libvirt]# virsh snapshot-create-as CO1 capture1 "CO1s first
snapshot test" --disk-only --atomic
[root@KVM libvirt]# virsh -d 0 blockpull CO1 --path /home/vms/co1.img
--bandwidth 500 --base /home/vms/co1.capture1
blockpull: domain(optdata): CO1
blockpull: path(optdata): /home/vms/co1.img
blockpull: bandwidth(optdata): 500
blockpull: base(optdata): /home/vms/co1.capture1
blockpull: found option <domain>: CO1
blockpull: <domain> trying as domain NAME
error: invalid argument: No device found for specified path
[root@KVM libvirt]# virsh -d 0 blockpull --domain CO1 --path
/home/vms/co1.capture1 --base /home/vms/co1.img --verbose --wait
blockpull: domain(optdata): CO1
blockpull: path(optdata): /home/vms/co1.capture1
blockpull: base(optdata): /home/vms/co1.img
blockpull: verbose(bool): (none)
blockpull: wait(bool): (none)
blockpull: found option <domain>: CO1
blockpull: <domain> trying as domain NAME
Block Pull: [100 %]
Pull complete
Best,
Abbas.
12 years, 1 month
[libvirt-users] Unable to start guest
by Jeremy Johnston
I have been picking away at this problem and I have not been able to
resolve it yet and it appears quite puzzling to me, I am attempting to
start a guest on KVM and receive 'error: An error occurred, but the
cause is unknown'. I have a feeling this may be something simple I am
overlooking.
I have included log files and the xml of the guest at
http://node4.smart-serv.net/~jeremy/libvirt/
12 years, 1 month
[libvirt-users] using vbox driver hypervisor support
by p.venkatasrinivas@tcs.com
Hi,
I installed Libvirt. We need virtualbox support for libvirt. But we are
unable to see the vbox option in virt-manager. How we can find vbox
hypervisor driver?
And also we already compiled libvirt with vbox option.(--with-vbox). But
that didn't work. And also when we are creating the new virtual machine
through virt-manager we are getting the following error:
internal error cannot parse QEMU version number in ""
Can you please suggest on this what we need to do as soon as possible?
Thanks in advance.
Srinivas
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
12 years, 1 month
[libvirt-users] start and stop a VMware VM using libvirt API
by Ali Nikzad
Hi,
I am a new libvirt user and I wonder if I can use this library to start or
stop a VM in ESXi 5.0.
For example to write an application using libvirt in windows or linux that
connects to an ESXi 5.0 server and get the list of VMs and start one of
them.
If so, is there any sample about it?
Thank you,
Ali
12 years, 1 month
[libvirt-users] Get data of Physical Machine
by Vinicius Gonçalves Braga
Hey,
What kind of data de NodeInfo represents? With my researches I thought that
it should return the data of the physical machine. But in my tests, when I
run with diferents URLs in Connect creation the values of nodeInfo
variables are differents. For example: it's the same machine, but if I run
with xen:/// the memory is X and if I run with qemu:///session the memory
is Y.
Connect conn = new Connect("xen:///", false);
NodeInfo nodeInfo = conn.nodeInfo();
assertEquals("nodeInfo.model", "i686", nodeInfo.model);
assertEquals("nodeInfo.memory", 3145728, nodeInfo.mhz);
assertEquals("nodeInfo.cpus", 16, nodeInfo.cpus);
assertEquals("nodeInfo.cpus", 16, nodeInfo.maxCpus());
assertEquals("nodeInfo.nodes", 2, nodeInfo.nodes);
assertEquals("nodeInfo.sockets", 2, nodeInfo.sockets);
assertEquals("nodeInfo.cores", 2, nodeInfo.cores);
assertEquals("nodeInfo.threads", 2, nodeInfo.threads);
Another question is how can I connect with XenServer, the native
hypervisor? Is it the same driver for Xen?
Thanks!
12 years, 1 month
[libvirt-users] 回复: error: internal error lxc state driver is notactive
by #█er
Thanks for your response, I found that the server's kernel has been changed so I installed the official kernel by yum.
but there still question:
/usr/bin/virsh -c lxc:/// start instance-00000011
error: Failed to start domain instance-00000011
error: internal error Child process (PATH=/sbin:/usr/sbin:/bin:/usr/bin LIBVIRT_DEBUG=3 LIBVIRT_LOG_OUTPUTS=3:stderr /usr/libexec/libvirt_lxc --name instance-00000011 --console 27 --handshake 30 --background --veth veth1) status unexpected: fatal signal 11
------------------ 原始邮件 ------------------
发件人: "Osier Yang"<jyang(a)redhat.com>;
发送时间: 2012年10月22日(星期一) 晚上9:01
收件人: "#█er"<williamkyle(a)vip.qq.com>;
抄送: "libvirt-users"<libvirt-users(a)redhat.com>;
主题: Re: [libvirt-users] error: internal error lxc state driver is notactive
On 2012年10月22日 15:55, #█er wrote:
> hi:
> I want to use libvirt with LXC, but when I use virsh -c lxc:/// to
> connect to lxc, it just print these errors:
> error: internal error lxc state driver is not active
> error: failed to connect to the hypervisor
> I searched these error message , but it seems that there is no helpful
> information .
>
> Could you help me solve this problem?
>
Sounds like you don't have the LXC driver loaded. Possibably
you don't have libvirt-daemon-driver-lxc installed if you use
libvirt newer enough.
Start the daemon like following will help you find out
the cause.
# LIBVIRT_DEBUG=1 /usr/sbin/libvirtd
# virsh -c lxc:///
Regards,
Osier
12 years, 1 month
[libvirt-users] attach-interface not permanent?
by Dennis Jacobfeuerborn
Hi,
I just created a new interface for a running Windows 2008 guest using the
attach-interface command which succeeded and I could see the interface in
the guest and in the dumpxml output. Then I switched the type to virtio in
virt-manager after which I got the message that this change would only
appear after the next guest shutdown so I went ahead and shut down the guest.
After that the new interface was gone and no longer showed up in the
dumpxml output.
I'm confused because at no point was it mentioned that the interface would
only be added temporarily and the man-page doesn't say anything to that
effect either.
This happened on a fresh Centos 6.3 system. Any ideas what is going on here?
Regards,
Dennis
12 years, 1 month
[libvirt-users] error: internal error lxc state driver is not active
by #█er
hi:
I want to use libvirt with LXC, but when I use virsh -c lxc:/// to connect to lxc, it just print these errors:
error: internal error lxc state driver is not active
error: failed to connect to the hypervisor
I searched these error message , but it seems that there is no helpful information .
Could you help me solve this problem?
Thanks :)
12 years, 1 month