[libvirt-users] virRandomBits - not very random
by Brian Rak
I just ran into an issue where I had about 30 guests get duplicate mac
addresses assigned. These were scattered across 30 different machines.
Some debugging revealed that:
1) All the host machines were restarted within a couple seconds of each
other
2) All the host machines had fairly similar libvirtd pids (within ~100
PIDs of each other)
3) Libvirt seeds the RNG using 'time(NULL) ^ getpid()'
This perfectly explains why I saw so many duplicate mac addresses.
Why is the RNG seed such a predictable value? Surely there has to be a
better source of a random seed then the timestamp and the pid?
The PID seems to me to be a very bad source of any randomness. I just
ran a test across 60 of our hosts. 43 of them shared their PID with at
least one other machine.
6 years, 5 months
[libvirt-users] Libvirt Live Migration
by Dhia Abbassi
I'm trying to implement a virtualization API. I was testing migration with
libvirt I got some problems.
When I use the following command :
*virsh migrate --live --persistent --copy-storage-all vm-clone1
qemu+ssh://server_ip/system*
the migration works fine but in the destination host the migrated vm is
paused and I can't unpause it and I need to reboot the vm to be able use it
in the new host. When I try to unoause it Igot the following error message:
<< *Error unpausing domain: internal error: unable to execute QEMU command
'cont': Resetting the Virtual Machine is required *>>
How can I solve this problem, or is there an other way to make a live
migration with libvirt??
Thank you for you consideration.
--
Best regards
*Dhia Abbassi*
Full Stack Engineer | Rosafi Holding
<http://tn.linkedin.com/in/dhiaabbassi> <https://github.com/DhiaTN>
<https://plus.google.com/u/0/+DhiaAbbassi> <https://twitter.com/DhiaTN>
9 years, 11 months
[libvirt-users] python migrateSetMaxSpeed not taking effect
by Krutskikh Ivan
Hi,
I am writing a simple python script for migrating vm's based on zfs zvol's.
Either I am doing something wrong or python migrateSetMaxSpeed not taking
effect: no mater what value I specify (except for 0), I end up with 10
Mib/s migration speed. The code is:
def virt_migrate(domain):
conn = libvirt.open('qemu:///system')
domain_obj = conn.lookupByName(domain)
dst='qemu+ssh://root@%s/system' % args.remote
domain_obj.migrateSetMaxSpeed(40,0)
new_dom = domain_obj.migrateToURI(dst,libvirt.VIR_MIGRATE_LIVE |
libvirt.VIR_MIGRATE_PEER2PEER | libvirt.VIR_MIGRATE_NON_SHARED_INC |
libvirt.VIR_MIGRATE_PERSIST_DEST | libvirt.VIR_MIGRATE_UNDEFINE_SOURCE,
None, 0)
conn.close()
Also tried to specify bandwidth at migrateToUri- I still get 10 mib/s at
any value...
Thanks in advance!
9 years, 12 months
[libvirt-users] Live Disk Snapshot Not Supported
by Payes Anand
# virsh snapshot-create-as small snap1 --disk-only --atomic
error: Operation not supported: live disk snapshot not supported with this
QEMU binary
OS used: CentOS 7
#virsh version
Compiled against library: libvirt 1.1.1
Using library: libvirt 1.1.1
Using API: QEMU 1.1.1
Running hypervisor: QEMU 1.5.3
Any help would be greatly appreciated.
Best Regards,
Payes
9 years, 12 months
[libvirt-users] how to modify virsh vm start script
by Ady Wahyudi Paundu
I use libvirt to manage a QEMU/KVM system. Starting a VM only by using
> virsh start vmname
What I want to know is how to add an option to virsh vm's start
script, in my case I want to add QEMU logging option (-d and -D). I
can see from
> ps aux | grep qemu
that current VM started using virsh not including those options
~ady
9 years, 12 months
[libvirt-users] Libvirt fullscreen sdl problem
by Дориан Грей
Hi all,
I use libvirt/kvm for my virtualization needs and have a little scerio in
mind that I want to implement: a small linux box boots up, launches an X
session and after that launches a virtual machine with a fullscreen sdl
window, With this I hope to achive several goals: user gets a familiar
experience with guest os ( I had windows in mind), near native graphics
responsiveness ( we deploy cctv video servers and viewing live video in a
virt machine is a must) and security based on isolation from i/o ports.
But when I tried this scenario with
<graphics type='sdl' display=':0.0' xauth='/home/stein/.XAuthority'/>
in xml file I got:
linux-aeo3:/etc/libvirt/qemu # virsh start wintest
setlocale: No such file or directory
error: Failed to start domain wintest
error: internal error: early end of file from monitor: possible problem:
No protocol specified
xcb_connection_has_error() returned true
pulseaudio: pa_context_connect() failed
pulseaudio: Reason: Connection refused
pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio
driver
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: Device or resource busy
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: Device or resource busy
audio: Failed to create voice `dac'
No protocol specified
Could not initialize SDL(No available video device) - exiting
Even if I disable audio and get rid of alsa problems, I still get Could not
initialize SDL(No available video device) - exiting error.
What am I doing wrong?
Please not that lauching qemu-kvm with sdl window goes without problems.
Thanks in advance!
9 years, 12 months
[libvirt-users] Put virbr0 in promiscusous
by Sagar Shedge
Hi ,
I have two virtual machines VM1 and VM2. Then I have added eth0 of my VM
to 'default' network.
Use case :-
I want to monitor all traffic on virbr0('default' network).
Steps followed :-
1. Add VM1 eth0 to virbr0
2. Add VM2 eth1 to virbr0
3. brctl setageing ovsbr0 0 ..(To put bridge in promiscuous)
Now I am running tcpdump on eth1 of VM2 and trying to ping google.com(outside
world)
In VM2 (tcpdump -i eth1), I can see only ingress(incoming) traffic of VM1.
I am not able see outgoing traffic of VM1.
If I create another bridge and trying same scenario with 2 VM then VM2 can
see both ingress and outgress traffic.
So want to know what is the issue?
Is libvirt doing something different with this virtbr0 bridge?
--
Sagar Dilip Shedge,
Pune.
With Regards.
10 years
[libvirt-users] Error starting domain: internal error: missing IFLA_VF_INFO in netlink response
by Hong-Hua.Yin@freescale.com
Hi,
We try PCI Passthrough of host network devices on PPC platform.
http://wiki.libvirt.org/page/Networking#Assignment_with_.3Cinterface_type...
But we got a similar issue as below that reported on RedHat before:
https://bugzilla.redhat.com/show_bug.cgi?id=1040626
With <hostdev>, it could start VM successfully.
<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x4'/>
</source>
</hostdev>
Logged into VM and checked for VF using lspci
root@model : qemu ppce500:~# lspci
00:00.0 PCI bridge: Freescale Semiconductor Inc MPC8533E
00:02.0 Power PC: Freescale Semiconductor Inc Device 0000 (rev 20)
00:03.0 Unclassified device [00ff]: Red Hat, Inc Virtio memory balloon
But it will fail if using <interface type="hostdev">:
<interface type="hostdev" managed="yes">
<mac address="00:e0:0c:00:20:01"/>
<source>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x4"/>
</source>
</interface>
# virsh create vf.xml
2014-11-24 11:08:31.390+0000: 3556: info : libvirt version: 1.2.2
2014-11-24 11:08:31.390+0000: 3556: debug : virLogParseOutputs:1378 : outputs=1:file:virsh.log
error: Failed to create domain from vf.xml
error: internal error: missing IFLA_VF_INFO in netlink response
Exactly We're using max_vfs=2 and libnl-3.2.22
# ls -l /usr/lib64/libnl-3.so.200.17.0
-rwxr-xr-x 1 root root 154440 Sep 17 07:15 /usr/lib64/libnl-3.so.200.17.0
Why this issue happened on PPC? Is there anything architecture-specific support needed to add?
Thanks,
Olivia
10 years
Re: [libvirt-users] some problem with snapshot by libvirt
by Payes Anand
Eric Blake <eblake@...> writes:
>
> On 05/27/2012 06:39 PM, xingxing gao wrote:
> > Hi,all,i am using libvirt to manage my vm,in these days i am testing
> > the libvirt snapshot ,but meet some problem:
> >
> > the snapshot was created from this command:
> > snapshot-create-as win7 --disk-only --diskspec
> > vda,snapshot=external --diskspec hda,snapshot=no
> >
> > but when i tried to revert from the snapshot which created from the
> > above command ,i got error below:
> >
> > virsh # snapshot-revert win7 1338041515 --force
> > error: unsupported configuration: revert to external disk snapshot not
> > supported yet
>
> Yep. You've run into a case where I haven't yet been able to code
> things. The problem is that reverting to a disk image has a question -
> you are starting with two files (the snapshot backing file and the new
> qcow2 wrapper), but the moment you reload the backing file for
> modification, you invalidate the qcow2 wrapper. There are two sane
> options - create yet another qcow2 wrapper around the same backing file,
> or delete the qcow2 wrapper as part of reverting to the snapshot, but we
> would probably need two new flags to the virDomainRevertToSnapshot API
> to select one of these two behaviors. In the meantime, the only way to
> revert to a disk-only snapshot is to manually edit the domain XML to
> match what you want to do, possibly with manual qemu-img operations as
well.
>
> Help in writing the patches to improve the functionality would be welcome.
>
Has the issue ( revert to external disk snapshot ) been solved in later
versions of libvirt?
I am using:
Compiled against library: libvirt 1.2.2
Using library: libvirt 1.2.2
Using API: QEMU 1.2.2
Running hypervisor: QEMU 2.1.92
On trying to revert to an external snapshot,
Getting the error: revert to external disk snapshot not supported yet
If not is there any alternate.
10 years
[libvirt-users] some problem with snapshot by libvirt
by xingxing gao
Hi,all,i am using libvirt to manage my vm,in these days i am testing
the libvirt snapshot ,but meet some problem:
the snapshot was created from this command:
snapshot-create-as win7 --disk-only --diskspec
vda,snapshot=external --diskspec hda,snapshot=no
but when i tried to revert from the snapshot which created from the
above command ,i got error below:
virsh # snapshot-revert win7 1338041515 --force
error: unsupported configuration: revert to external disk snapshot not
supported yet
version:
virsh # version
Compiled against library: libvir 0.9.4
Using library: libvir 0.9.4
Using API: QEMU 0.9.4
Running hypervisor: QEMU 1.0.93
10 years