[libvirt-users] Live migration with 2 nodes and no SAN
by Trey Dockendorf
I'd like to begin using live migrations with my KVM install, but I do not
have any shared storage. I will have 2 identical nodes, with their own
local storage. Everything I've read seems to point to DRDB, but I am not
finding many resources on how to implement DRDB + qcow2 + KVM.
Currently I've been using virt-manager to manage my VMs which are all using
qcow2 images. With a setup using DRDB, if I mount the replicated device to
/var/lib/libvirt/images, what ensures that each virtual disk is only being
used by a single node until migration is needed? I have no experience with
HA systems or services.
What suggestions or experiences has anyone had with this type of setup? Any
advice is welcome.
Thanks
- Trey
13 years
[libvirt-users] delete lvm problem: exited with non-zero status 5 and signal 0
by lingjiao.lc
hi,
I use the libvirt-python to manage my virtual machine. When I delete a
volume use vol.delete(0), sometimes it note me that has occur the error:
libvirtError: internal error '/sbin/lvremove
-f /dev/vg.vmms/lvm-v097222.sqa.cm4' exited with
non-zero status 5 and signal 0: Can't remove open
logical volume "lvm-v097222.sqa.cm4".
then I go to the host and run the command:
" sudo lvchange -a n /dev/vg.vmms/lvm-v097222.sqa.cm4"
and then the volume could delete use vol.delete(0).
But it's not often occur, just once in nearly 8.
I know the delete function virStorageBackendLogicalDeleteVol as this:
{
{
const char *cmdargv[] = {
LVREMOVE, "-f",vol->target.path, NULL
};
virCheckFlags(0, -1);
virFileWaitForDevices();
if (virRun(cmdargv, NULL) < 0)
return -1;
return 0;
}
Could I change it like this: ?
if (virRun(cmdargv, NULL) < 0)
const char *changeCmdarg[] = {
LVCHANGE, "-a", "n", vol->target.path, NULL
};
if(virRun(changeCmdarg, NULL) < 0)
return -1;
else
if(virRun(cmdargv,NULL) < 0)
return -1;
________________________________
This email (including any attachments) is confidential and may be legally privileged. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you.
本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内容。谢谢。
13 years
[libvirt-users] Need help to compile libvirt-php
by vmnode guy
Hi guys,
I try to compile the libvirt-php but no luck, below are the output i got..
webserver:~/libvirt-php-0.4.3 # ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking for virConnectOpen in -lvirt... yes
checking dependency style of gcc... (cached) none
checking whether to disable maintainer-specific portions of Makefiles... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) none
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... (cached) gawk
checking for echo... echo
checking for rm... rm
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBXML... yes
checking for xsltproc... /usr/bin/xsltproc
checking for xmllint... /usr/bin/xmllint
checking for xmlcatalog... /usr/bin/xmlcatalog
checking for php-config... no
*configure: error: php-config not found; please install the PHP SDK*
webserver:~/libvirt-php-0.4.3 # ls /etc/php5/
apache2/ cli/ conf.d/
webserver:~/libvirt-php-0.4.3 # ls /etc/php5/apache2/
php.ini
webserver:~/libvirt-php-0.4.3 #
Regards,
Peter
13 years
[libvirt-users] live migration without shared storage problems.
by Luengffy XUE
Hi, all
I migrate a vm from source host to the destination host.
I am sure every part is ok for migration.
1 Create the image in the destination and change the user and group.
2 Open TCP socket in the destination host.
and I migrate in the source host command line.
$ virsh migrate --live --copy-storage-all vmubuntu
qemu+ssh://destinationHost/system --verbose
But I get the error
"error: operation failed : failed to retrieve chardev info inqemu with
'info chardev'"
In the destination I find in the vmubuntu.log
The error is
"Migration failed. Exit code tcp:0.0.0.0:49170(-98),exiting."
What can I do to solve it ?
I do not understand how the error comes.
Anyone can help me ?
Thanks in advance.
13 years, 1 month
[libvirt-users] Start of libvirtd fails with error "undefined symbol: __virAlloc"
by Langenbach, Steffen
Hello List
like described in the topic I have a problem with starting the libvirtd. I'm a complete newbie with libvirtd, today I heard the first time that such a daemon exists after I get the message that our webserver isn't running (a former colleague has installed this system).
We have the following configuration: A Ubuntu based host on which our webserver runs within a qemu virtual machine.
The following happens: Yesterday the host restarted (at the moment we don't know the reason) and since this restart libvirtd did not start up.
How I found that out: When I try to start the virtual machine with "virsh start z-web" I get the error:
"Connecting to uri: qemu:///session
libvir: Remote error : unable to connect to '/var/run/libvirt/libvirt-sock': No such file or directory
error: failed to connect to the hypervisor"
As explained, I'm a total Newbie with libvirtd. So as far as I know, the libvirt-sock is generated by libvirtd when it's running. I don't know the right way how to start libvirtd. I tried it by just typing "libvirtd", but that generates this error: "libvirtd: symbol lookup error: libvirtd: undefined symbol: __virAlloc".
I can't find any log-entry that gives me more information about this error.
Does anybody can help me with this problem? In which logfiles does libvirtd normaly writes such errormessages? Or what can the problem be? If you need more information about the configuration or something else, I can find that out, if you tell me where ;)
Thanks alot for your help!
Kind regards,
Steffen
________________________________
Steffen Langenbach
IT-Administration
Tel: +49 6151 50031-66
Fax: +49 6151 50031-40
Steffen.Langenbach(a)mechatronic.de
[http://www.mechatronic.de/fileadmin/gfx/mechatronic_mail.jpg]
________________________________
Mechatronic AG • Wittichstraße 2, 64295 Darmstadt; DE • Tel +49 6151 50031-66 • Fax +49 6151 50031-40
________________________________
Diese E-Mail enthält vertrauliche Informationen. Wenn Sie diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Die Anfertigung unerlaubter Kopien, die Weitergabe der Information sowie die unbefugte Weitersendung der E-Mail ist nicht gestattet.
This e-mail contains confidential information. If you wrongly received this e-mail, please inform the sender immediately and delete this e-mail. Unauthorised copying, disclosure or distribution of this e-mail is strictly forbidden.
Amtsgericht: Darmstadt, Sitz: Darmstadt, HRB 9437
Vorstand: Thomas Ullmann (Vors./CEO)
Vorsitzender des Aufsichtsrats: Dr. Alexander Geilert
13 years, 1 month
[libvirt-users] how to setup libvirt with java bindings for use
by Dan Hirsch
Hi,
I would like to use libvirt to manipulate virtual machines of different
types (KVM, ESXi etc.)
I added dependencies to my project the libvirt and jna jars.
trying to execute your example code I am getting a run time exception saying
the library cann't be found.
it an actual libvirt c library is also required, and needs to be compiled
separately?
can you please write down all needed steps for using libvirt with java
binding?
thanks in advance.
13 years, 1 month
Re: [libvirt-users] virsh start VM failed
by Eric Blake
[re-adding the list]
On 10/26/2011 09:37 AM, 邱敏鈴 wrote:
> linux distribution : linux2.6.35-30-server version : ubuntu10.10
>
> virsh # version
> Compiled against library: libvir 0.8.3
> Using library: libvir 0.8.3
> Using API: QEMU 0.8.3
> Running hypervisor: QEMU 0.12.5
>
> /var/log/libvirt/qemu/controlnode.log
> LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
> QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 1024 -smp
> 2,sockets=2,cores=1,threads=1 -name controlnode -uuid
> ce48e7d5-de02-8faf-c829-9e000ca49b2b -nodefaults -chardev
> socket,id=monitor,path=/var/lib/libvirt/qemu/controlnode.monitor,server,nowait
> -mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive
> file=/vm/vm1/ubuntu-kvm/tmpkzLes0.qcow2,if=none,id=drive-ide0-0-0,boot=on,format=qcow2
> -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -device
> virtio-net-pci,vlan=0,id=net0,mac=52:54:00:17:a2:d0,bus=pci.0,addr=0x3 -net
> tap,fd=37,vlan=0,name=hostnet0 -usb -vnc 127.0.0.1:0 -vga cirrus -device
> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
> bind(unix:/var/lib/libvirt/qemu/controlnode.monitor): Permission denied
> chardev: opening backend "socket" failed
This part of the log looks suspicious. Could this be an installation
issue, or perhaps AppArmor not configured correctly?
>
> virsh # dumpxml controlnode
> <domain type='kvm'>
> <name>controlnode</name>
> <uuid>ce48e7d5-de02-8faf-c829-9e000ca49b2b</uuid>
> <memory>1048576</memory>
> <currentMemory>1048576</currentMemory>
> <vcpu>2</vcpu>
> <os>
> <type arch='x86_64' machine='pc-0.12'>hvm</type>
> <boot dev='hd'/>
> </os>
> <features>
> <acpi/>
> </features>
> <clock offset='utc'/>
> <on_poweroff>destroy</on_poweroff>
> <on_reboot>restart</on_reboot>
> <on_crash>destroy</on_crash>
> <devices>
> <emulator>/usr/bin/kvm</emulator>
> <disk type='file' device='disk'>
> <driver name='qemu' type='qcow2'/>
> <source file='/vm/vm1/ubuntu-kvm/tmpkzLes0.qcow2'/>
> <target dev='hda' bus='ide'/>
> <address type='drive' controller='0' bus='0' 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:17:a2:d0'/>
> <source bridge='br0'/>
> <target dev='vnet0'/>
> <model type='virtio'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
> </interface>
> <input type='mouse' bus='ps2'/>
> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'/>
> <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='0x04'
> function='0x0'/>
> </memballoon>
> </devices>
> </domain>
>
> virsh # managedsave-remove controlnode couldn't help!
Nothing in that XML jumped out as suspicious to me. And from the sound
of your managedsave-remote not making a difference, my guess of a
corrupt managed save image getting in the way is a red herring. I'm not
sure what to suggest trying next. Maybe others can chime in...
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
13 years, 1 month
[libvirt-users] virsh start VM failed
by 邱敏鈴
Dear,
I encountered some problems when I used the virsh to start my virtual
machines. I had tried some ways but I still couldn't solve it.
Please help me, thanks.
error messages :
virsh # start controlnode
error: Failed to start domain controlnode
error: internal error process exited while connecting to monitor:
bind(unix:/var/lib/libvirt/qemu/controlnode.monitor): Permission denied
chardev: opening backend "socket" failed
13 years, 1 month
[libvirt-users] How to use "virsh migrat" with p2p option?
by Guangya Liu
Hi libvirt support,
Can you please give me some example of how to use "virsh migrate --live" with p2p option including both source host and target host?
I try to get some info from your website, but no info with migrate.
[root@vmoactive02 qemu]# virsh help migrate
NAME
migrate - migrate domain to another host
SYNOPSIS
migrate [--live] [--p2p] [--direct] [--tunnelled] [--persistent] [--undefinesource] [--suspend] [--copy-storage-all] [--copy-storage-inc] <domain> <desturi> [<migrateuri>] [<dname>]
DESCRIPTION
Migrate domain to another host. Add --live for live migration.
OPTIONS
--live live migration
--p2p peer-2-peer migration
--direct direct migration
--tunnelled tunnelled migration
--persistent persist VM on destination
--undefinesource undefine VM on source
--suspend do not restart the domain on the destination host
--copy-storage-all migration with non-shared storage with full disk copy
--copy-storage-inc migration with non-shared storage with incremental copy (same base image shared between source and destination)
[--domain] <string> domain name, id or uuid
[--desturi] <string> connection URI of the destination host
[--migrateuri] <string> migration URI, usually can be omitted
[--dname] <string> rename to new name during migration (if supported)
Thanks,
Guangya
13 years, 1 month
[libvirt-users] Fwd: Re: Unable to acquire lock
by Trey Dockendorf
Accidentally sent to OP only.
This has been with 0.8.7 on CentOS 6 CR that Ive had the problem.
---------- Forwarded message ----------
From: "Trey Dockendorf" <treydock(a)gmail.com>
Date: Oct 24, 2011 12:31 AM
Subject: Re: [libvirt-users] Unable to acquire lock
To: "Jatin Kumar" <cs5090243(a)cse.iitd.ernet.in>
On Mon, Oct 24, 2011 at 12:05 AM, Jatin Kumar
<cs5090243(a)cse.iitd.ernet.in>wrote:
> Hello,
> I am trying to execute virsh commands on a host but it is giving errors
> due to failure in acquiring lock.
>
> root@kvm01:~# virsh suspend blindone
> error: Failed to suspend domain blindone
> error: Timed out during operation: cannot acquire state change lock
>
> Any suggestions how can we figure out possible reasons.
>
> --
> Jatin
>
> _______________________________________________
> libvirt-users mailing list
> libvirt-users(a)redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users
>
I've run into this a few times when a snapshot hangs. Unfortunately I can't
offer much advice on why it happens, but increasing log verbosity may help
troubleshoot it. These are the relevant lines I use in
/etc/libvirt/libvirtd.conf
log_level = 2
log_filters="2:remote 2:event"
log_outputs="2:file:/var/log/libvirt/libvirtd.log"
Be careful with level 1 alerts...I generated a 100GB text log in 3 days.
To fix that problem and unlock a VM, you need to kill libvirt, remove the
PID files and start libvirt
# service libvirtd stop
# rm -rfv /var/run/libvirt
# service libvirtd start
More information here, https://bugzilla.redhat.com/show_bug.cgi?id=676205
- Trey
13 years, 1 month