[libvirt-users] Libvirt and Glusterfs
by Pierre-Gilles Mialon
Hi,
On a Fedora 18, I try to launch a VM with QEMU-GlusterFS native integration.
I have enable fedora-virt-preview repo, and gluster-alpha3 repo.
Below the list of installed package :
glusterfs-3.4.0-0.3.alpha3.fc18.x86_64
glusterfs-devel-3.4.0-0.3.alpha3.fc18.x86_64
glusterfs-fuse-3.4.0-0.3.alpha3.fc18.x86_64
glusterfs-server-3.4.0-0.3.alpha3.fc18.x86_64
ipxe-roms-qemu-20130103-2.git717279a.fc18.noarch
libvirt-1.0.4-1.fc18.x86_64
libvirt-client-1.0.4-1.fc18.x86_64
libvirt-daemon-1.0.4-1.fc18.x86_64
libvirt-daemon-config-network-1.0.4-1.fc18.x86_64
libvirt-daemon-config-nwfilter-1.0.4-1.fc18.x86_64
libvirt-daemon-driver-interface-1.0.4-1.fc18.x86_64
libvirt-daemon-driver-libxl-1.0.4-1.fc18.x86_64
libvirt-daemon-driver-lxc-1.0.4-1.fc18.x86_64
libvirt-daemon-driver-network-1.0.4-1.fc18.x86_64
libvirt-daemon-driver-nodedev-1.0.4-1.fc18.x86_64
libvirt-daemon-driver-nwfilter-1.0.4-1.fc18.x86_64
libvirt-daemon-driver-qemu-1.0.4-1.fc18.x86_64
libvirt-daemon-driver-secret-1.0.4-1.fc18.x86_64
libvirt-daemon-driver-storage-1.0.4-1.fc18.x86_64
libvirt-daemon-driver-uml-1.0.4-1.fc18.x86_64
libvirt-daemon-driver-xen-1.0.4-1.fc18.x86_64
libvirt-python-1.0.4-1.fc18.x86_64
qemu-common-1.4.1-2.fc18.x86_64
qemu-img-1.4.1-2.fc18.x86_64
qemu-kvm-1.4.1-2.fc18.x86_64
qemu-system-arm-1.4.1-2.fc18.x86_64
qemu-system-x86-1.4.1-2.fc18.x86_64
I have recompiled Qemu with –enable-glusterfs .
Here the content of my /etc/glusterfs/glusterd.vol
volume management
type mgmt/glusterd
option working-directory /var/lib/glusterd
option transport-type socket
option transport.socket.nodelay on
option transport.socket.keepalive-time 10
option transport.socket.keepalive-interval 2
option transport.socket.read-fail-log off
option rpc-auth.ports.insecure yes
option rpc-auth-allow-insecure on
end-volume
I have defined the following line in my domain.xml
<disk type='network' device='disk'>
<driver name='qemu' cache='none'/>
<source protocol='gluster' name='gv1/test.img'>
<host name='127.0.0.1' transport='tcp' />
</source>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
</disk>
# virsh start test
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
QEMU_AUDIO_DRV=spice /usr/bin/qemu-kvm -name test -S -M pc-i440fx-1.4 -m
1024 -smp 1,sockets=1,cores=1,threads=1 -uuid
4c8686bc-9da9-c61d-cd85-8b2865ea4124 -no-user-config -nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/test.monitor,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown
-boot order=dc,menu=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -drive
file=gluster://
127.0.0.1:24007/gv1/test.img,if=none,id=drive-virtio-disk0,cache=none-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0
-netdev tap,fd=26,id=hostnet0,vhost=on,vhostfd=27 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:cf:d2:62,bus=pci.0,addr=0x3
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -chardev
spicevmc,id=charchannel0,name=vdagent -device
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0
-device usb-tablet,id=input0 -spice
port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -vga qxl
-global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
char device redirected to /dev/pts/4 (label charserial0)
qemu-system-x86_64: -drive file=gluster://
127.0.0.1:24007/gv1/test.img,if=none,id=drive-virtio-disk0,cache=none:
Gluster connection failed for server=127.0.0.1 port=24007 volume=gv1
image=test.img transport=tcp
qemu-system-x86_64: -drive file=gluster://
127.0.0.1:24007/gv1/test.img,if=none,id=drive-virtio-disk0,cache=none:
could not open disk image gluster://127.0.0.1:24007/gv1/test.img: No data
available
2013-04-30 10:39:44.466+0000: shutting down
but launching qemu with commant line work great :
# qemu-system-x86_64 -name test -M pc-i440fx-1.4 -m 1024 -smp 1 -drive
file=gluster://
127.0.0.1:24007/gv1/test.img,if=none,id=drive-virtio-disk0,cache=none-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0
Am I missing something ?
Regards,
--
Pierre-Gilles Mialon
11 years, 6 months
[libvirt-users] virt-install creates a snapshot as the volume backend
by Ahmed Ossama
Greetings All,
I was running libvirt-0.9.10 on CentOS 6.3 and it was working perfectly
until yesterday when I decided to update to 6.4, which upgraded
libvirt-0.9.10 to libvirt-0.10.2.
I have a storage pool of type volume group, upon upgrading to
libvirt-0.10.2, the disk image gets created as a snapshot on the volume
group not as a regular volume.
Now every time I create a vm using virt-install on a vg, the lv gets
created as a snapshot not a regular lv, as a result I get the following
error when I run dmesg:
device-mapper: snapshots: Invalidating snapshot: Unable to allocate
exception.
Buffer I/O error on device dm-5, logical block 128251
Buffer I/O error on device dm-5, logical block 256
lost page write due to I/O error on dm-5
Buffer I/O error on device dm-5, logical block 257
lost page write due to I/O error on dm-5
Buffer I/O error on device dm-5, logical block 258
lost page write due to I/O error on dm-5
Buffer I/O error on device dm-5, logical block 259
lost page write due to I/O error on dm-5
Buffer I/O error on device dm-5, logical block 260
lost page write due to I/O error on dm-5
Buffer I/O error on device dm-5, logical block 261
lost page write due to I/O error on dm-5
Buffer I/O error on device dm-5, logical block 262
lost page write due to I/O error on dm-5
Buffer I/O error on device dm-5, logical block 263
lost page write due to I/O error on dm-5
lost page write due to I/O error on dm-5
and the following on the domain's log file:
block I/O error in device 'drive-virtio-disk0': Input/output error (5)
# virt-install --name="ns1" --vcpus="2" --check-cpu --ram=512
--os-variant="rhel6" --network "bridge=br0" --disk
"pool=vdisks,size=22,cache=writeback" --vnc --hvm --vnclisten="0.0.0.0"
--cdrom="/mnt/ISOs/centos/x86_64/CentOS-6.3-x86_64-bin-DVD1.iso" --hvm
# lvs | grep ns
ns1.img vm_volumes swi-aos-- 4.00m [ns1.img_vorigin] 0.00
When I try to create a volume using virt-manager on the volume group, it
gets created as a snapshot. But when I create a volume using virsh, it
gets created correctly;
virsh # vol-create-as vdisks test 23622320128
# lvs | grep test
test vm_volumes -wi-a---- 22.00g
If anyone came across this issue or can provide an advice, I will
appreciate it so much.
--
Best Regards,
Ahmed Ossama
11 years, 6 months
[libvirt-users] No route to host
by digvijay chauhan
Hello,
I tried to migrate the virtual machine using kvm,but it is
giving me the error, "LIBVIRT ERROR NO ROUTE TO HOST" .How can i solve it.
regards,
DIgvijaySingh
11 years, 7 months
[libvirt-users] How to tell if a hypervisor connection has died?
by Guido Winkelmann
Hi,
What's the best way to tell if a virConnect object is not good to use anymore?
(For example because the libvirtd on the other side crashed/has been stopped
or because of some network failure)
When I try this, the first API call I do on a broken connection yields an
error with error number 38 (VIR_ERR_SYSTEM_ERROR) and all subsequent calls
yield an error number 1 (VIR_ERR_INTERNAL_ERROR). Both of those are really
unhelpful and could mean just about anything...
Guido
11 years, 7 months
[libvirt-users] how to control usb read write perm
by yue
hi,all
i have 2 questions. both is related to spice usb redirect.
1. if i can control RW perm of usb device which is producted via spice ? in order to control user's rw operation in guestVM .
2.if user have several usbs, and plug them at the same time when using spice client. if i can control which usb(s) can be accessed by user in guestVM?
thanks
11 years, 7 months
[libvirt-users] 答复: libvirt_lxc start problem when selinux enbale
by Huang,Chaochang
Sorry
“There is avc error messages in dmesg ……”
――should be “There is no avc error……”
发件人: Huang,Chaochang
发送时间: 2013年4月25日 15:41
收件人: 'libvir-list(a)redhat.com'; 'libvirt-users(a)redhat.com'
主题: libvirt_lxc start problem when selinux enbale
Hi,all:
the problem came out when selinux was enforced in targeted+MCS
I start lxc through virsh――“virsh -c lxc:/// start instance-00004bd6”
1. When selinux is Permissive,lxc start is ok
The result of “Ps auxZ” is:
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 19218 0.0 0.0 47624 1244 ? Ss 15:26 0:00 /usr/libexec/libvirt_lxc --name
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19219 0.3 0.0 19276 1532 ? Ss 15:26 0:00 /sbin/init
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19406 0.0 0.0 177444 1332 ? Sl 15:26 0:00 /sbin/rsyslogd -i /var/run/sysl
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19420 0.0 0.0 64120 1144 ? Ss 15:26 0:00 /usr/sbin/sshd
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19427 0.0 0.0 22136 956 ? Ss 15:26 0:00 xinetd -stayalive -pidfile /var
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19434 0.0 0.0 64316 832 ? Ss 15:26 0:00 /usr/sbin/saslauthd -m /var/run
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19435 0.0 0.0 64316 600 ? S 15:26 0:00 /usr/sbin/saslauthd -m /var/run
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19450 0.0 0.0 82388 2392 ? Ss 15:26 0:00 sendmail: rejecting new message
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 51 19459 0.0 0.0 78116 2016 ? Ss 15:26 0:00 sendmail: Queue runner@01:00:00
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19467 0.0 0.0 175528 3672 ? Ss 15:26 0:00 /usr/sbin/httpd
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 48 19470 0.0 0.0 175528 2204 ? S 15:26 0:00 /usr/sbin/httpd
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19475 0.0 0.0 117212 1348 ? Ss 15:26 0:00 crond
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19491 0.0 0.0 4108 600 pts/0 Ss+ 15:26 0:00 /sbin/mingetty /dev/tty1
We can get into the lxc through “ssh”
2. When selinux is Enforcing,lxc start bad
Th result of “ps auxZ” is:
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 20624 0.0 0.0 47624 1244 ? Ss 15:29 0:00 /usr/libexec/libvirt_lxc --name
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 20625 0.0 0.0 17172 1036 pts/0 Ss+ 15:29 0:00 /sbin/init
Only /sbin/init process started, no else. This is the real problem
There is avc error messages in dmesg、/var/log/messages、/var/log/secure, and the same with selinux is Permissive
Can anybody give some hints?
Here are some system information:
Kernel version
3.3.4
Libvirt version
0.9.13
Lxc guest image
Centos 6.3
Lxc xml info is:
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit instance-00004bd6
or other application using the libvirt API.
-->
<domain type='lxc'>
<name>instance-00004bd6</name>
<uuid>96eada0e-7ea0-4865-8271-3565811c8eb0</uuid>
<memory unit='KiB'>524288</memory>
<currentMemory unit='KiB'>524288</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64'>exe</type>
<init>/sbin/init</init>
<cmdline>console=ttyS0</cmdline>
</os>
<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' accessmode='passthrough'>
<source dir='/home/stack/nova_state/instances/instance-00004bd6/rootfs'/>
<target dir='/'/>
</filesystem>
<interface type='bridge'>
<mac address='fa:16:3e:09:00:a2'/>
<source bridge='br100'/>
<filterref filter='nova-instance-instance-00004bd6-fa163e0900a2'>
<parameter name='DHCPSERVER' value='10.0.0.1'/>
<parameter name='IP' value='10.0.0.11'/>
<parameter name='PROJMASK' value='255.255.254.0'/>
<parameter name='PROJNET' value='10.0.0.0'/>
</filterref>
</interface>
<console type='pty'>
<target type='lxc' port='0'/>
</console>
</devices>
<seclabel type='static' model='selinux' relabel='yes'>
<label>system_u:system_r:svirt_lxc_net_t:s0:c192,c392</label>
</seclabel>
</domain>
Best Regard
Huangchaochang
11 years, 7 months
[libvirt-users] libvirt_lxc start problem when selinux enbale
by Huang,Chaochang
Hi,all:
the problem came out when selinux was enforced in targeted+MCS
I start lxc through virsh――“virsh -c lxc:/// start instance-00004bd6”
1. When selinux is Permissive,lxc start is ok
The result of “Ps auxZ” is:
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 19218 0.0 0.0 47624 1244 ? Ss 15:26 0:00 /usr/libexec/libvirt_lxc --name
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19219 0.3 0.0 19276 1532 ? Ss 15:26 0:00 /sbin/init
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19406 0.0 0.0 177444 1332 ? Sl 15:26 0:00 /sbin/rsyslogd -i /var/run/sysl
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19420 0.0 0.0 64120 1144 ? Ss 15:26 0:00 /usr/sbin/sshd
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19427 0.0 0.0 22136 956 ? Ss 15:26 0:00 xinetd -stayalive -pidfile /var
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19434 0.0 0.0 64316 832 ? Ss 15:26 0:00 /usr/sbin/saslauthd -m /var/run
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19435 0.0 0.0 64316 600 ? S 15:26 0:00 /usr/sbin/saslauthd -m /var/run
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19450 0.0 0.0 82388 2392 ? Ss 15:26 0:00 sendmail: rejecting new message
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 51 19459 0.0 0.0 78116 2016 ? Ss 15:26 0:00 sendmail: Queue runner@01:00:00
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19467 0.0 0.0 175528 3672 ? Ss 15:26 0:00 /usr/sbin/httpd
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 48 19470 0.0 0.0 175528 2204 ? S 15:26 0:00 /usr/sbin/httpd
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19475 0.0 0.0 117212 1348 ? Ss 15:26 0:00 crond
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 19491 0.0 0.0 4108 600 pts/0 Ss+ 15:26 0:00 /sbin/mingetty /dev/tty1
We can get into the lxc through “ssh”
2. When selinux is Enforcing,lxc start bad
Th result of “ps auxZ” is:
system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 20624 0.0 0.0 47624 1244 ? Ss 15:29 0:00 /usr/libexec/libvirt_lxc --name
system_u:system_r:svirt_lxc_net_t:s0:c192,c392 root 20625 0.0 0.0 17172 1036 pts/0 Ss+ 15:29 0:00 /sbin/init
Only /sbin/init process started, no else. This is the real problem
There is avc error messages in dmesg、/var/log/messages、/var/log/secure, and the same with selinux is Permissive
Can anybody give some hints?
Here are some system information:
Kernel version
3.3.4
Libvirt version
0.9.13
Lxc guest image
Centos 6.3
Lxc xml info is:
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit instance-00004bd6
or other application using the libvirt API.
-->
<domain type='lxc'>
<name>instance-00004bd6</name>
<uuid>96eada0e-7ea0-4865-8271-3565811c8eb0</uuid>
<memory unit='KiB'>524288</memory>
<currentMemory unit='KiB'>524288</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64'>exe</type>
<init>/sbin/init</init>
<cmdline>console=ttyS0</cmdline>
</os>
<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' accessmode='passthrough'>
<source dir='/home/stack/nova_state/instances/instance-00004bd6/rootfs'/>
<target dir='/'/>
</filesystem>
<interface type='bridge'>
<mac address='fa:16:3e:09:00:a2'/>
<source bridge='br100'/>
<filterref filter='nova-instance-instance-00004bd6-fa163e0900a2'>
<parameter name='DHCPSERVER' value='10.0.0.1'/>
<parameter name='IP' value='10.0.0.11'/>
<parameter name='PROJMASK' value='255.255.254.0'/>
<parameter name='PROJNET' value='10.0.0.0'/>
</filterref>
</interface>
<console type='pty'>
<target type='lxc' port='0'/>
</console>
</devices>
<seclabel type='static' model='selinux' relabel='yes'>
<label>system_u:system_r:svirt_lxc_net_t:s0:c192,c392</label>
</seclabel>
</domain>
Best Regard
Huangchaochang
11 years, 7 months
[libvirt-users] how to control usb read write perm
by yue
hi,all
i have 2 questions. both is related to spice usb redirect.
1. if i can control RW perm of usb device which is producted via spice ? in order to control user's rw operation in guestVM .
2.if user have several usbs, and plug them at the same time when using spice client. if i can control which usb(s) can be accessed by user in guestVM?
thanks
11 years, 7 months
[libvirt-users] dnsmasq does not start
by Alexey Kardashevskiy
Hi!
I am trying to run tap networking with libvirtd.
My test system is Fedora18/ppc64, libvirt 1.0.4 (compiled from git and
installed). On another system with Fedora17/ppc64 with the same settings,
dnsmasq is running. All configs in /etc/libvirt/ are default and not
changed, the only exception is /etc/libvirt/qemu/networks/default.xml which
I copied from Fedora17/ppc64 setup.
What does exactly force libvirtd to start dnsmasq?
Some debug info:
[root@vpl2 ~]# ps ax | egrep \(dnsmasq\|libvirt\)
9021 ? Ssl 0:00 /usr/sbin/libvirtd
9271 pts/0 S+ 0:00 egrep --color=auto (dnsmasq|libvirt)
[root@vpl2 ~]#
[root@vpl2 ~]# cat /etc/libvirt/qemu/networks/default.xml
<network>
<name>default</name>
<bridge name="virbr%d" />
<forward/>
<ip address="192.168.122.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.122.2" end="192.168.122.254" />
</dhcp>
</ip>
</network>
[root@vpl2 ~]#
[root@vpl2 ~]# service libvirtd restart
Redirecting to /bin/systemctl restart libvirtd.service
[root@vpl2 ~]#
[root@vpl2 ~]#
[root@vpl2 ~]# ps ax | egrep \(dnsmasq\|libvirt\)
9365 ? Ssl 0:00 /usr/sbin/libvirtd
9507 pts/0 S+ 0:00 egrep --color=auto (dnsmasq|libvirt)
[root@vpl2 ~]#
[root@vpl2 ~]# ls -laR /var/log/libvirt/
/var/log/libvirt/:
total 20
drwx------. 5 root root 4096 Apr 9 16:51 .
drwxr-xr-x. 18 root root 4096 Apr 24 13:48 ..
drwx------. 2 root root 4096 Apr 9 16:51 lxc
drwx------. 2 root root 4096 Apr 24 17:22 qemu
drwx------. 2 root root 4096 Apr 9 16:51 uml
/var/log/libvirt/lxc:
total 8
drwx------. 2 root root 4096 Apr 9 16:51 .
drwx------. 5 root root 4096 Apr 9 16:51 ..
/var/log/libvirt/qemu:
total 8
drwx------. 2 root root 4096 Apr 24 17:22 .
drwx------. 5 root root 4096 Apr 9 16:51 ..
/var/log/libvirt/uml:
total 8
drwx------. 2 root root 4096 Apr 9 16:51 .
drwx------. 5 root root 4096 Apr 9 16:51 ..
[root@vpl2 ~]#
--
Alexey
11 years, 7 months