[libvirt-users] Config Errro when Creating a virtual device attachment to backend
by huachao yao
Hi, buddy,
I want to create a virtual device attachment to backend.
The domain is running, and my code phase is as below:
xmlConfiguration = "<devices><sound model='es1370'/></devices>";
virDomainAttachDevice(dom,xmlConfiguration);
But the exception "libvir: Domain Config error : XML error: unknown device
type " happen when running.
Is it something wrong in the XML configuration? What should i do to deal
with such Config error ?
ps: the hypervisor is KVM.
13 years, 2 months
Re: [libvirt-users] Libvirt daemon usage question
by Eric Blake
[let's keep the list in the loop]
On 09/14/2011 04:07 PM, Trey Dockendorf wrote:
>> Given your original qeustion, if your management apps really do require
> 0.8.8 APIs, then you'll need to upgrade libvirtd on your CentOS host to be
> at least 0.8.8 in order to honor your management app requests, or else
> modify your management app to gracefully implement fallbacks to older API
> approaches that were available in 0.8.1.
>>
>
> How risky is it to implement a newer version of libvirt in something like
> centos? I figure based on the huge number of dependencies that its not
> something to safely do. So far we building my libvirt rpms Ive only used
> the same source for the version with centos and the libvirt specs provided
> in the fedora src rpms. Do the specs know to check for specific versions of
> dependencies?
There's not that many source dependencies for building a newer libvirt
out-of-the-box on top of CentOS. You might also find
https://fedoraproject.org/wiki/Virtualization_Preview_Repository as a
useful example for the amount of effort involved in running newer virt
tools on top of an otherwise stable repository. Also, search the list
archives; the topic of installing the latest libvirt on CentOS or RHEL 5
has come up several times recently, with various tidbits of good advice.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
13 years, 2 months
[libvirt-users] Libvirt daemon usage question
by Trey Dockendorf
I could use some help with clarification on the use of the libvirtd daemon
with regards to managing remote KVM instances. Right now I have a CentOS 6
KVM server (libvirt-0.8.1), but would like to use some management
applications that require higher version (0.8.8). First, is it possible to
run the libvirtd daemon from within a VM, or does it require active kvm
kernel module? Secondly, could a daemon running in say Fedora 15 (0.8.8) be
used to communicate with my CentOS 6 daemon (0.8.1). Does this sort of
model present a problem if the KVM host is not using the same or close to
the same version as the remote libvirtd?
My understanding of how to use libvirtd remotely is a bit weak, so any
clarification would be greatly appreciated.
Thanks
- Trey
13 years, 2 months
[libvirt-users] How to install libvirt 0.9.4 RPM on Fedora 14?
by Guido Winkelmann
Hi,
I'm trying to install the newest version of libvirt and libvirt-client from
the rpms at ftp://libvirt.org/libvirt/ on a Fedora 14 machine. The naming of
the rpms as "libvirt-0.9.4-1.fc14.x86_64.rpm" suggests that this is exactly
the system this was made for, however, installation still does not go
smoothly.
When I try to install these packages with
yum install libvirt-client-0.9.4-1.fc14.x86_64.rpm \
libvirt-0.9.4-1.fc14.x86_64.rpm
, some of the dependencies get resolved automatically, but not all of them,
and I get these error messages:
Error: Package: libvirt-0.9.4-1.fc14.x86_64 (/libvirt-0.9.4-1.fc14.x86_64)
Requires: libblktapctl.so.1.0()(64bit)
Error: Package: libvirt-client-0.9.4-1.fc14.x86_64 (/libvirt-
client-0.9.4-1.fc14.x86_64)
Requires: libnetcf.so.1(NETCF_1.4.0)(64bit)
Error: Package: libvirt-0.9.4-1.fc14.x86_64 (/libvirt-0.9.4-1.fc14.x86_64)
Requires: libnetcf.so.1(NETCF_1.4.0)(64bit)
Apparently, I need newer versions of netcf-libs and xen-libs. Where do I get
these from? There don't appear to be any official rpms or that for Fedora
14...
Regards,
Guido
13 years, 2 months
[libvirt-users] using virsh (or something) to convert from KVM domain XML to vmx...
by Frank Hauptle
HI folks,
For reasons I'd rather not go into (not my choice) we are moving our
current virtual servers at the uni here, (using KVM and libvirt) to
outsourced vmware ESX and vcenter.
I really don't want to use the Vcenter Converter to create running esx
vm's from within the KVM VM's as I feel that doing it within the client
VM is inefficient and slow. Thus far however, I've not found anything
that gives me any other alternatives.
I thought perhaps the domxml-to-native virsh function demo'd at
http://libvirt.org/drvesx.html#xmlexport would be the go, but that
appears to be just a way to change from libvirt managed esx to native vmx.
Converting the KVM raw img files to vmdk has been easy, converting the
KVM domain XML to vmx appears to be impossible unless you do it by hand.
Have I missed some cool/feature that would do this?
Apologies if I'm going about this all wrong, What I know about vmware, I
could write on the head of a pin with a felt tip pen..
kindest regards
Frank
UWA
13 years, 2 months
[libvirt-users] cpu time totals
by Igor Serebryany
Hi!
I'm comparing the cpu usage of a VM from virDomainGetInfo and the
usages returned per-vcpu from virDomainGetVcpus and the totals do
not match up.
I expect that the cpu usages reported per-vcpu, when summed, should
equal the total cpu usage of the domain, but there is quite a large
gap between them. Is there something I'm missing?
See this example code using the python bindings:
>>> import libvirt
>>> c = libvirt.open('qemu:///system')
>>> d = c.lookupByID(51)
>>> d.info()[4]
111390000000L
>>> d.vcpus()[0]
[(0, 1, 12720000000L, 1), (1, 1, 2980000000L, 0), (2, 1, 3150000000L, 1), (3, 1, 2600000000L, 0)]
>>> sum([vcpu[2] for vcpu in d.vcpus()[0]])
21520000000L
>>> d.info()[4] - sum([vcpu[2] for vcpu in d.vcpus()[0]])
91760000000L
Why is this additional 91 seconds not reflected in time spent by the
vcpus? What exactly is the meaning of the cpuTime parameter of the
virVcpuInfo struct?
Thanks,
--Igor
13 years, 2 months
[libvirt-users] Reg: Difference between chroot & pivot_root
by Alphonse Hansel Anthony
Hi,
What is the difference between chroot & pivot_root.
They don't seem obvious based on the man pages apart from the below
mentioned
caveats.
1) Inherited Open file descriptors, have to be explicitly closed.
2) Does not change CWD of the process, which can be overcome by doing a
chdir before & after chroot call.
Any information on this would be useful.
Thanks,
Alphonse
13 years, 2 months
[libvirt-users] Reg: VETH Device pair creation using iproute2.
by Alphonse Hansel Anthony
Hi,
While using libvirt to start a LXC, I am facing an error related to
NETNS,
specifically related to the VETH device pair creation. The code related
to this is
present in libvirt/src/lxc/veth.c
# ip link add veth0 type veth peer name veth1
Garbage instead of arguments "peer ...". Try "ip link help".
# ip -V
ip utility, iproute2-ss110629
# uname -r
2.6.32.39
#
The devices "veth0" & "veth1" does not exist in /sys/class/net/
But the same command works with iproute2-ss100519 (older version).
Is this a known issue in the latest version or am I doing something
wrong?
Any info in this regard would be useful.
-Alphonse
13 years, 2 months
Re: [libvirt-users] Fwd: Re: [libvirt] how did libvirt manage Virtual Network?
by Wayne Xia
Thank u very much, it helps a lot.
于 2011-9-13 10:22, Lei Li 写道:
>
>
> -------- Original Message --------
> Subject: Re: [libvirt] how did libvirt manage Virtual Network?
> Date: Fri, 09 Sep 2011 12:28:38 -0400
> From: Laine Stump <laine(a)laine.org> <mailto:laine@laine.org>
> To: libvirt-users(a)redhat.com <mailto:libvirt-users@redhat.com>
> CC: libvir-list(a)redhat.com <mailto:libvir-list@redhat.com>
>
>
>
> (This seems more appropriate for the libvirt-users mailing list)
>
> On 09/08/2011 10:16 PM, Wayne Xia wrote:
>> Working at the network management, I am a bit confused about the
>> VLAN model in libvirt.
>>
>> in the xml definition, there is a section as following:
>>
>> <devices>
>> <interface type='network'>
>> <source network='default'/>
>> </interface>
>> ...
>> <interface type='network'>
>> <source network='default' portgroup='engineering'/>
>> <target dev='vnet7'/>
>> <mac address="00:11:22:33:44:55"/>
>> <virtualport type='802.1Qbg'>
>> <parameters managerid='11' typeid='1193047' typeidversion='2'
>> instanceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
>> </virtualport>
>>
>> </interface>
>> </devices>
>>
>>
>> What is the really meaning of its related parameters of
>> "virtualport"? I want to discover informations such as VLAN id,
>> the switch type( software switch or hardware switch), connecting
>> relationship, but from the xml I can only found"managerid". I am not
>> sure how to map these xml information to those I needed, could I
>> consider managerid as VLAN id, and a portgroup as a specified VLAN group?
>> By the way to use virtualport, what components should I install on
>> Linux?
>
> <virtualport> is used only when configuring guests that connect directly
> to a VEPA or VNLINK (i.e. 802.1Q) capable switch. Unless you have one of
> these switches, you will not use it. If you do have one of these
> switches, you will also have information included with them that
> explains the meaning of the virtualport parameters and how they are used
> (they're opaque to libvirt - it just passes them on to the switch
> without assigning any meaning to them).
>
> portgroup is a tag used to select certain bits of config out of
> <portgroup> sections in the<network> definition being used for the
> interface. Currently the things that can be configured in the
> <portgroup> sections are 1)<bandwidth> info, and 2)<virtualport>
> parameters. Again, it has nothing to do with VLAN groups.<portgroup> is
> very new, btw - it has only been in libvirt since 0.9.4, so if you're
> using an older version don't expect it to do anything.
>
> Down to the real basic question of which VLAN a particular guest is
> using - that can either be determined by the guest itself, or if the
> guest has no VLAN id setting, it could be determined by the
> switch/bridge the guest is connected to; in other words, wherever it is
> done, it's outside of libvirt (well, I guess if your platform has
> support for the iface-* commands, you could define a bridge that uses a
> vlan interface as its connection to the physical network - then traffic
> from any guest connected to that bridge would end up going onto the
> physical network with the given vlan id).
>
> --
> libvir-list mailing list
> libvir-list(a)redhat.com <mailto:libvir-list@redhat.com>
> https://www.redhat.com/mailman/listinfo/libvir-list
>
--
Best Regards
Wayne Xia
mail:xiawenc@linux.vnet.ibm.com
tel:86-010-82450803
13 years, 2 months
[libvirt-users] Updating librvirt on the STD Distros
by KB
All,
This is my first time posting, I apologize in advance if it is too
much of a "newbie" question I am working on a project with libvirt
and want to use some of the features in the 0.9.4 release. The first
platform I wanted to test this on is RHEL 5.7. I have d/l libvirt and
compiled but have the following questions
1) RHEL 5.7 ships with libvirt version, 0.8.2-22. I am guessing that
I can not simple overwrite the existing files with the files from
0.9.4. Is there a way to upgrade to 0.9.4? Do I need to build an rpm
so that the version is properly reported in the rpm db? I am also
guessing some of the other packages the rely on libvirt may no longer
work. In addition, I would imagine RH does not support doing this.
To summarize, can the lbivrit on RHEL be upgraded and if so does
anyone have any info they can point me to?
2) If there is not a way to update RHEL, is there a different distro
CentOS, Ubuntu, Fedora that is a better choice to test my project on?
3) I am also guessing if my project is using API's that are not in
0.8.2-22 but are in 0.9.4., I will not be able to connect remotely to
the RHEL server and have them pull the data correctly. For example, I
want to use virDomainGetMemoryParameters.
Thanks in advance.
Keith
13 years, 2 months