[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, 1 month
[libvirt-users] (Xen + libvirt) Installing and workin with xen -4.2.1 and libvirt 1.1.2
by cooldharma06
hi
i want to install libvirt-1.1.2 in xen -4.2.1.
i installed int he following manner:
1. downloaded source from libvirt/org (libvirt-1.1.2)
2. untarred & run ./configure --with-xen=yes --with-libxl=yes
3. then make and make install.
i also enabled the (xend-unix-server yes) in xend config file.
i run libvirtd -v and getting the followning error:
root@boss[libexec]#libvirtd -v
2013-09-27 07:24:46.501+0000: 29517: info : libvirt version: 1.1.2
2013-09-27 07:24:46.501+0000: 29517: error : libxlCapsInitHost:86 :
internal error: Failed to get node physical info from libxenlight
2013-09-27 07:24:46.501+0000: 29517: error : libxlStateInitialize:1362 :
cannot create capabilities for libxenlight
2013-09-27 07:24:46.502+0000: 29517: error : virStateInitialize:840 :
Initialization of LIBXL state driver failed: internal error: Failed to get
node physical info from libxenlight
2013-09-27 07:24:46.502+0000: 29517: error : daemonRunStateInit:909 :
Driver state initialization failed
If i missed anything in the installation plz correct me.
and guide me to solve this error.
regards,
cooldharma06.
11 years, 2 months
[libvirt-users] Bridging Wireless Cards for KVM
by Joshua McKee
Hi,
I hope this is the right place to ask this question. I was wondering if
there is a way to set up a KVM VM using an XML document as input into Virsh
that uses bridged networking over a wireless card.
I understand that wireless cards to not natively support, but I was able to
find a working solution here:
http://blog.ericwhite.ca/articles/2011/04/creating-a-wireless-bridge/.
The issue is, I can use this bridge by calling KVM directly. However, I
cannot figure out how to get this same configuration on an XML file that I
input into Virsh for the creation of a VM.
My understanding is that libvirt calls KVM/QEMU at some point, but I may be
mistaken.
Thanks,
Joshua
11 years, 2 months
[libvirt-users] LXC, libvrt-1.1.2-r3 (Gentoo), "/dev/tty12", mount /dev with inverse of 'nodev'?
by Dennis Jenkins
Hello again,
TL;DR:
Today I noticed that my LXC container was out of space in "/dev". It
took me a few minutes to figure out why. There were only 23 files there.
The "/dev" fs quota was 64K, and all was taken up.
The problem was that "syslog-ng" was writing "console" messages to
"/dev/tty12". But "/dev/tty12" was not a device node, so the kernel
"(2)open"ed it as a file and dutifully wrote to it.
I have corrected my syslog-ng config, but I was wondering....
Is there any legitimate reason to EVER have a regular file in "/dev"?
If not, can libvirt or Linux be modified so that the filesystem can be
mounted in such a way to prevent a regular file from ever being created
there? Kind of like an inverse of the "nodev" mount option seen in various
filesystems (ext3, nfs). IMHO, I would rather have syslog-ng (or other
tool) fail to open a regular file in "/dev", than for it is succeed and
then fill up the small fs.
Thoughts?
Boring stuff:
Sep 30 14:06:47 localhost syslog-ng[440]: Error suspend timeout has
elapsed, attempting to write again; fd='16'
Sep 30 14:06:47 localhost syslog-ng[440]: I/O error occurred while writing;
fd='16', error='No space left on device (28)'
Sep 30 14:06:47 localhost syslog-ng[440]: Suspending write operation
because of an I/O error; fd='16', time_reopen='60'
This is what I see inside the container:
djenkins@dwj-hfax-dev ~/src/HylaFAX+ $ find /dev | wc -l
23
dwj-hfax-dev ~ # ls -l /dev/tty*
crw-rw-rw- 1 root root 5, 0 Sep 30 13:44 /dev/tty
lrwxrwxrwx 1 root root 10 Sep 30 13:03 /dev/tty1 -> /dev/pts/0
-rw------- 1 root root 65536 Sep 30 14:12 /dev/tty12
### AHHH!!! There is the problem. "syslog-ng" is writing to "/dev/tty12",
but it is a file and not a real device.
djenkins@dwj-hfax-dev ~/src/HylaFAX+ $ du -sh /dev
64K /dev
djenkins@dwj-hfax-dev ~/src/HylaFAX+ $ df -h /dev
Filesystem Size Used Avail Use% Mounted on
devfs 64K 64K 0 100% /dev
11 years, 2 months
[libvirt-users] Unable to start libvirt_lxc domain a second time after shutdown
by Florian Klink
Hi,
I'm unable to start a lxc domain again after shutting it down.
Something doesn't seem to "clean up" the socket file (and probably
more), as the error message says
"Unable to start Domain: Failed to connect socket to
'/var/run/libvirt/lxc/test.sock': Connection refused."
I can create a domain with the same config as the one thats shutted
down, but with other uid and name, of course, and I'm able to boot up
this domain.
However, the init process is much shorter (some filesystems are not
mounted), so maybe there is still something left "open" after the lxc
container is shut down?
I saw the problem in libvirt 1.1.2 and current git (1.1.3-rc2 plus 7
commits, on 51e21ba7b6f59d6ad9339b2da2b75cc7704f9ecf)
Configuration is something like this:
<domain type='lxc'>
<name>test</name>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64'>exe</type>
<init>/sbin/init</init>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib/libvirt/libvirt_lxc</emulator>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/var/lib/libvirt/filesystems/test/root'/>
<target dir='/'/>
</filesystem>
<interface type='network'>
</interface>
<console type='pty'>
<target type='lxc' port='0'/>
</console>
</devices>
<seclabel type='none'/>
</domain>
Florian
11 years, 2 months
[libvirt-users] Does libvirt support xapi/xe toolstack?
by Guillaume Thouvenin
Hello,
I installed the last version of Xen (xenserver-core-0.9.0-9.x86_64 from
yum) and I'm trying to manage my VMs with virsh. The version that I
installed is using the Xapi/xe toolstack. The problem I have is that
I'm not seeing the VM that is started with "virsh -c xen:/// list
--all". Here is what I have:
root# xe vm-list uuid ( RO) : 022226ed-07be-37fc-5b52-f798320e2726
name-label ( RW): vm1
power-state ( RO): running
uuid ( RO) : 394fa633-f600-45f9-bea7-3bf4a9fd06fd
name-label ( RW): Control domain on host: unknown
power-state ( RO): running
root# virsh -c xen:/// list --all
Id Name State
----------------------------------------------------
#
According to [1] it seems that libvirt is using Xend daemon to
communicate. The problem is that Xend is now deprecated since Xen 4.1.
So am I wrong with this assumption or is there something to configure
to be able to use libvirt with Xapi/XE toolstack? I looked in the
documentation but I only found [2] but I didn't see any special
settings...
Regards,
Guillaume [1] http://libvirt.org/architecture.html
[2] http://libvirt.org/drvxen.html
11 years, 2 months
[libvirt-users] virNodeInfo returns MBytes instead of bytes
by Sam Giraffe
Hi,
http://www.libvirt.org/html/libvirt-libvirt.html#virNodeInfo says that
memory size is in kilobytes, however when I use this call I get an answer
in Megabytes, see below. The hypervisor has 16 GB of RAM.
$ python
Python 2.6.6 (r266:84292, Jul 10 2013, 22:48:45)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> conn=libvirt.open("qemu+ssh://xx@xx.xxx.com/system")
Enter passphrase for key '/home/xx/.ssh/id_rsa':
>>> hv_info=conn.getInfo()
>>> hv_info
['x86_64', 15919, 8, 3292, 1, 1, 4, 2]
15,919 is the number I am referencing, should that not be in bytes and not
MB?
8 is the number of cores, CPU is 3.2Ghz.
$ rpm -q libvirt
libvirt-0.10.2-18.el6_4.14.x86_64
$ uname -a
Linux xx.xxx.com 2.6.32-358.18.1.el6.x86_64 #1 SMP Wed Aug 28 17:19:38 UTC
2013 x86_64 x86_64 x86_64 GNU/Linux
Thanks
11 years, 2 months
[libvirt-users] libvirt+python on windows support
by yao xu
Hi Guys!
Recently , I am searching way to run libvirt-python on windows , and
using the python api just like in linux .
But I found that ,libvirt-python can only run in cygwin environment .
In windows environment , when I input "import libvirt"
It indicates *ImportError: DLL load failed:*
*
*
* it seemed something wrong when importing libvirtmod*
*
*
* *the libvirt.py libvirtmod.pyd is compiled in *cygwin* environment * *
But it doesnot show anything more.
Is there anyone do this thing like me ?
Anyone can provide any solution to use python-libvirt in a normal python
programe.
Thanks.
11 years, 2 months