[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] Freeze Windows Guests For Consistent Storage Snapshots
by Payes Anand
Hi,
Is it possible to freeze windows guests for a consistent storage level
snapshot.
I am using openstack icehouse on centos 6.6
Hypervisor: KVM
Libvirt: 0.10.2
Qemu: 0.10.2
Guest OS: Windows 7 and Windows Server 2008
I was able to freeze Centos guests by issuing the command:
virsh qemu-agent-command <guest_ID> '{"execute":"guest-fsfreeze-freeze"}'
For CentOS guests, I enabled access between compute nodes and guests
through a socket by setting metadata parameter, hw_qemu_guest_agent=yes for
the guest image.
And then installing qemu-guest-agent inside the guest.
What steps do i have to follow for windows ?
Regars,
Payes
9 years, 5 months
[libvirt-users] machine='pc-q35-2.1' and sata controller
by Thomas Stein
Hello.
I'm not able to disable the sata controller on a machine='pc-q35-2.1' type VM.
Whenever i delete:
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f'
function='0x2'/>
</controller>
it gets added again when i close the editor.
The reason i would like to delete the sata controller is this error while
trying to migrate the machine:
2015-02-23 19:04:11.181+0000: 1972: error : qemuMonitorJSONCheckError:381 :
internal error: unable to execute QEMU command 'migrate': State blocked by
non-migratable device '0000:00:1f.2/ich9_ahci'
Someone has an idea to solve this?
thanks and cheers
t.
9 years, 7 months
[libvirt-users] Hyper-V 2008 R2 support ?
by Jean-François FILIPPI
Hi,
I'm trying libvirt to connect to Hyper-V servers. It works fine for
Hyper-V 2012 servers, however it doesn't work for Hyper-V 2008 R2 (the
exact error is |
Call to virConnectOpenAuth failed: internal error: Transport error
during enumeration: Could not connect (7) (Libvirt::ConnectionError)|.).
I'm using the code provided by libvirt documentation
(http://libvirt.org/ruby/examples/open_auth.rb) and have authorized
basic auth plus unencrypted connection on both 2008 R2 & 2012 servers
(http://libvirt.org/drvhyperv.html#auth).
Surfing the Internet to find some solutions, I found this
(https://www.redhat.com/archives/libvir-list/2014-April/msg00802.html)
where a developer talks about stopping 2008 R2 support (because of some
technical stuff), while in the documentation
(http://libvirt.org/drvhyperv.html) it is explicitely said to be
supporting 2008 R2.
My question is : does the support has been stopped or does the code to
connect to a 2008 R2 server is different from the 2012 server ?
I'm using libvirt 1.2.2 and ruby-libvirt 1.2.2.
Thanks for your help,
Jean-François FILPPI
9 years, 8 months
[libvirt-users] Broken OS when booting rootfs from 9p share
by Olivier Mauras
Hello,
I've been trying to boot a VM with the rootfs being a 9P
share from the host. The VM OS is centos 7.
The OS boots but no services
can work and it appears that the authentication system is broken.
Now
the funny thing is that booting the same OS on the same 9P share
manually with Qemu works as expected with a fully functionnal OS... So
I'm wondering what could libvirt do that render the OS on the share
broken - Something with rights ?
Selinux is disabled on the host, and
accessmode to the share is set to passthrough in both cases.
Here's my
working Qemu line:
qemu -kernel
/srv/overlay/kernels/grsec-3.14.33-101/vmlinuz-3.14.33-101.el6.x86_64
-initrd
/srv/overlay/kernels/grsec-3.14.33-101/initramfs-3.14.33-101.el6.x86_64.img
-fsdev
local,id=r,path=/srv/overlay/run/irc,security_model=passthrough
-device virtio-9p-pci,fsdev=r,mount_tag=root
-nographic
-m 256M
-machine pc-i440fx-2.1,accel=kvm
-netdev tap,id=net0 -device
virtio-net,netdev=net0,mac=52:54:00:12:36:34
-smp 1,sockets=1,cores=1
-append 'root=virtfs:root rootflags=trans=virtio,version=9p2000.u ro
rootfstype=9p console=ttyS0'
And here my libvirt VM config:
<domain
type='kvm'>
<name>irc</name>
<uuid>ffbd32eb-a693-eadd-8923-18de80137472</uuid>
<memory
unit='KiB'>262144</memory>
<currentMemory
unit='KiB'>262144</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>
<kernel>/srv/overlay/kernels/grsec-3.14.33-101/vmlinuz-3.14.33-101.el6.x86_64</kernel>
<initrd>/srv/overlay/kernels/grsec-3.14.33-101/initramfs-3.14.33-101.el6.x86_64.img</initrd>
<cmdline>root=virtfs:root rootflags=trans=virtio,version=9p2000.u ro
rootfstype=9p</cmdline>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb'
index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x2'/>
</controller>
<controller type='pci' index='0'
model='pci-root'/>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/srv/overlay/run/irc'/>
<target dir='root'/>
<address
type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</filesystem>
<interface type='bridge'>
<mac
address='52:54:00:00:36:34'/>
<source bridge='br0'/>
<model
type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target
port='0'/>
</serial>
<console type='pty'>
<target type='serial'
port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<input
type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1'
autoport='yes'/>
<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>
My libvirt version is 1.2.9, and
qemu is 2.1.2.
Thanks for your help,
Olivier
9 years, 8 months
[libvirt-users] DriveReady error after live migration
by Steve Gaarder
I have three machines running libvirt under Scientific Linux (RHEL
derivative) version 6. The virtual machine disk images are running SL 5
and 6, are all stored on NFS, and I can do live migrations with
virsh migrate --live guestname qemu+ssh://vmhostname.math.cornell.edu/system
Trouble is, within a day or two after the migration, the guest hangs up
with repeated DriveReady errors and has to be shut down forcibly and
rebooted.
I am using Sanlock, with the lock files also stored on NFS.
Any ideas?
Steve Gaarder
System Administrator, Dept of Mathematics
Cornell University, Ithaca, NY, USA
gaarder(a)math.cornell.edu
9 years, 8 months
[libvirt-users] KVM management through the web with libvirt and mist.io
by Markos Gogoulos
Hi,
I would like to announce that we have integrated libvirt for managing KVM
vms on mist.io. Mist.io is an open source project and a service that can
assist you in managing your vms on a unified way, providing a simple
interface for all of your infrastructure (multiple public cloud providers,
OpenStack based public/private clouds, Docker servers, bare metal servers
and now KVM hypervisors).
Adding a KVM backend via libvirt will show a list of all of the virtual
machines (running and terminated), along with the hypervisor itself. You
can execute actions such as reboot, shutdown and start. Instead of having
to log in to the hypervisor to reboot a VM that has hanged, you can do it
with a few taps on your smartphone, laptop or tablet, along with the rest
of your infrastructure. You can also have a web ssh shell if you add an ssh
key. Creation of new VMs is not supported yet but is on our plans.
You can have a look on a blog post we've written recently at
http://blog.mist.io/post/110890044256/announcing-kvm-and-vcloud-support,
use the open source tool (http://github.com/mistio/mist.io) or try out the
service (https://mist.io) offering more features such as monitoring, adding
custom metrics, scripts and logs.
Hope you'll find it usefull
Cheers,
Markos
9 years, 8 months
[libvirt-users] Adding timestamps for all emulator output
by Andrey Korolyov
Hello,
I think it would be useful if libvirt will be able to prefix all
messages from emulator pipes with the date stamping, for example I am
trying to catch very rare and non-fatal race with
virtio-serial-bus: Guest failure in adding device virtio-serial0.0
which is specific to the Windows guests on qemu-kvm. I have supporting
infrastructure which can tell me exact times for every action upon
this VM, but as bug is not frequent, the continuous monitoring looks
like an overkill for a desired goal - find a correlation between
emulator event and message from stderr. Patching emulator itself is
barely an option, as it is ugly, requires refresh of the running code
via loopback migration and completely non-universal, as every
hypervisor should be modified seperately.
I`d highly appreciate positive consideration for such functionality
addition or can write a patch shortly, if needed. Thanks!
9 years, 8 months
[libvirt-users] Questión about DNS config on dnsmasq
by Carlos Miranda Molina (Mstaaravin)
Hello guys...
I'm using libvirt in my local laboratory and I have a question/problem
about DNS settings over dnsmasq (by libvirt)
I have a NAT network separately from my real network, i need simulated some
DNS hosts to NAT network like ftp.debian.org (for testing purposes, etc)
This is for example a dumpxml (yes, i'm using PXE boot for testing and is
working fine)
<network>
<name>net0</name>
<uuid>5a014735-f658-7a87-c7d4-e6b0f488c332</uuid>
<forward mode='nat'/>
<bridge name='net0' stp='on' delay='0'/>
<mac address='52:54:00:b5:24:7b'/>
<dns>
<host ip='192.168.122.1'>
<hostname>mirrors.kernel.org</hostname>
<hostname>mirrors.dcarsat.com.ar</hostname>
<hostname>ftp.debian.org</hostname>
</host>
</dns>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<tftp root='/home/tftp'/>
<dhcp>
<range start='192.168.122.2' end='192.168.122.99'/>
<bootp file='pxelinux.0'/>
</dhcp>
</ip>
</network>
Look <dns> & <hostname> section, that works correctly but only if I add
hostnames on net0 when was offline.
<dns>
<host ip='192.168.122.1'>
<hostname>mirrors.kernel.org</hostname>
<hostname>mirrors.dcarsat.com.ar</hostname>
<hostname>ftp.debian.org</hostname>
</host>
</dns>
How i can add more hostnames with my network (net0) are still online...?
virsh net-update default add-last dns-host (for example, doesn't work)
and the official documentation @
http://libvirt.org/formatnetwork.html#elementsAddress
doesn't say more.
I test with <forwarder > but doesn't work
(192.168.10.100 is a dnsmasq outside libvirt control)
<network>
<name>net0</name>
<uuid>5a014735-f658-7a87-c7d4-e6b0f488c332</uuid>
<forward mode='nat'/>
<bridge name='net0' stp='on' delay='0'/>
<mac address='52:54:00:b5:24:7b'/>
<dns>
<forwarder addr="192.168.10.100"/>
</dns>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<tftp root='/home/tftp'/>
<dhcp>
<range start='192.168.122.2' end='192.168.122.99'/>
<bootp file='pxelinux.0'/>
</dhcp>
</ip>
</network>
Anyone can help me...?
thanks
--
"La Voluntad es el único motor de nuestros logros"
http://blog.ngen.com.ar/
9 years, 8 months
[libvirt-users] A problem with converting an OVA appliance
by Marko Dimjašević
Hi all,
I've been having a problem when trying to convert an Open Virtualization
Appliance (OVA) format appliance to the "virt-image" format. This is how
I try to convert the appliance:
$ virt-convert --arch=i686 -i ovf appliance.ova
The result is:
ERROR Couldn't import file "appliance.ova": must be string without
null bytes or None, not str
This happens on a Debian Wheezy (7.8) machine. virt-convert is at
version 0.600.1. All libvirt* packages are at version 1.2.9.
Unfortunately, I couldn't find anyone else through web searches having
the same issue and then applying their solution. It'd be great if
someone can help with trying to figure out what is going on here...
--
Regards,
Marko
http://dimjasevic.net/marko
9 years, 8 months