[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
[libvirt-users] Using certtool to generate certificates for ESXi
by Shiva Bhanujan
Hello,
I'm using certtool to generate the server certificates for ESXi -
http://libvirt.org/remote.html#Remote_TLS_CA. I just copy the server
certificate and key as /etc/vmware/ssl/rui.crt and /etc/vmware/ssl/rui.key.
And then use virsh to connect from a CentOS 6.4 VM running on it - "virsh
-c esx://<esx IP>. I get the following error -
error: internal error curl_easy_perform() returned an error: Peer
certificate cannot be authenticated with known CA certificates (60) : Peer
certificate cannot be authenticated with known CA certificates
error: failed to connect to the hypervisor
is there something basic that I'm missing?
Regards,
Shiva
11 years
Re: [libvirt-users] [Qemu-devel] About VM fork in QEMU
by Xinyang Ge
>>> External snapshots (via the blockdev-snapshot-sync QMP command) can be
>>> taken in a matter of milliseconds if you only care about disk state.
>>> Furthermore, if you want to take a snapshot of both memory and disk
>>> state, such that the clone can be resumed from the same time, you can do
>>> that with a guest downtime that only lasts as long as the
>>> blockdev-snapshot-sync, by first doing a migrate to file then doing the
>>> disk snapshot when the VM pauses at the end of migration. Resuming the
>>> original guest is fast; resuming from the migration file is a bit
>>> longer, but it is still the fastest way possible to resume from a
>>> memory+disk snapshot. If you need anything faster, then yes, you would
>>> have to write patches to qemu to attempt cloning via fork() that makes
>>> sure to modify the active disk in use by the fork child so as not to
>>> interfere with the fork parent.
>>
>> I think migrating memory to file then doing external disk snapshot is
>> exactly what we want. Since we are using libvirt to manage different
>> VMs, could you give us some specific guides (or references) that how
>> we could migrate memory state to file using virsh interfaces and do
>> external snapshots?
>
> virsh snapshot-create-as $dom $name --live --memspec /path/to/memoryfile
I have tried this command on libvirt v1.1.3 and it returns "error:
invalid argument: qemuDomainSnapshotCreateXML: unsupported flags
(0x100)". Looks like --live is not supported yet. Could you let us
know which version we should of libvirt we should use in order to use
this feature?
Thanks,
Xinyang
--
Xinyang GE
Department of Computer Science & Engineering
The Pennsylvania State University
Homepage: http://www.cse.psu.edu/~xxg113/
11 years
[libvirt-users] libvirt_lxc causes cpu 100% usage
by jj zhong
libvirt_lxc causes cpu 100% usage?
libvirt version : 1.1.1
I don't know what happend, any help would be appreciated.
thx
top - 07:39:44 up 1 day, 2:13, 2 users, load average: 4.72, 4.59, 4.51
Tasks: 243 total, 4 running, 239 sleeping, 0 stopped, 0 zombie
%Cpu0 : 33.1 us, 1.3 sy, 0.0 ni, 64.6 id, 0.7 wa, 0.0 hi, 0.3 si,
0.0 st
%Cpu1 : 41.1 us, 3.0 sy, 0.0 ni, 55.3 id, 0.7 wa, 0.0 hi, 0.0 si,
0.0 st
%Cpu2 : 18.0 us, 2.0 sy, 0.0 ni, 79.7 id, 0.0 wa, 0.0 hi, 0.3 si,
0.0 st
%Cpu3 : 94.8 us, 5.2 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si,
0.0 st
%Cpu4 : 55.7 us, 7.5 sy, 0.0 ni, 36.7 id, 0.0 wa, 0.0 hi, 0.0 si,
0.0 st
%Cpu5 : 66.1 us, 4.3 sy, 0.0 ni, 29.6 id, 0.0 wa, 0.0 hi, 0.0 si,
0.0 st
%Cpu6 : 16.8 us, 1.0 sy, 0.0 ni, 82.2 id, 0.0 wa, 0.0 hi, 0.0 si,
0.0 st
%Cpu7 : 7.2 us, 0.7 sy, 0.0 ni, 92.1 id, 0.0 wa, 0.0 hi, 0.0 si,
0.0 st
KiB Mem: 1972112 total, 1894912 used, 77200 free, 236576 buffers
KiB Swap: 10485744 total, 0 used, 10485744 free, 574544 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
COMMAND
15750 root 20 0 10448 2080 1216 R 100.3 0.1 1322:38
libvirt_lxc
27517 root 20 0 10448 2032 1200 R 99.3 0.1 1273:44
libvirt_lxc
25250 root 20 0 10480 2048 1200 R 99.0 0.1 1277:31 libvirt_lxc
....
11 years
[libvirt-users] upstart script for virtlockd
by NEVEU Stephane
Hi all,
Trying to test libvirt 1.1.3 with virtlockd locking my qcow2 images on a NFS storage between two kvm hosts.
./configure ... --with-init-script=upstart
Libvirtd upstart script is actually well generated but I can't see nothing about virtlockd... or am I blind ? :)
Nevertheless, running virtlockd -d && service libvirtd restart works fine.
Am I wrong thinking that editing qemu-lockd.conf with my needs and qemu.conf with lock_manager="lockd" was enough ?
Thank you for your help.
11 years
[libvirt-users] libvirt_lxc: SELinux MCS
by Matteo Piccinini
Hello list,
my name is Matteo, i'm new on that list.
I'm working on a multitenancy platform with linux containers through libvirt on a production system with Red Hat 6.4.
Every container run a separate instance of OpenSSH and Apache HTTPd and I need to give root privileges to the developers and I try to configure SELinux using svirt and MCS.
I try the secmodel type dynamic and static in the xml file but it didn't work, I received the following error:
error : virSecurityLabelDefParseXML:3228 : XML error: security label is missing
error : virNetSocketNewConnectUNIX:566 : Failed to connect socket to '/var/run/libvirt/lxc/cntr1.sock': Connection refused
I configure the followings secmodel definition and used chcon on the rootfs directory (created with yum) with "system_u:object_r:svirt_lxc_file_t:s0:c30,c50" label:
<seclabel type='static' model='selinux' relabel='no'>
<label>system_u:system_r:svirt_lxc_net_t:s0:c30,c50</label>
</seclabel>
or:
<seclabel type='dynamic' model='selinux' relabel='yes'>
<label>system_u:system_r:svirt_lxc_net_t:s0:c30,c50</label>
</seclabel>
I try to compile the last version from the master branch of git the result was always the same, the error was related to the SELinux driver not enabled.
The output from "virsh -c lxc:/// capabilities" doesn't show the secmodel and doi tag like the qemu/kvm have for the lxc driver the selinux driver.
How can I enable the SELinux driver for libvirt lxc in Red Hat 6.4?
SELinux is in enforcing mode.
Thanks in advance,
Matteo
11 years
[libvirt-users] libvirt-lxc driver on armv7l
by Jan Olszak
Hi there,
I'm interested in using libvirt-lxc on armv7l architecture and I have a hard
time building libvirt.
1. Are there any prebuild rpms for ARM?
2. I have many dependency issues during build:
error: *** Error Summary ***
=== the following packages failed to build due to missing build dependencies
===
libvirt:
nothing provides hal-devel
nothing provides libnl-devel
nothing provides libselinux-devel
nothing provides radvd
nothing provides ebtables
nothing provides cyrus-sasl-devel
nothing provides /usr/bin/qemu-img
nothing provides lvm2
nothing provides iscsi-initiator-utils
nothing provides parted-devel
nothing provides device-mapper-devel
nothing provides libssh2-devel >= 1.3.0
nothing provides libwsman-devel >= 2.2.3
nothing provides nfs-utils
nothing provides scrub
Where do I define the flags that discard some of the libraries (for example
"--without-hal")?
Thanks!
Jan
11 years
[libvirt-users] libvirt-lxc without libvirt
by Jan Olszak
Hi there!
1. Is it possible to build libvirt-lxc driver without building
libvirt? How do I do it?
2. Do I understand it correctly, that I can use libvirt-lxc as a
substitute of lxc?
Thanks,
Jan
11 years
[libvirt-users] Fwd: libvirt unsupport rbd storage pool? "missing backend for pool type 8"
by 卢惠勇
I use "virsh pool-define rbd.xml" to create a rbd storage pool,but get this
error
virsh pool-define /tmp/rbd.xml
error: Failed to define pool from /tmp/rbd.xml
error: internal error: missing backend for pool type 8
rbd.xml
<pool type="rbd">
<name>cloudstack</name>
<source>
<name>cloudstack</name>
<host name='10.20.197.22' port='6789'/>
</source>
</pool>
this is my system information:
centos6.4 2.6.32-358.14.2.el6.x86_64
libvirt-1.1.1-1.el6.x86_64
qemu-kvm-0.12.1.2-2.355.el6.2.cuttlefish.x86_64 (download from
http://ceph.com/packages/qemu-kvm/centos/x86_64/ )
qemu-img-0.12.1.2-2.355.el6.2.cuttlefish.x86_64
--
------------------------------
金山网络运维部-卢惠勇
分机:2477
手机:15018838589
qq:31302409
11 years
[libvirt-users] Upgraded to F18: now machines won't start
by Sean Darcy
We've gone back to using an older machine that used to run libvirt just
fine. Updated to F18, libvirt-1.1.0-1.fc18.x86_64. VirtualBox works ok.
Now I can't start any image.
For one machine i get:
..............
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 698, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error Cannot find suitable CPU model for given data
that's whether I use what we used to use "Phenom" or the selection from
allowing virt-manager to choose "Opteron G3".
For another machine we get:
libvirtError: internal error Process exited while reading console log
output: char device redirected to /dev/pts/37 (label charserial0)
failed to initialize KVM: Device or resource busy
Doing some debugging, I found:
1. On boot the kvm_amd and kvm kernel modules won't/don't load. Nothing
in dmesg. Modprobe does load them.
lsmod | grep kvm
kvm_amd 59982 0
kvm 429349 1 kvm_amd
I still can't make anything work with the modules loaded.
2. When I start libvirtd, I get:
Oct 30 14:56:29 sixcore systemd[1]: Starting Virtualization daemon...
Oct 30 14:56:29 sixcore systemd[1]: Started Virtualization daemon.
............
Oct 30 14:56:31 sixcore kernel: [ 837.705913] kvm: enabling
virtualization on CPU5 failed
Oct 30 14:56:31 sixcore kernel: [ 837.705920] kvm: enabling
virtualization on CPU4 failed
Oct 30 14:56:31 sixcore kernel: [ 837.705928] kvm: enabling
virtualization on CPU1 failed
Oct 30 14:56:31 sixcore kernel: [ 837.705934] kvm: enabling
virtualization on CPU2 failed
Oct 30 14:56:31 sixcore kernel: [ 837.705946] kvm: enabling
virtualization on CPU3 failed
Oct 30 14:56:31 sixcore kernel: [ 837.745267] kvm: enabling
virtualization on CPU0 failed
I looked at the wiki on how to debug, and I seem to pass all the tests.
virsh capabilities | grep kvm
<domain type='kvm'>
<emulator>/usr/bin/qemu-kvm</emulator>
<domain type='kvm'>
<emulator>/usr/bin/qemu-kvm</emulator>
virsh dumpxml 2008R2 | grep kvm
<domain type='kvm'>
<emulator>/usr/bin/qemu-kvm</emulator>
Am I right that some of the entries in the xml file have now changed? Is
there a guide to updating them from the prior entries?
And, if I try to create a new machine, virt-install just hangs:
virt-install --prompt
What is the name of your virtual machine?
New-2008R2
How much RAM should be allocated (in megabytes)?
1200
What would you like to use as the disk (file path)?
/opt/storage/virt/windows/images/2008R2.img
ls -l /opt/storage/virt/windows/images/2008R2.img
-rw-------. 1 root root 23571726336 Dec 8 2012
/opt/storage/virt/windows/images/2008R2.img
I changed the permissions to 666. still hung.
Any help appreciated.
Sean
11 years