[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
9 years, 9 months
[libvirt-users] Default lib/include dirs location in OS X
by Radek Simko
Hi,
I have installed libvirt via Homebrew = compiled from source
<https://github.com/Homebrew/homebrew/blob/master/Library/Formula/libvirt.rb>
.
Then I wanted to install *ruby-libvirt*
gem install ruby-libvirt
and end up with this error:
/usr/local/Cellar/ruby/2.1.2_3/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You
may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/Cellar/ruby/2.1.2_3/bin/ruby
--with-libvirt-include
--without-libvirt-include
--with-libvirt-lib
--without-libvirt-lib
--with-libvirt-config
--without-libvirt-config
--with-pkg-config
--without-pkg-config
extconf.rb:73:in `<main>': libvirt library not found in default locations
(RuntimeError)
extconf failed, exit code 1
so then I passed the locations of *include* & *lib* directories as the
configuration options:
gem install ruby-libvirt --
--with-libvirt-include=/usr/local/Cellar/libvirt/1.2.7/include
--with-libvirt-lib=/usr/local/Cellar/libvirt/1.2.7/lib
which *worked*, but it's not very clean and effective solution, especially
if you have *ruby-libvirt* as a requirement in your Gemfile and you need to
install it via Bundler.
I reckon that a possible solution would be to change Homebrew formula, so
that it either installs or symlinks both dirs into locations where
*ruby-libvirt* will look for it, but *what's the default location actually*?
--
*Radek Simko*
10 years
[libvirt-users] Unable to find security driver for label selinux
by Qiang Guan
Hi experts,
I want to have a test on security driver for libvirt lxc on my debian
system.
What I do is as the following steps:
1) download the source code from git://libvirt.org/libvirt.git
2) compile and install with the source code as following:
./autogen.sh --system
./configure --with-selinux=yes --with-secdriver-selinux=yes
make -j8 & make install
root@debian:~/github/libvirt.git/tools# ./virsh --version=long
Virsh command line tool of libvirt 1.2.8
See web site at http://libvirt.org/
Compiled with support for:
Hypervisors: QEMU/KVM LXC UML OpenVZ VMWare VirtualBox Test
Networking: Remote Network Bridging Interface udev Nwfilter VirtualPort
Storage: Dir Filesystem SCSI Multipath LVM
Miscellaneous: Daemon Nodedev SELinux Secrets Debug Modular
3) then I define a lxc vm with the seclabel :
root@debian:~/images# vir dumpxml lxc
<domain type='lxc'>
<name>lxc</name>
<uuid>b1b787a1-d20e-48bd-938b-16ba61d22405</uuid>
<memory unit='KiB'>419404</memory>
<currentMemory unit='KiB'>419404</currentMemory>
<vcpu placement='static'>1</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64'>exe</type>
<init>/sbin/init</init>
<cmdline>console=tty0 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/local/libexec/libvirt_lxc</emulator>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/tmp/rootfs'/>
<target dir='/'/>
</filesystem>
<console type='pty'>
<target type='lxc' port='0'/>
</console>
</devices>
<seclabel type='dynamic' relabel='yes'/>
</domain
4) When I start the vm, It output an error:
root@debian:~/images# vir start lxc
error: Failed to start domain lxc
error: unsupported configuration: Unable to find security driver for
label selinux
What's the problem?
Really appreciate for any help.
--
------------
Jackie
Best Regards
10 years
[libvirt-users] DHCP and Secure Containers
by Gene Czarcinski
I have been "playing with" Secure Containers running a lighttpd server
and have it up and running. I used Adam's process
(https://www.happyassassin.net/2014/07/23/bridged-networking-for-libvirt-w...)
for getting a bridge defined when also running NetworkManager. I then
created a virtual network definition:
> <network>
> <name>net18</name>
> <uuid>8d19a05b-ac85-4e2a-88bc-5ca4cbb29a33</uuid>
> <forward mode='bridge'/>
> <bridge name='br0'/>
> </network>
This works fine when I use static addresses such as:
> -N source=net18,address=192.168.18.94/24,route=192.168.18.255%192.168.18.1
but does not work when I specify using dhcp:
> -N source=net18,dhcp
I have reported this as a bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1133686
Since there has not been much of a reaction to the BZ report, I decided
to take a look at the source code (it sure would have been nice if the
SRPMS were there in the F20 fedora-virt-preview but I get the package
from development/21).
I see that libvirt-sandbox-init-common.c has the code for starting dhcp
and also has main() along with some runtime options for -v verbose and
-d debug.
OK, how do I go about turning verbose and/or debug on?
Any suggestions on how to debug and get dhcp to work? Is this the
correct mailing list?
Gene
10 years
[libvirt-users] CPU flag masking not working with xen
by Nathan March
Hi,
Trying to get CPU masking working with xen and it's just stubbornly refusing
to work. Spawning a VM with xm directly works fine, but every time I try
with libvirt it just ends up having all the flags of the host. Looking at
the xen logs, libvirt doesn't appear to be passing any cpu options to xen at
all.
Running centos 6.5 with the xen 4 packages (4.2.4), but I've also tried
building the latest libvirt 1.2.8-r1 from source and still the same thing.
I am seeing these errors out of libvirt, but not sure if they're related:
2014-08-28 17:39:02.815+0000: 22674: error : xenHypervisorDoV2Sys:1013 :
Unable to issue hypervisor ioctl 3166208: Permission denied
If I spawn a VM directly with XM and use libvirt to dumpxml it, or try the
domxml-from-native then libvirt just drops all the CPU info. I'm pretty sure
I've got the xml correct though as it passes validation with
virt-xml-validate: http://pastebin.com/aBUQckhc
I've tried everything I can think of and just not getting anywhere at all,
can anyone point me into the right direction for what the issue might be?
Thanks!
- Nathan
10 years
[libvirt-users] Hook for qemu: traffic shaping
by Romain Hardouin
Hi all,
If some people use generic ethernet interface and want to set traffic shaping, I made a libvirt hook for qemu:
https://github.com/rhardouin/libvirt_hooks
Of course, this is a workaround. I recently started to work on a fix but in the meantime this hook will do the trick and maybe it could help someone else.
Feel free to fork it if you think about any improvements.
Cheers,
Romain
IRC: romainh
10 years
[libvirt-users] Cputune causing VM to show usage as hardware interrupts
by Tyler Wilson
Hey All,
What is the correct method for using cputune to use a percentage of a host
core? From testing I currently have period set to 10,000 and quota set to
3,500. This gets me 35% of a used core on the host (36 3.4 2:42.20
qemu-system-x86) however when running stress inside the VM I am showing
this usage in top;w
%Cpu(s): 0.0 us, 0.0 sy, 0.0 ni, 0.0 id, 0.0 wa, 35.2 hi, 0.0 si,
64.8 st
Is this the intended result or are my numbers incorrect for this goal? I am
running libvirtd 1.2.2.
Thanks for the assist.
10 years
[libvirt-users] Progressively worsening unresponsiveness
by Michael Warnecke
Hello all, I'm new to the list, and hoping someone can point me in the
right direction.
I've got an Ubuntu 14 dom0 with, what I think, are excellent specs. 12
cores, hyperthreaded, VT, 64GB RAM, gobs of disk, etc... all to run 8
virtual machines (at the moment).
My problem is each of the guests - Windows, Ubuntu, FreeBSD, starts out
working fine. After several minutes, the guest becomes unresponsive for a
moment, and comes back. As time goes on, this happens more, and more
frequently, and longer and longer until after about a day the guest is
completely useless, and needs a shutdown, and start.
The dom0 is NEVER unresponsive.
I've tried to track this down through every means I have available, and
have come up empty handed. Here is some of what I've done so far, please
let me know what other information would help to debug this:
1. I've set guest OS processor to be default, and copied from host.
Neither made any noticable difference.
2. I've switched all disks and network to be VirtIO. Big improvement over
IDE, but the unresponsive problem persists.
3. Linux guests have the following in dmesg:
hrtimer: interrupt took 10109276 ns
[sched_delayed] sched: RT throttling activated
4. I found nothing suspicious in the dom0's dmesg.
5. Unresponsiveness does not correlate with disk usage.
6. Host uses 4 disks in software RAID-5 (yes I know I'm bad, but there are
reasons) using BTRFS.
7. Guest disks are all raw.
Please let me know if there is some other useful information, or if you
have an idea where I should look next.
Thanks!
10 years
[libvirt-users] Compile error on centos 7 : undefined reference to `virConnectNetworkEventRegisterAnyCheckACL'
by mxs kolo
Hi all
Centos 7.0.1406, 3.10.0-123.el7.x86_64
Configure libvirt-1.2.7 as:
./configure --prefix=/usr --with-xen=no --with-qemu=no
--with-openvz=no --with-vmware=no --with-esx=no --with-parallels=no
--with-bhyve=no --with-uml=no --with-vbox=no --with-selinux=no
make
...
make[3]: Entering directory `/usr/local/src/libvirt-1.2.7/daemon'
CC libvirtd-remote.o
CCLD libvirtd
libvirtd-remote.o: In function `remoteRelayDomainEventCheckACL':
/usr/local/src/libvirt-1.2.7/daemon/remote.c:157: undefined reference
to `virConnectDomainEventRegisterAnyCheckACL'
libvirtd-remote.o: In function `remoteRelayNetworkEventCheckACL':
/usr/local/src/libvirt-1.2.7/daemon/remote.c:184: undefined reference
to `virConnectNetworkEventRegisterAnyCheckACL'
collect2: error: ld returned 1 exit status
make[3]: *** [libvirtd] Error 1
make[3]: Leaving directory `/usr/local/src/libvirt-1.2.7/daemon'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/src/libvirt-1.2.7/daemon'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/libvirt-1.2.7'
make: *** [all] Error 2
I trying build libvirt-remote.0 manualy, by added file
../src/.libs/libvirt_driver_access.a where function
virConnectDomainEventRegisterAnyCheckACL defined.
But as result libvirtd cant' start with multiple errrors:
Aug 25 19:00:54 arvis systemd: Starting LSB: daemon for libvirt
virtualization API...
Aug 25 19:00:54 journal: libvirt version: 1.2.7
Aug 25 19:00:54 journal: failed to load module
/usr/lib/libvirt/connection-driver/libvirt_driver_network.so
/usr/lib/libvirt/connection-driver/libvirt
_driver_network.so: undefined symbol: virConnectListAllNetworksCheckACL
Aug 25 19:00:54 journal: failed to load module
/usr/lib/libvirt/connection-driver/libvirt_driver_storage.so
/usr/lib/libvirt/connection-driver/libvirt
_driver_storage.so: undefined symbol: virConnectListAllStoragePoolsCheckACL
Aug 25 19:00:54 journal: failed to load module
/usr/lib/libvirt/connection-driver/libvirt_driver_nodedev.so
/usr/lib/libvirt/connection-driver/libvirt
_driver_nodedev.so: undefined symbol: virConnectListAllNodeDevicesCheckACL
Aug 25 19:00:54 journal: failed to load module
/usr/lib/libvirt/connection-driver/libvirt_driver_secret.so
/usr/lib/libvirt/connection-driver/libvirt_
driver_secret.so: undefined symbol: virConnectListAllSecretsCheckACL
Aug 25 19:00:54 journal: failed to load module
/usr/lib/libvirt/connection-driver/libvirt_driver_nwfilter.so
/usr/lib/libvirt/connection-driver/libvir
t_driver_nwfilter.so: undefined symbol: virConnectNumOfNWFiltersCheckACL
Aug 25 19:00:54 journal: failed to load module
/usr/lib/libvirt/connection-driver/libvirt_driver_interface.so
/usr/lib/libvirt/connection-driver/libvi
rt_driver_interface.so: undefined symbol:
virConnectNumOfDefinedInterfacesCheckACL
Aug 25 19:00:54 journal: failed to load module
/usr/lib/libvirt/connection-driver/libvirt_driver_qemu.so
/usr/lib/libvirt/connection-driver/libvirt_dr
iver_qemu.so: undefined symbol: virConnectListDomainsCheckACL
Aug 25 19:00:54 journal: failed to load module
/usr/lib/libvirt/connection-driver/libvirt_driver_lxc.so
/usr/lib/libvirt/connection-driver/libvirt_dri
ver_lxc.so: undefined symbol: virConnectListDomainsCheckACL
Aug 25 19:00:54 journal: failed to load module
/usr/lib/libvirt/connection-driver/libvirt_driver_uml.so
/usr/lib/libvirt/connection-driver/libvirt_dri
ver_uml.so: undefined symbol: virConnectListDomainsCheckACL
b.r.
Maxim Kozin
10 years