[libvirt] [PATCH] Add more xen vnc tests, patch failures
by Cole Robinson
Investigating an old bug made me trip over a few problems
with vnc parameter handling in the xen driver. The attached
patch adds test cases for these bugs and fixes the failures,
particularly fixing incomplete handling of a fixed vnc port
for xend managed domains.
Thanks,
Cole
16 years, 2 months
[libvirt] <soapbox>Thoughts on Open Source Hypervisor management
by Nathan Charles
Over the the last few years I've setup and experimented with a large number
of vm technologies. Everything from x86 based stuff like VMware, kvm, qemu,
xen, to more exotic things like hercules, and z/VM. So far the solution
I've found to be the most baked is VMware ESX with Virtual Center. It's
pretty sweet to set up a DRS cluster and have VM's load balance
across available hardware. However, It's super expensive and is in bed with
windows way to much. i.e. Virtual Center and the Virtual Infrastructure
Client only run on windows don't have LDAP auth and only use MSQL.
I've also been working implementing a provisioning solution for our
developers. We do automated installation of hundreds of machines of which
many are underutilized. Many are newer machines with some pretty beefy
specs (8 cores and at least 8 gigs of ram). I've done a lot of thinking in
a vacuum about what would be ideal. There's a lot out there I don't know so
I hope you give me some grace as I talk. So I want to be able to pull
these machines into a cluster of hypervisors; a VM fabric aggregated via
software. Or thought of in another way a p2p vm cluster. In some ways I
think oVirt is the closest and in someways I think simply extending libvirt
would be better and sometimes I think it should be a new project. So I
thought I'd post this and see what people think. Since I'm still unsure as
to where the proper place to abstract this is, I'll use the working package
name of genet for the rest of the discussion.
>From my perspective the reason I can't use most of the open source
virtualization solutions for more than local vm's is one of management.
They're great for one machine but as soon as you get to more than one
machine there is a lot of human administrative overhead. oVirt seems like
it could be really good, but in an existing environment it requires a lot of
substantial changes and requires significant modification to work with an
existing provisioning infrastructure. So as I imagined a silver bullet I
used biology as a metaphor and used started thinking with the idea of
"every piece contains the image of the whole." So the here's the 10,000 ft
overview of an idea.
1. cluster administration is done from the command line
2. cluster administration can be performed from any node.
3. a new node can join a cluster on a local subnet with one command.
4. local storage resources are presented to the cluster so there is no need
to have predefined NAS/SAN/iSCSI
5. cluster will load balance vm instances from node to node.
6. a node shouldn't need more than one nic but adding additional nic's
provides failover and load balancing.
I'm kind of ignoring storage at this point, but I think it's the biggest
pieces of the puzzle as long as migration needs network/san storage. The
ideal scenario would be something really simple like if I have SAN
connectivity use that else I use some sort of cluster file system which adds
in local storage and doesn't require reformating, but that might be wistful
thinking.
Use cases
1. looking for clusters on the same subnet via avahi
# [yum|apt-get] install genet
# genet list clusters
forsythia
hazelnut
sumac
# rhizome info sumac
Password:
sumac info: 8 nodes
64 Cores
128 G Ram
1.5 T storage
50% Cluster CPU utilized
75% Memory utilized
80% Storage utilized
2. a machine joins an existing cluster
# genet join sumac
Password:
localhost has successfully joined sumac
#
Help output
#genet -h
usage: genet [options] command
genet is a simple command line interface for creating and maintaining a
cluster of hypervisors.
Commands:
create cluster [cluster name]
create vm [vm name] (probably integrates with virt-install)
evacuate [hostname] - migrate all vm instances off of [hostname]
(defaults to localhost)
list clusters [hostname] - list clusters on local subnet or via hostname
on another network/subnet
list vm [cluster] - list all vm instances in a cluster defaults to
cluster local node is in.
console [vmname] - virt-viewer to vmname
So this all begs the the statement, "show me the code" and I think that
perfectly valid. I may write some code, but I don't want to duplicate
effort and I want to find out what other people are thinking. I welcome
your thoughts. </soapbox>
Regards,
--
Nathan Charles
16 years, 2 months
Re: [libvirt] Does libvirt support Xen on Solaris?
by atif bajwa
Thanks,
But does libvirt supports xVM Virtualbox and xVM Server? I think Sun has
published some web services API for these platforms.
Regards,
Atif
On Wed, Sep 3, 2008 at 3:52 PM, Mark Johnson <johnson.nh(a)gmail.com> wrote:
> On Wed, Sep 3, 2008 at 8:30 AM, atif bajwa <atifbajwa(a)gmail.com> wrote:
> > Hi!
> >
> > Does libvirt supports Xen on Solaris?
>
> Yes.
>
>
> > If so what is version of libvirt and Solaris?
>
> I believe we currently have 0.4.0 integrated in current
> Nevada/OpenSolaris builds.
>
>
>
> MRJ
>
> > Regards,
> > Atif
> >
> > --
> > Libvir-list mailing list
> > Libvir-list(a)redhat.com
> > https://www.redhat.com/mailman/listinfo/libvir-list
> >
> >
>
16 years, 2 months
[libvirt] [PATCH] Implement vol delete for disk pools
by Cole Robinson
The patch below implements virStorageVolDelete for volumes
on a disk pool.
The only interesting thing here is that parted wants a
partition number to delete, so we need to peel off the
end of the volume's target path which will be of the form
'/dev/sda1' or similar (I assume. If not, it's still
better than having nothing implemented).
Thanks,
Cole
16 years, 2 months
[libvirt] Release of libvirt-0.4.5
by Daniel Veillard
It was really time for a new release, the ChangeLog is huge ...
Main features are the improvement of OpenVZ and LXC, the uniform XML
handling (and hence format) though all drivers, improvements in devices
handling for QEmu/KVM and storage pool source discovery.
Available as usual at ftp://libvirt.org/libvirt/
Full log of change is huge:
* New features:
- NETNS support for Linux containers (Dan Smith)
- unified XML domain and network parsing for all drivers (Daniel Berrange)
- OpenVZ features improvements (Evgeniy Sokolov)
- OpenVZ and Linux containers support now default
- USB device passthrough for QEmu/KVM (Guido Günther)
- storage pool source discovery (David Lively)
* Portability:
- fixes for MinGW (Atsushi SAKAI and Daniel Berrange)
- detection of xen lib improvement (David Lively)
- storage backend portability for SLES (David Lively)
- fix make distclean and distcheck (Jim Meyering)
- fix build failures on RHEL4
- lot of MinGW portability fixes (Atsushi SAKAI and Daniel Berrange)
- HTML generation fix
- -lpthread explicit linking when needed (Jim Meyering)
* Documentation:
- various typo fixes (Anton Protopopov, Toth István, Atsushi SAKAI,
Nguyen Anh Quynh)
- Java bindings docs
- remove Xen centric comments (Guido Günther)
- various typo in comments (Chris Lalancette)
- docs and API comments fixes (Charles Duffy)
- how to contribute to open source link (Richard Jones)
- memory unit fixups (matthew chan)
* Bug fixes:
- memory leaks and testing for OOM (Daniel Berrange)
- do_open driver bug(Evgeniy Sokolov)
- don't use polkit auth when running as non-root (Daniel Berrange)
- boot of CDRom devices in QEmu/KVM (Daniel Berrange)
- fix OpenVZ probe function (Evgeniy Sokolov)
- ID related lookup fixes in OpenVZ (Evgeniy Sokolov)
- pool cration for netfs (Cole Robinson)
- check for migrate support with QEmu (Guido Günther)
- check against double create with QEmu (Guido Günther)
- broken open failure detection in QEmu (Guido Günther)
- UUID string conversions in QEmu (Guido Günther)
- various small cleanup and bug fixes (Daniel Berrange)
- ID related fixes in the test driver (Daniel Berrange)
- better error reporting on XML parsing (Daniel Berrange)
- empty CD-ROM source device section (Chris Lalancette)
- avoid crashes for interface without a name in QEmu (Guido Günther)
- provide the real vncport (Charles Duffy)
- fix forward delay (Daniel Berrange)
- new VM state is initialized to be SHUTOFF (Daniel Berrange)
- virsh attach-disk bug fixes (Chris Lalancette)
- veth clash of device names (Dan Smith)
- connection lookup fixes on storage creation (Cole Robinson)
- parted call fix (Cole Robinson)
- use "server" option when using serial/telnet with QEmu (Mark McLoughlin)
- duplicate virInitialize calls (Nguyen Anh Quynh)
- many fixes to virExec and related functions (Daniel Berrange)
- size of disk without partitions (Cole Robinson)
- creating and cleaning up logical volumes with target path (Cole Robinson)
- fix reporting of virConnectOpen problems (Daniel Berrange)
- veth cleanup at shutdown (Dan Smith)
- lookup of Xen VMs after define (Cole Robinson)
- fix emulator reported capabilities (Cole Robinson)
- avoid segfault on KVM CD eject (Cole Robinson)
- fix disk ordering and avoid duplicate in QEmu XML parsing (Cole Robinson)
- update domain XML after device hotplug (Cole Robinson)
- use poweroff instead of halt when shutting down a Xen domain (John Levon)
- don't dump core of Xen domain live by default (John Levon)
- vgcreate command line size bug (Jim Fehlig)
- signed/unsigned issue in probing file (Cole Robinson)
- Fix Xen domains without PVFB console (Daniel Berrange)
- OpenVZ config read bug fix (Evgeniy Sokolov).
* Improvements:
- improved failure diagnostic for TAP (Jim Meyering)
- better exec and error diagnostic for OpenVZ commands (Evgeniy Sokolov)
- OpenVZ auto start and stop of domains (Evgeniy Sokolov)
- OpenVZ domain cpu time consumption (Evgeniy Sokolov)
- virsh shutdown improvements and test (Jim Meyering)
- better report of XML well formedness errors (Richard Jones)
- new XML elements (Daniel Berrange)
- virsh "edit" command (Richard Jones)
- save UUID of OpenVZ domains (Evgeniy Sokolov)
- improve xen blocks statistics (Chris Lalancette)
- gnulib updates (Jim Meyering)
- allow to add disk as USB devices (Guido Günther)
- LXC container process should survive libvirtd restarts (Daniel Berrange)
- allow to define static host domain configs
- number of CPU used by OpenVZ domains (Evgeniy Sokolov)
- private root fs for LXC (Daniel Berrange)
- storage source information in storage pools (David Lively)
- virsh reports attach and detach success (Cole Robinson)
- detect failure in QEmu eject command (Cole Robinson)
- add support for eect on floppy and SCSI cdroms for QEmu (Cole Robinson)
- LXC hypervisor version extraction (Dan Smith)
- Augeas config file support (Daniel Berrange)
- support for a domain name in network config (JJ Reynolds).
* Cleanups:
- Python verbosity cleanup (Ryan Scott)
- space and tabs cleanups (Atsushi SAKAI)
- OpenVZ and LXC drivers cleanup and unification of XML handling (Daniel Berrange)
- updates to Relax-NG XML schemas (John Levon and Daniel Berrange)
- more printf format checkings (Jim Meyering)
- VIR_FREE related cleanups (Jim Meyering)
- integer string parsing cleanup (Evgeniy Sokolov)
- initial OpenVZ xml refactoring (Evgeniy Sokolov)
- better error message on domain redefine (Charles Duffy)
- check XML files against the RNG Schemas (Daniel Berrange)
- const-correctness in virsh (Richard Jones and Jim Meyering)
- const-correctness and cleanups in LXC and OpenVZ drivers (Daniel Berrange)
- virFileLinkPointsTo rewrite (Jim Meyering)
- cleanup of the conditional compilation of C files (Daniel Berrange)
- shell quoting fixes (Jim Meyering)
- parallel build support (James Morris and Jim Meyering)
- new convenenience virFileReadLimFD function (Jim Meyering).
A lot of people contributed to this release with patches, reports
or documentations, thanks everybody !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
16 years, 2 months
[libvirt] libvirt vs XenAPI
by atif bajwa
Hi!
I am looking to integrate the Xen Management. Please guide me advantages of
using libvirt over XenAPI and please list xen-based-hypervisor
distributions(versions) that will be supported with libvirt. And what is
future of libvirt as XenSource is more focused on XenAPI.
Regards,
Atif
16 years, 2 months
[libvirt] PATCH: Fix NULL checks in openvz driver
by Daniel P. Berrange
Jim pointed out some places where the openvz driver could deference some
NULs, so this patch fixes them
Daniel
Index: src/openvz_driver.c
===================================================================
RCS file: /data/cvs/libvirt/src/openvz_driver.c,v
retrieving revision 1.46
diff -u -p -r1.46 openvz_driver.c
--- src/openvz_driver.c 5 Sep 2008 15:00:14 -0000 1.46
+++ src/openvz_driver.c 5 Sep 2008 15:11:34 -0000
@@ -276,7 +276,7 @@ static char *openvzDomainDumpXML(virDoma
static int openvzDomainShutdown(virDomainPtr dom) {
struct openvz_driver *driver = (struct openvz_driver *)dom->conn->privateData;
virDomainObjPtr vm = virDomainFindByUUID(driver->domains, dom->uuid);
- const char *prog[] = {VZCTL, "--quiet", "stop", vm->def->name, NULL};
+ const char *prog[] = {VZCTL, "--quiet", "stop", NULL /* name */, NULL};
if (!vm) {
openvzError(dom->conn, VIR_ERR_INVALID_DOMAIN,
@@ -290,6 +290,7 @@ static int openvzDomainShutdown(virDomai
return -1;
}
+ prog[3] = vm->def->name;
if (virRun(dom->conn, prog, NULL) < 0)
return -1;
@@ -303,7 +304,7 @@ static int openvzDomainReboot(virDomainP
unsigned int flags ATTRIBUTE_UNUSED) {
struct openvz_driver *driver = (struct openvz_driver *)dom->conn->privateData;
virDomainObjPtr vm = virDomainFindByUUID(driver->domains, dom->uuid);
- const char *prog[] = {VZCTL, "--quiet", "restart", vm->def->name, NULL};
+ const char *prog[] = {VZCTL, "--quiet", "restart", NULL /* name */, NULL};
if (!vm) {
openvzError(dom->conn, VIR_ERR_INVALID_DOMAIN,
@@ -317,6 +318,7 @@ static int openvzDomainReboot(virDomainP
return -1;
}
+ prog[3] = vm->def->name;
if (virRun(dom->conn, prog, NULL) < 0)
return -1;
@@ -581,7 +583,7 @@ openvzDomainCreate(virDomainPtr dom)
{
struct openvz_driver *driver = (struct openvz_driver *)dom->conn->privateData;
virDomainObjPtr vm = virDomainFindByName(driver->domains, dom->name);
- const char *prog[] = {VZCTL, "--quiet", "start", vm->def->name, NULL };
+ const char *prog[] = {VZCTL, "--quiet", "start", NULL /* name */, NULL };
if (!vm) {
openvzError(dom->conn, VIR_ERR_INVALID_DOMAIN,
@@ -595,6 +597,7 @@ openvzDomainCreate(virDomainPtr dom)
return -1;
}
+ prog[3] = vm->def->name;
if (virRun(dom->conn, prog, NULL) < 0) {
openvzError(dom->conn, VIR_ERR_INTERNAL_ERROR,
_("Could not exec %s"), VZCTL);
@@ -614,7 +617,7 @@ openvzDomainUndefine(virDomainPtr dom)
virConnectPtr conn= dom->conn;
struct openvz_driver *driver = (struct openvz_driver *) conn->privateData;
virDomainObjPtr vm = virDomainFindByUUID(driver->domains, dom->uuid);
- const char *prog[] = { VZCTL, "--quiet", "destroy", vm->def->name, NULL };
+ const char *prog[] = { VZCTL, "--quiet", "destroy", NULL /* name */, NULL };
if (!vm) {
openvzError(conn, VIR_ERR_INVALID_DOMAIN, _("no domain with matching uuid"));
@@ -626,6 +629,7 @@ openvzDomainUndefine(virDomainPtr dom)
return -1;
}
+ prog[3] = vm->def->name;
if (virRun(conn, prog, NULL) < 0) {
openvzError(conn, VIR_ERR_INTERNAL_ERROR,
_("Could not exec %s"), VZCTL);
@@ -643,7 +647,7 @@ openvzDomainSetAutostart(virDomainPtr do
virConnectPtr conn= dom->conn;
struct openvz_driver *driver = (struct openvz_driver *) conn->privateData;
virDomainObjPtr vm = virDomainFindByUUID(driver->domains, dom->uuid);
- const char *prog[] = { VZCTL, "--quiet", "set", vm->def->name,
+ const char *prog[] = { VZCTL, "--quiet", "set", NULL /* name */,
"--onboot", autostart ? "yes" : "no",
"--save", NULL };
@@ -652,6 +656,7 @@ openvzDomainSetAutostart(virDomainPtr do
return -1;
}
+ prog[3] = vm->def->name;
if (virRun(conn, prog, NULL) < 0) {
openvzError(conn, VIR_ERR_INTERNAL_ERROR, _("Could not exec %s"), VZCTL);
return -1;
@@ -704,16 +709,9 @@ static int openvzDomainSetVcpus(virDomai
struct openvz_driver *driver = (struct openvz_driver *) conn->privateData;
virDomainObjPtr vm = virDomainFindByUUID(driver->domains, dom->uuid);
char str_vcpus[32];
- const char *prog[] = { VZCTL, "--quiet", "set", vm->def->name,
+ const char *prog[] = { VZCTL, "--quiet", "set", NULL /* name */,
"--cpus", str_vcpus, "--save", NULL };
- snprintf(str_vcpus, 31, "%d", nvcpus);
- str_vcpus[31] = '\0';
- if (nvcpus <= 0) {
- openvzError(conn, VIR_ERR_INTERNAL_ERROR,
- _("VCPUs should be >= 1"));
- return -1;
- }
if (!vm) {
openvzError(conn, VIR_ERR_INVALID_DOMAIN,
@@ -721,6 +719,16 @@ static int openvzDomainSetVcpus(virDomai
return -1;
}
+ if (nvcpus <= 0) {
+ openvzError(conn, VIR_ERR_INTERNAL_ERROR,
+ _("VCPUs should be >= 1"));
+ return -1;
+ }
+
+ snprintf(str_vcpus, 31, "%d", nvcpus);
+ str_vcpus[31] = '\0';
+
+ prog[3] = vm->def->name;
if (virRun(conn, prog, NULL) < 0) {
openvzError(conn, VIR_ERR_INTERNAL_ERROR,
_("Could not exec %s"), VZCTL);
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
16 years, 2 months
[libvirt] domain type "kvm" error
by Rakotomandimby Mihamina
Hi all,
I use "ubuntu hardy" but I dont think the problem is specific to the
distribution I use.
I installed KVM and libvirt as described here:
https://help.ubuntu.com/community/KVM
Following that method, created a domain, which dumps like this:
<domain type='qemu' id='1'>
<name>xp1</name>
...
</domain>
Launching the guest is OK, but it is as slow as if I directly launched
$ qemu [options]
I tried to launch:
$ kvm [options]
and it is much faster
My conclusion is that method on the Ubuntu documentation launches a qemu
without the use of kvm.
I modified that XML dump, changing "qemu" with "kvm":
<domain type='kvm' id='1'>
<name>xp1</name>
...
</domain>
I undefined the domain "xp1" and re-defined it with that new XML file.
When I start the new defined domain:
virsh # start xp1
libvir: QEMU error : QEMU quit during console startup
qemu: unknowm parameter 'boot' in \
'file=/home/mihamina/xpjohnny.iso,if=ide,media=cdrom,boot=on'
error: Failed to start domain xp1
It's a Windows XP domain.
My conclusion is:
- When domain type is "qemu", qemu is called a certain way, without
syntax error
- When domain type is "kvm", qemu/kvm is not called the same way and
among that, there are syntax errors.
How to confirm my conclusion?
What to check if it's the case?
I already filed a bug
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/252916
but they seem not to have idea of the problem.
--
Huile Essentielle de Camphre http://www.huile-camphre.fr
Infogerance http://www.infogerance.us
(Serveurs, Postes de travail, Développement logiciel)
16 years, 2 months
[libvirt] [PATCH]Fix minor issues in logical storage backend
by Jim Fehlig
Hi All!
I came across some problems trying to create a new LVM-based storage
pool using this config
<pool type="logical">
<name>test_vg</name>
<source>
<device path="/dev/sdb1"/>
</source>
<target>
<path>/dev/test_vg</path>
</target>
</pool>
Volume group did not previously exist so I did
virsh pool-define <above.xml>
virsh pool-build test_vg
pool-build failed since the backend logical storage driver does not have
VIR_STORAGE_BACKEND_POOL_SOURCE_DEVICE set in flags. Without this flag
set, the device element is never parsed in virStoragePoolDefParseDoc()
(storage_conf.c), causing pvcreate to fail since no physical volume is
specified.
After this problem was memory corruption cause by miscalculating the
size of vgcreate command line :-).
This patch fixes both issues.
Regards,
Jim
16 years, 2 months