[Libvir] support for hvm guests
by Jim Fehlig
Daniel,
FYI, I'm working on a patch to support hvm guests. Attached is the work
thus far. Calling "virsh dumpxml some_hvm_guest" will (almost)
correctly dump xml config info on hvm guests. Needs to handle
"type=ioemu" component of VIF specification. Currently in the XML there
is a type attribute for the interface element that specifies bridge,
route, etc. How would you like to structure the interface element and
its children to account for hvm guests?
Using "virsh create file" where file contains XML config for hvm guests
may be close to working but I haven't tested it yet. There are several
options that need to be added to the XML to support hvm guests. If we
can agree on the structure I can add the functionality.
Regards,
Jim
18 years, 6 months
Re: [Libvir] Request for additional entry points
by Bret McMillan
On Thu, 2006-04-13 at 12:00 -0400, libvir-list-request(a)redhat.com wrote:
> We've discussed this before and I think the most compelling argument for
> passive domain support in libvirt (and even at a lower level such as
> Xend) is the following scenario:
>
> Let's say a user creates a virtual FC6 virtual machine that she is going
> to use to test her apps under Gnome (she's a KDE user). The machine
> isn't always there b/c she rarely needs it. She created it with some
> nifty KDE tool that has yet to be written.
>
> Of course, she finds out about this neat applet that you can use to
> managing running domains. If there isn't a common way of accessing
> passive domains then she won't see the FC6 VM.
>
> Now, I don't think that *all* domains should have to have passive
> equivalents (which is a requirement in the CIM provider today) because
> of some of the scenarios you outlined. However, I think not attempting
> to have a common API for passive domains is going to creative a mess as
> we get a larger number of management tools.
I think we're confusing the notion of what a passive domain is with what
config files happen to be sitting on / exposed to the dom0 machine. I
could very easily look at having an rdbms store the info about the
passive domain, hand that down to the dom0 via rpc, and directly call
the createLinux call. To me, that's still a passive domain, even though
it's configs haven't touched disk yet.
I guess I'm also struggling to understand why you'd toss this into
xenstore... it just seems this is a higher level concept that needs to
be tracked in too specific a way by management systems.
--Bret
18 years, 8 months
[Libvir] Perl API for using libvirt
by Daniel P. Berrange
Hi Folks,
I had a couple of hours spare, so I put together a set of Perl bindings
for libvirt. I'm currently calling the module Sys::Virt which seems to
be the most appropriate location in the CPAN namespace, but I'm open to
suggestions if people think that sucks. I've currently got near 100%
coverage of the C APIs, but not exposed all the static constants yet.
There are a couple of trivial example programs illustrating use of the
API for extracting info about domains.=20
For now you can grab a snapshot of the source for the binding using=20
Mercurial from the URL:
http://hg.berrange.com/libraries/sys-virt
When I've tested it more completely I'll upload it to CPAN
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
18 years, 8 months
RE: [Libvir] Problems installing libvir
by Subrahmanian, Raj
Daniel,
This was more of a hurried hack just changing all curses to ncurses :-)
I know it's no excuse, but I was in a hurry to start linking to libvirt.
I will work on a cleaner change to configure.in and forward it to you
later today?
Thanks
Raj
PS. Didn't Jim Fehlig mention that he has already fixed this?
-----Original Message-----
From: Daniel Veillard [mailto:veillard@redhat.com]
Sent: Tuesday, April 25, 2006 4:06 AM
To: Subrahmanian, Raj
Cc: libvir-list(a)redhat.com
Subject: Re: [Libvir] Problems installing libvir
On Mon, Apr 24, 2006 at 09:25:45PM -0400, Subrahmanian, Raj wrote:
> > ncurses vs. curses ?
> Ohh, and I was looking right at it!
> Sorry folks.
> I hacked the configure file to look for ncurses and sure enough it
> worked.
Can you send the diff you made to configure.in so we can fix configure
to work with both libraries ?
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit
http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/
18 years, 8 months
RE: [Libvir] Problems installing libvir
by Subrahmanian, Raj
> ncurses vs. curses ?
Ohh, and I was looking right at it!
Sorry folks.
I hacked the configure file to look for ncurses and sure enough it
worked.
Thanks for the help.
Raj
18 years, 8 months
[Libvir] Re: [Xen-cim] LTC provider working on SLES/openwbem
by Jim Fehlig
Daniel Veillard wrote:
>On Thu, Apr 20, 2006 at 04:24:28PM -0600, Jim Fehlig wrote:
>
>
>>FYI,
>>
>>I have managed to get one of the LTC providers (Xen_ComputerSystem)
>>working on SLES using openwbem cimom, the xm shim, and libvirt. The
>>following changes were made:
>>
>>libvirt
>>- changed xend_parse_sexp_desc() to not fail if kernel not found. sexp
>>from xend does not contain kernel for domain 0.
>>
>>
>
> Makes sense, could you send that patch ?
>
> thanks,
>
>Daniel
>
>
Attached.
Jim
18 years, 8 months
[Libvir] Problems installing libvir
by Subrahmanian, Raj
All,
I am trying to install libvir on my SUSE box.
The .configure command halts with the following message.
ibxml2 xml2-config ... yes ('')
checking for initscr in -lcurses... no
configure: error: curses library not found
But, I have installed curses, and cdk.
linux:~/xen/libvirt-0.1.0 # whereis curses
curses: /usr/include/curses.h /usr/include/curses
What am I missing out here?
thanks
Raj
18 years, 8 months
[Libvir] FC5 bug with kernel/initrd paths
by Daniel Hiltgen
I just started experimenting with libvirt on FC5 and ran into something
that doesn't seem quite right.
I've created a VM using the xenguest-install.py script. I've tried
grabbing the XML from virsh using dumpxml, but the kernel and initrd
paths are invalid. Specifically:
...
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.276riA</kernel>
<initrd>/var/lib/xen/initrd.z1bslj</initrd>
<cmdline>ro root=/dev/VolGroup00/LogVol00 rhgb quiet</cmdline>
</os>
...
(I see the same bogus paths in xm list --long)
If I shut down the VM and attempt to power it back on using the API and
this XML definition, it fails with:
libvir: Xen Daemon error : POST operation failed: No such domain guest1i
Failed to get devices for domain guest1
error: Failed to create domain
If I boot up the VM, and copy the kernel and initrd image out of it's
/boot partition onto the main filesystem, and tweak the XML to point to
those paths, I can boot the system through libvirt, but the files are
automatically deleted after I boot. Also, every time I boot using xm
create, I get a different bogus kernel/initrd path.
Is this expected behavior, or is there a bug/mismatch between libvirt
and the underlying Xen modules in FC5?
Thanks,
Daniel
18 years, 8 months
[Libvir] Add a timestamp to virDomainInfo ?
by Daniel P. Berrange
The primary use of the virDomainInfo data is in calculating resource
utilization over time. The CPU runtime data, however, is represented
as a counter, so to calulate utilization requires some transformations.
Basically subtract the CPU runtime value for time X, from the value
at time Y, and divide the result by Y-X. Obviously this requires us to
know the times X & Y. Currently the virDomainInfo structure does not
contain this information though, so apps have to call something like
gettimeofday() before virDomainGetInfo(), to record the timestamp of each
virDomainInfo record.
The problem is that this is a pretty poor approximation - particularly
if libvirt is talking via XenD, a non-trivial period of time can pass
between the call to gettimeofday() and the values for virDomainInfo
actually sampled.
Thus I would like to suggest that the virtDomainInfo structure be expanded
to add an extra data field of type 'struct timeval' to record a high
resolution timestamp. Now currently this wouldn't help accuracy all that
much, since libvirt would still be filling this in much the same way as
the app did. It does however, open the door to having Xen itself provide
an accurate timestamp back to libvirt, which would in turn benefit apps
without requiring further code change.
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
18 years, 8 months