<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body ><div>No SELinux or AppArmor is used. qemu.conf shows it's running by root user. I did "virsh start" operation under root and the error remains. Should I change the permission attributes of files under /var/lib/libvirt/qemu ?</div><div>BTW, could you please tell me the libvirt mailing list address? Thanks.</div><div><br></div><div><br></div><div><div style="font-size:75%;color:#575757">从三星移动设备发送</div></div><br><br><br>-------- 原始邮件 --------<br>发件人: "Richard W.M. Jones" <rjones@redhat.com> <br>日期: 2014-07-07 16:16 (GMT+08:00) <br>收件人: fangtuo90 <fangtuo90@gmail.com> <br>抄送: libguestfs@redhat.com <br>主题: Re: [Libguestfs] cannot connect to channel device <br> <br><br>On Mon, Jul 07, 2014 at 09:23:05AM +0800, fangtuo90 wrote:<br>> Here is what I got.<br>> root@ubuntu:/home/john# virsh start ubuntu2<br>> error: Failed to start domain ubuntu2<br>> error: internal error Process exited while reading console log output: char device redirected to /dev/pts/1<br>> bind(unix:/var/lib/libvirt/qemu/ubuntu2.libguestfs): Permission denied<br>> chardev: opening backend "socket" failed: Permission denied<br>> <br>> root@ubuntu:/home/john# ll /var/lib/libvirt/qemu/<br>> total 20<br>> drwxr-x--- 5 libvirt-qemu kvm 4096 Jul 5 14:44 ./<br>> drwxr-xr-x 8 root root 4096 May 20 04:18 ../<br>> drwxr-xr-x 2 libvirt-qemu kvm 4096 May 20 04:18 dump/<br>> drwxr-xr-x 2 libvirt-qemu kvm 4096 May 20 04:18 save/<br>> drwxr-xr-x 2 libvirt-qemu kvm 4096 May 20 04:18 snapshot/<br><br>I'm guessing this is some kind of permissions or SELinux labelling<br>problem, but I don't know specifically what the problem is.<br><br>Have a look at the libvirt configuration file /etc/libvirt/qemu.conf<br>to see what user qemu runs as. Also if using SELinux or AppArmor then<br>look for alerts there.<br><br>You might be better off asking on the libvirt-users mailing list.<br><br>Rich.<br><br>> root@ubuntu:/home/john# cat /etc/libvirt/qemu/ubuntu2.xml<br>> <!--<br>> WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE<br>> OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:<br>> virsh edit ubuntu2<br>> or other application using the libvirt API.<br>> --><br>> <br>> <domain type='kvm' xmlns:qemu='/schemas/domain/qemu/1.0'><br>> <qemu:commandline><br>> <qemu:arg value='-s'/><br>> </qemu:commandline><br>> <name>ubuntu2</name><br>> <uuid>03f4c36d-9509-05dd-167d-d2613d1dd883</uuid><br>> <memory>1024000</memory><br>> <currentMemory>1024000</currentMemory><br>> <vcpu>1</vcpu><br>> <os><br>> <type arch='x86_64' machine='pc-1.0'>hvm</type><br>> <boot dev='hd'/><br>> </os><br>> <features><br>> <acpi/><br>> <apic/><br>> <pae/><br>> </features><br>> <clock offset='utc'/><br>> <on_poweroff>destroy</on_poweroff><br>> <on_reboot>restart</on_reboot><br>> <on_crash>restart</on_crash><br>> <devices><br>> <emulator>/usr/bin/kvm</emulator><br>> <disk type='file' device='disk'><br>> <driver name='qemu' type='qcow2'/><br>> <source file='/home/john/ubuntu-1204-vm.img'/><br>> <target dev='hda' bus='ide'/><br>> <address type='drive' controller='0' bus='0' unit='0'/><br>> </disk><br>> <controller type='ide' index='0'><br>> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/><br>> </controller><br>> <interface type='bridge'><br>> <mac address='52:54:00:d4:7d:07'/><br>> <source bridge='br0'/><br>> <model type='virtio'/><br>> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/><br>> </interface><br>> <serial type='pty'><br>> <target port='0'/><br>> </serial><br>> <console type='pty'><br>> <target type='serial' port='0'/><br>> </console><br>> <input type='mouse' bus='ps2'/><br>> <graphics type='vnc' port='-1' autoport='yes'/><br>> <sound model='ich6'><br>> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/><br>> </sound><br>> <video><br>> <model type='cirrus' vram='9216' heads='1'/><br>> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/><br>> </video><br>> <memballoon model='virtio'><br>> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/><br>> </memballoon><br>> <channel type='unix'><br>> <source mode='bind' path='/var/lib/libvirt/qemu/ubuntu2.libguestfs' /><br>> <target type='virtio' name='org.libguestfs.channel.0' /><br>> </channel><br>> </devices><br>> </domain><br>> <br>> When I deleted the <channel>...</channel> part, it will start normally. But I need it to use guestfish with --live option.<br><br>> _______________________________________________<br>> Libguestfs mailing list<br>> Libguestfs@redhat.com<br>> https://www.redhat.com/mailman/listinfo/libguestfs<br><br><br>-- <br>Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones<br>Read my programming and virtualization blog: http://rwmj.wordpress.com<br>virt-builder quickly builds VMs from scratch<br>http://libguestfs.org/virt-builder.1.html<br></body>