]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/log
people/liuw/libxenctrl-split/libvirt.git
10 years agodaemon: Fix driver registration ordering
Michal Privoznik [Fri, 15 Aug 2014 10:26:09 +0000 (12:26 +0200)]
daemon: Fix driver registration ordering

There are some stateless drivers which implement subdrivers
(typically vbox and its own network and storage subdrivers). However,
as of ba5f3c7c8ecc10 the vbox driver lives in the daemon, not the
client library. This means, in order for vbox (or any stateless domain
driver) to use its subdrivers, it must register before the general
drivers. Later, when the virConnectOpen function goes through the
subdrivers, stateless drivers are searched first. If the connection
request is aiming at stateless driver, it will be opened. Otherwise
the generic subdriver is opened.

The other change done in this commit is moving interface module load a
bit earlier to match the ordering in case libvirt is built without
driver modules.

Reported-by: Taowei Luo <uaedante@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoman: virsh: Add man page for "virsh metadata"
Peter Krempa [Fri, 15 Aug 2014 15:08:29 +0000 (17:08 +0200)]
man: virsh: Add man page for "virsh metadata"

Patch adding the command forgot to add the man page entry.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1130379

10 years agovbox: Introducing vboxCommonDriver
Taowei [Mon, 11 Aug 2014 10:07:09 +0000 (18:07 +0800)]
vbox: Introducing vboxCommonDriver

After this patch, we will have only one common domain driver.
So, the rewritten on domain driver is finished in this patch.

10 years agovbox: Add registerDomainEvent
Taowei [Mon, 11 Aug 2014 10:07:08 +0000 (18:07 +0800)]
vbox: Add registerDomainEvent

10 years agovbox: Rewrite vboxNode functions
Taowei [Mon, 11 Aug 2014 10:07:07 +0000 (18:07 +0800)]
vbox: Rewrite vboxNode functions

Four functions are rewrite in this patch, that is:
vboxNodeGetInfo
vboxNodeGetCellsFreeMemory
vboxNodeGetFreeMemory
vboxNodeGetFreePages
Since these functions has nothing to do with vbox,
it can be directly moved to vbox_common.c. So, I
merged these things into one patch.

10 years agovbox: Rewrite vboxConnectListAllDomains
Taowei [Mon, 11 Aug 2014 10:07:06 +0000 (18:07 +0800)]
vbox: Rewrite vboxConnectListAllDomains

10 years agovbox: Rewrite vboxDomainScreenshot
Taowei [Mon, 11 Aug 2014 10:07:05 +0000 (18:07 +0800)]
vbox: Rewrite vboxDomainScreenshot

10 years agovbox: Rewrite vboxDomainSnapshotDelete
Taowei [Mon, 11 Aug 2014 10:07:04 +0000 (18:07 +0800)]
vbox: Rewrite vboxDomainSnapshotDelete

10 years agovbox: Rewrite vboxDomainRevertToSnapshot
Taowei [Mon, 11 Aug 2014 10:07:03 +0000 (18:07 +0800)]
vbox: Rewrite vboxDomainRevertToSnapshot

10 years agovbox: Rewrite vboxDomainSnapshotHasMetadata
Taowei [Mon, 11 Aug 2014 10:07:02 +0000 (18:07 +0800)]
vbox: Rewrite vboxDomainSnapshotHasMetadata

10 years agovbox: Rewrite vboxDomainSnapshotIsCurrent
Taowei [Mon, 11 Aug 2014 10:07:01 +0000 (18:07 +0800)]
vbox: Rewrite vboxDomainSnapshotIsCurrent

10 years agovbox: Rewrite vboxDomainSnapshotCurrent
Taowei [Mon, 11 Aug 2014 10:07:00 +0000 (18:07 +0800)]
vbox: Rewrite vboxDomainSnapshotCurrent

10 years agovbox: Rewrite vboxDomainSnapshotGetParent
Taowei [Mon, 11 Aug 2014 10:06:59 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainSnapshotGetParent

10 years agovbox: Rewrite vboxDomainHasCurrentSnapshot
Taowei [Mon, 11 Aug 2014 10:06:58 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainHasCurrentSnapshot

10 years agovbox: Rewrite vboxSnapshotLookupByName
Taowei [Mon, 11 Aug 2014 10:06:57 +0000 (18:06 +0800)]
vbox: Rewrite vboxSnapshotLookupByName

10 years agovbox: Rewrite vboxDomainSnapshotListNames
Taowei [Mon, 11 Aug 2014 10:06:56 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainSnapshotListNames

10 years agovbox: Rewrite vboxDomainSnapshotNum
Taowei [Mon, 11 Aug 2014 10:06:55 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainSnapshotNum

10 years agovbox: Rewrite vboxDomainSnapshotGetXMLDesc
Taowei [Mon, 11 Aug 2014 10:06:54 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainSnapshotGetXMLDesc

10 years agovbox: Rewrite vboxDomainSnapshotCreateXML
Taowei [Mon, 11 Aug 2014 10:06:53 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainSnapshotCreateXML

The vboxDomainSnapshotCreateXML integrated the snapshot redefine
with this patch:
http://www.redhat.com/archives/libvir-list/2014-May/msg00589.html
This patch introduced vboxSnapshotRedefine in vboxUniformedAPI to
enable the features.

This patch replace all version specified APIs to the uniformed api,
then, moving the whole implementation to vbox_common.c. As there
is only API level changes, the behavior of the function doesn't
change.

Some old version's defects has brought to the new one. The already
known things are:
    *goto cleanup in a loop without releasing the pointers in the
    loop.
    *When function failed after machine unregister, no roll back
    to recovery it and the virtual machine would disappear.

10 years agovbox: Add API for vboxDomainSnapshotCreateXML
Taowei [Mon, 11 Aug 2014 10:06:52 +0000 (18:06 +0800)]
vbox: Add API for vboxDomainSnapshotCreateXML

10 years agovbox: Rewrite vboxDomainDetachDeviceFlags
Taowei [Mon, 11 Aug 2014 10:06:51 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainDetachDeviceFlags

10 years agovbox: Rewrite vboxDomainDetachDevice
Taowei [Mon, 11 Aug 2014 10:06:50 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainDetachDevice

10 years agovbox: Rewrite vboxDomainUpdateDeviceFlags
Taowei [Mon, 11 Aug 2014 10:06:49 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainUpdateDeviceFlags

Since vboxDomainAttachDeviceImple not used in vbox_tmpl.c, it has
been deleted.

10 years agovbox: Rewrite vboxDomainAttachDeviceFlags
Taowei [Mon, 11 Aug 2014 10:06:48 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainAttachDeviceFlags

10 years agovbox: Rewrite vboxDomainAttachDevice
Taowei [Mon, 11 Aug 2014 10:06:47 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainAttachDevice

10 years agovbox: Rewrite vboxDomainUndefine
Taowei [Mon, 11 Aug 2014 10:06:46 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainUndefine

10 years agovbox: Rewrite vboxConnectNumOfDefinedDomains
Taowei [Mon, 11 Aug 2014 10:06:45 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectNumOfDefinedDomains

10 years agovbox: Rewrite vboxConnectListDefinedDomains
Taowei [Mon, 11 Aug 2014 10:06:44 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectListDefinedDomains

10 years agovbox: Rewrite vboxDomainGetXMLDesc
Taowei [Mon, 11 Aug 2014 10:06:43 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainGetXMLDesc

10 years agovbox: Add API for vboxDomainGetXMLDesc
Taowei [Mon, 11 Aug 2014 10:06:42 +0000 (18:06 +0800)]
vbox: Add API for vboxDomainGetXMLDesc

10 years agovbox: Rewrite vboxDomainGetMaxVcpus
Taowei [Mon, 11 Aug 2014 10:06:41 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainGetMaxVcpus

10 years agovbox: Rewrite vboxDomainGetVcpusFlags
Taowei [Mon, 11 Aug 2014 10:06:40 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainGetVcpusFlags

10 years agovbox: Rewrite vboxDomainSetVcpus
Taowei [Mon, 11 Aug 2014 10:06:39 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainSetVcpus

10 years agovbox: Rewrite vboxDomainSetVcpusFlags
Taowei [Mon, 11 Aug 2014 10:06:38 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainSetVcpusFlags

10 years agovbox: Rewrite vboxDomainGetState
Taowei [Mon, 11 Aug 2014 10:06:37 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainGetState

10 years agovbox: Rewrite vboxDomainGetInfo
Taowei [Mon, 11 Aug 2014 10:06:36 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainGetInfo

10 years agovbox: Rewrite vboxDomainSetMemory
Taowei [Mon, 11 Aug 2014 10:06:35 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainSetMemory

10 years agovbox: Rewrite vboxDomainGetOSType
Taowei [Mon, 11 Aug 2014 10:06:34 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainGetOSType

10 years agovbox: Rewrite vboxDomainDestroy
Taowei [Mon, 11 Aug 2014 10:06:33 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainDestroy

10 years agovbox: Rewrite vboxDomainDestroyFlags
Taowei [Mon, 11 Aug 2014 10:06:32 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainDestroyFlags

10 years agovbox: Rewrite vboxDomainReboot
Taowei [Mon, 11 Aug 2014 10:06:31 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainReboot

10 years agovbox: Rewrite vboxDomainShutdown
Taowei [Mon, 11 Aug 2014 10:06:30 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainShutdown

10 years agovbox: Rewrite vboxDomainShutdownFlags
Taowei [Mon, 11 Aug 2014 10:06:29 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainShutdownFlags

10 years agovbox: Rewrite vboxDomainResume
Taowei [Mon, 11 Aug 2014 10:06:28 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainResume

10 years agovbox: Rewrite vboxDomainSuspend
Taowei [Mon, 11 Aug 2014 10:06:27 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainSuspend

10 years agovbox: Rewrite vboxDomainIsUpdated
Taowei [Mon, 11 Aug 2014 10:06:26 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainIsUpdated

10 years agovbox: Rewrite vboxDomainIsPersistent
Taowei [Mon, 11 Aug 2014 10:06:25 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainIsPersistent

10 years agovbox: Rewrite vboxDomainIsActive
Taowei [Mon, 11 Aug 2014 10:06:24 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainIsActive

10 years agovbox: Rewrite vboxDomainLookupByName
Taowei [Mon, 11 Aug 2014 10:06:23 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainLookupByName

10 years agovbox: Rewrite vboxDomainCreateXML
Taowei [Mon, 11 Aug 2014 10:06:22 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainCreateXML

10 years agovbox: Rewrite vboxDomainCreate
Taowei [Mon, 11 Aug 2014 10:06:21 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainCreate

10 years agovbox: Rewrite vboxDomainCreateWithFlags
Taowei [Mon, 11 Aug 2014 10:06:20 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainCreateWithFlags

10 years agovbox: Rewrite vboxDomainDefineXML
Taowei [Mon, 11 Aug 2014 10:06:19 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainDefineXML

10 years agovbox: Rewrite vboxDomainUndefineFlags
Taowei [Mon, 11 Aug 2014 10:06:18 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainUndefineFlags

10 years agovbox: Rewrite vboxDomainLookupByUUID
Taowei [Mon, 11 Aug 2014 10:06:17 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainLookupByUUID

10 years agovbox: Rewrite vboxDomainLookupById
Taowei [Mon, 11 Aug 2014 10:06:16 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainLookupById

10 years agovbox: Rewrite vboxConnectNumOfDomains
Taowei [Mon, 11 Aug 2014 10:06:15 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectNumOfDomains

10 years agovbox: Rewrite vboxConnectListDomains
Taowei [Mon, 11 Aug 2014 10:06:14 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectListDomains

10 years agovbox: Rewrite vboxConnectGetCapabilities
Taowei [Mon, 11 Aug 2014 10:06:13 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectGetCapabilities

10 years agovbox: Rewrite vboxConnectGetMaxVcpus
Taowei [Mon, 11 Aug 2014 10:06:12 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectGetMaxVcpus

10 years agovbox: Rewrite vboxConnectIsAlive
Taowei [Mon, 11 Aug 2014 10:06:11 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectIsAlive

10 years agovbox: Rewrite vboxConnectIsEncrypted
Taowei [Mon, 11 Aug 2014 10:06:10 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectIsEncrypted

10 years agovbox: Rewrite vboxConnectIsSecure
Taowei [Mon, 11 Aug 2014 10:06:09 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectIsSecure

10 years agovbox: Rewrite vboxConnectGetHostname
Taowei [Mon, 11 Aug 2014 10:06:08 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectGetHostname

10 years agovbox: Rewrite vboxConnectGetVersion
Taowei [Mon, 11 Aug 2014 10:06:07 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectGetVersion

10 years agovbox: Rewrite vboxDomainSave
Taowei [Mon, 11 Aug 2014 10:06:06 +0000 (18:06 +0800)]
vbox: Rewrite vboxDomainSave

All vbox objects are child objects from the nsISupports in vbox's
C++ API version. Since the CAPI is generated from the C++ API, I
kept their relationship here, by the definitations below:

typedef struct nsISupports nsISupports;
typedef nsISupports IVirtualBox;
typedef nsISupports ISession;
and so on...

So, when calling the API from nsISupports, we don't need to do
typecasting, and things work still work well.

10 years agovbox: Rewrite vboxConnectClose
Taowei [Mon, 11 Aug 2014 10:06:05 +0000 (18:06 +0800)]
vbox: Rewrite vboxConnectClose

10 years agovbox: Begin to rewrite, vboxConnectOpen
Taowei [Mon, 11 Aug 2014 10:06:04 +0000 (18:06 +0800)]
vbox: Begin to rewrite, vboxConnectOpen

Introduce vbox_uniformed_api to deal with version conflicts. Use
vbox_install_api to register the currect vboxUniformedAPI with
vbox version.

vboxConnectOpen has been rewritten.

10 years agonetwork: fix crash when starting a network with no <pf> element
Laine Stump [Thu, 14 Aug 2014 16:34:23 +0000 (12:34 -0400)]
network: fix crash when starting a network with no <pf> element

Martin Kletzander pointed out in email that my commit 2a193f64
introduced a crash in networkCreateInterfacePool() during startup of
any network that doesn't have a <pf> subelement of its <forward>
element. He also supplied a patch.

 http://www.redhat.com/archives/libvir-list/2014-August/msg00655.html

I expanded on that patch by cleaning up now-extraneous checks in the
callers of networkCreateInterfacePool().

Fortunately the offending patch hasn't been in any release, and hasn't
been (to my knowledge) backported to any other branch.

10 years agosrc/xenxs: Refactor code formating vif device config
Jim Fehlig [Wed, 13 Aug 2014 20:46:16 +0000 (14:46 -0600)]
src/xenxs: Refactor code formating vif device config

Handle formating of VIF config in a new function xenFormatXMVif().

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
10 years agosrc/xenxs: Refactor code formating peripheral device config
Kiarie Kahurani [Mon, 11 Aug 2014 21:21:34 +0000 (00:21 +0300)]
src/xenxs: Refactor code formating peripheral device config

introduce functions
  xenFormatXMSound
  xenFormatXMInputDevs(virConfPtr conf,....);
which formats peripheral device config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
10 years agosrc/xenxs: Refactor code formating Vfb config
Kiarie Kahurani [Mon, 11 Aug 2014 21:21:33 +0000 (00:21 +0300)]
src/xenxs: Refactor code formating Vfb config

introduce function
   xenFormatXMVfb(virConfPtr conf,.........);
which formats Vfb config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
10 years agosrc/xenxs: Refactor code formating OS config
Kiarie Kahurani [Mon, 11 Aug 2014 21:21:32 +0000 (00:21 +0300)]
src/xenxs: Refactor code formating OS config

introduce functions
   xenFormatXMEmulator(virConfPtr conf,........);
   xenFormatXMCDROM(virConfPtr conf, .......);
   xenFormatXMOS(virConfPtr conf,........);
which formats OS and associated config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agosrc/xenxs: Refactor code formating CPU config
Kiarie Kahurani [Mon, 11 Aug 2014 21:21:31 +0000 (00:21 +0300)]
src/xenxs: Refactor code formating CPU config

introduce functions
  xenFormatXMCPUAllocation(virConfPtr conf, ......);
  xenFormatXMCPUFeatures(virConfPtr conf, ......);
which formats CPU allocation and features config

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agosrc/xenxs: Refactor code formating xm disk config
Kiarie Kahurani [Mon, 11 Aug 2014 21:21:30 +0000 (00:21 +0300)]
src/xenxs: Refactor code formating xm disk config

introduce function
  xenFormatXMDisks(virConfPtr conf,.........);
which formats domain disks config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agosrc/xenxs: Refactor code formating Char devices config
Kiarie Kahurani [Mon, 11 Aug 2014 21:21:29 +0000 (00:21 +0300)]
src/xenxs: Refactor code formating Char devices config

introduce function
   xenFormatXMCharDev(virConfPtr conf,........);
which formats Char devices config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agosrc/xenxs: Refactor code formating event actions config
Kiarie Kahurani [Mon, 11 Aug 2014 21:21:28 +0000 (00:21 +0300)]
src/xenxs: Refactor code formating event actions config

introduce function
   xenFormatXMEventActions(virConfPtr conf,.........);
which formats event actions instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
10 years agosrc/xenxs: Refactor code formating virtual time config
Kiarie Kahurani [Mon, 11 Aug 2014 21:21:27 +0000 (00:21 +0300)]
src/xenxs: Refactor code formating virtual time config

introduce function
  xenFormatXMTimeOffset(virConfPtr conf,........);
which formats time config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agosrc/xenxs: Refactor code formating memory config
Kiarie Kahurani [Mon, 11 Aug 2014 21:21:26 +0000 (00:21 +0300)]
src/xenxs: Refactor code formating memory config

introduce function
   xenFormatXMMem(virConfPtr conf,...........);
which parses memory config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
10 years agosrc/xenxs: Refactor code formating general VM config
Kiarie Kahurani [Mon, 11 Aug 2014 21:21:25 +0000 (00:21 +0300)]
src/xenxs: Refactor code formating general VM config

introduce function
  xenFormatXMGeneralMeta(virConfPtr conf,......);
which parses uuid and name instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
10 years agoqemu_process: fix memleak found by coverity
Pavel Hrdina [Thu, 14 Aug 2014 17:33:06 +0000 (19:33 +0200)]
qemu_process: fix memleak found by coverity

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
10 years agoMaximum vlanid should be 4095 in interface.rng
Jianwei Hu [Wed, 13 Aug 2014 08:10:43 +0000 (16:10 +0800)]
Maximum vlanid should be 4095 in interface.rng

The correct vlanid range is 0~4095.

After merging this patch, we can not validate a interface xml with vlanid >= 4096.
[root@localhost ~]# cat vlan.xml
<interface type='vlan' name='eno1.4096'>
   <start mode='onboot'/>
   <protocol family='ipv4'>
    <dhcp/>
   </protocol>
   <vlan tag='4096'>
     <interface name='eno1'/>
   </vlan>
</interface>
[root@localhost ~]# virt-xml-validate vlan.xml
vlan.xml:1: element interface: Relax-NG validity error : Invalid sequence in interleave
vlan.xml:6: element vlan: Relax-NG validity error : Element interface failed to validate content
vlan.xml:6: element vlan: Relax-NG validity error : Element vlan failed to validate attributes
vlan.xml fails to validate
[root@localhost ~]#

Here is a ip command help on this.
[root@localhost /]# ip link add link eno1 name eno1.90 type vlan help
Usage: ... vlan [ protocol VLANPROTO ] id VLANID                [ FLAG-LIST ]
                [ ingress-qos-map QOS-MAP ] [ egress-qos-map QOS-MAP ]

VLANPROTO: [ 802.1Q / 802.1ad ]
VLANID := 0-4095
FLAG-LIST := [ FLAG-LIST ] FLAG
FLAG := [ reorder_hdr { on | off } ] [ gvrp { on | off } ] [ mvrp { on | off } ]
        [ loose_binding { on | off } ]
QOS-MAP := [ QOS-MAP ] QOS-MAPPING
QOS-MAPPING := FROM:TO

10 years agoLXC: Fix virLXCControllerSetupDevPTS() wrt user namespaces
Richard Weinberger [Mon, 28 Jul 2014 20:59:17 +0000 (22:59 +0200)]
LXC: Fix virLXCControllerSetupDevPTS() wrt user namespaces

The gid value passed to devpts has to be translated by hand as
virLXCControllerSetupDevPTS() is called before setting up the user
and group mappings.
Otherwise devpts will use an unmapped gid and openpty()
will fail within containers.
Linux kernel commit 23adbe12
("fs,userns: Change inode_capable to capable_wrt_inode_uidgid")
uncovered that issue.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
10 years agodocs: fix missing forward slash
Jianwei Hu [Thu, 14 Aug 2014 10:17:41 +0000 (18:17 +0800)]
docs: fix missing forward slash

   Should like below:
    <interface type='server'>
      <mac address='52:54:00:22:c9:42'/>
      <source address='192.168.0.1' port='5558'/>
    </interface>
    ...
    <interface type='client'>
      <mac address='52:54:00:8b:c9:51'/>
      <source address='192.168.0.1' port='5558'/>
    </interface>

10 years agoqemu: Tidy up job handling during live migration
Sam Bobroff [Tue, 12 Aug 2014 02:54:42 +0000 (12:54 +1000)]
qemu: Tidy up job handling during live migration

During a QEMU live migration several warning messages about job
handling could be written to syslog on the destination host:

"entering monitor without asking for a nested job is dangerous"

The messages are written because the job handling during migration
uses hard coded asyncJob values in several places that are incorrect.

This patch passes the required asyncJob value around and prevents
the warnings as well as any issues that the warnings may be referring
to.

https://bugzilla.redhat.com/show_bug.cgi?id=1130089

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
10 years agobuild: force configure failed when perl is missing
Jincheng Miao [Thu, 14 Aug 2014 03:37:45 +0000 (11:37 +0800)]
build: force configure failed when perl is missing

Perl is necessary to our build processing, it will invoke a lot of
generating script, like: gendispatch.pl. If perl is missing, it's
ok for build from git checkout, because autogen.sh will tell you.
But for compiling from a release tarball, configure will just record
a missing message, and continue, then build failed, like:
https://www.redhat.com/archives/libvirt-users/2014-August/msg00050.html

So need to enhance configure script to handle this negative case.

Reported-by: Hongbin Lu <hongbin@savinetwork.ca>
Signed-off-by: Jincheng Miao <jmiao@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agoconf: fix parsing 'cmd_per_lun' and 'max_sectors'
Mo yuxiang [Thu, 14 Aug 2014 07:55:34 +0000 (15:55 +0800)]
conf: fix parsing 'cmd_per_lun' and 'max_sectors'

commit d9504941 introduces two new attributes "cmd_per_lun" and
"max_sectors" same with the names QEMU uses for virtio-scsi.
But the case of parsing them is not exact. Change to parse
them if controller has "driver" element.

Signed-off-by: Mo yuxiang <moyuxiang@huawei.com>
10 years agoLXC: resolve issues in lxcDomainSetMaxMemory
Chen Hanxiao [Thu, 31 Jul 2014 03:41:10 +0000 (11:41 +0800)]
LXC: resolve issues in lxcDomainSetMaxMemory

This patch changes the setmaxmem function to support the '--live',
'--config', and '--current' flags by revectoring the code through
the setmem function using the VIR_DOMAIN_MEM_MAXIMUM flag. The
setmem code is refactored to handle both cases depending on the flag.

The changed maxmem code for the MEM_MAXIMUM path will not allow
modification to the memory values of an active guest unless the --config
switch is used.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
10 years agodaemon: Limit default log level to journald to VIR_LOG_INFO
Peter Krempa [Tue, 12 Aug 2014 14:10:39 +0000 (16:10 +0200)]
daemon: Limit default log level to journald to VIR_LOG_INFO

Libvirt is really chatty when the DEBUG log level is enabled. When a
host uses journald we'd enable debug logging to journald when only
specifying the debug log level. As journald may employ rate throttling
this would lock up the daemon until it's able to flush all debug
messages.

This patch changes the default log level to VIR_LOG_INFO when using the
default (unconfigured) log output to journald.

To still allow debug logging to journald the user now has to explicitly
specify journald as a log output with priority 1 in the "log_outputs"
configuration option. This patch also changes the config file template
to be explicit about this change and notify the user about the possible
consequence of debug logging into journald.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1121955

10 years agolibvirtd: conf: Mention support for logging into journald
Peter Krempa [Tue, 12 Aug 2014 14:05:36 +0000 (16:05 +0200)]
libvirtd: conf: Mention support for logging into journald

Our docs didn't mention the explicit option to log into journald.

10 years agomaint: improve syntax check for space around =
Eric Blake [Mon, 11 Aug 2014 23:04:19 +0000 (17:04 -0600)]
maint: improve syntax check for space around =

Laine Stump noted on IRC that syntax check wasn't flagging his
typo of 'i= 0'.  This fixes it.

* build-aux/bracket-spacing.pl: Tighten 'space around =' rule.
* src/storage/storage_backend.c
(virStorageBackendCreateExecCommand): Fix offenders.
* src/util/virnuma.c (virNumaGetDistances): Likewise.
* src/vbox/vbox_tmpl.c (vboxDomainSnapshotDeleteMetadataOnly)
(vboxNetworkGetXMLDesc): Likewise.
* src/xenapi/xenapi_driver.c (xenapiDomainLookupByName):
Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
10 years agobhyve: fix error message in bhyveStateInitialize
Dmitry Guryanov [Tue, 12 Aug 2014 15:46:18 +0000 (19:46 +0400)]
bhyve: fix error message in bhyveStateInitialize

If we failed to create BHYVE_STATE_DIR, we should show this
path, not BHYVE_LOG_DIR.

10 years agoqemu_conf: Undefine the correct symbol
Michal Privoznik [Tue, 12 Aug 2014 15:39:52 +0000 (17:39 +0200)]
qemu_conf: Undefine the correct symbol

At the beginning of the qemu config file parsing function there
are 3 helper macros defined: GET_VALUE_BOOL, GET_VALUE_LONG and
GET_VALUE_STR. Later, when they are no longer needed they are
undefined in order to keep the namespace clean. However, the
GET_VALUE_STRING is undefined instead of GET_VALUE_STR.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agostorage: ZFS support
Roman Bogorodskiy [Mon, 21 Jul 2014 14:38:42 +0000 (18:38 +0400)]
storage: ZFS support

Implement ZFS storage backend driver. Currently supported
only on FreeBSD because of ZFS limitations on Linux.

Features supported:

 - pool-start, pool-stop
 - pool-info
 - vol-list
 - vol-create / vol-delete

Pool definition looks like that:

 <pool type='zfs'>
  <name>myzfspool</name>
  <source>
    <name>actualpoolname</name>
  </source>
 </pool>

The 'actualpoolname' value is a name of the pool on the system,
such as shown by 'zpool list' command. Target makes no sense
here because volumes path is always /dev/zvol/$poolname/$volname.

User has to create a pool on his own, this driver doesn't
support pool creation currently.

A volume could be used with Qemu by adding an entry like this:

    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw'/>
      <source pool='myzfspool' volume='vol5'/>
      <target dev='hdc' bus='ide'/>
    </disk>

10 years agoqemu: migration: Check domain live state after exitting the monitor
Peter Krempa [Tue, 12 Aug 2014 13:21:56 +0000 (15:21 +0200)]
qemu: migration: Check domain live state after exitting the monitor

In qemuMigrationToFile we enter the monitor multiple times and don't
check if the VM is still alive after returning form the monitor. Add the
checks to skip pieces of code in case the VM crashes while saving it's
state.

10 years agoqemu: managedsave: Check that VM is alive after entering async job
Peter Krempa [Tue, 12 Aug 2014 12:31:26 +0000 (14:31 +0200)]
qemu: managedsave: Check that VM is alive after entering async job

Saving a shutoff VM doesn't make sense and libvirtd crashes while
attempting to do that. Check that the domain is alive after entering
the save async job.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1129207

10 years agoqemu: process: Fix header format of qemuProcessSetVcpuAffinities
Peter Krempa [Tue, 12 Aug 2014 15:24:34 +0000 (17:24 +0200)]
qemu: process: Fix header format of qemuProcessSetVcpuAffinities

Fix header alignment and remove the unused conn parameter.

10 years agonumatune: Fix parsing of empty nodeset (0,^0)
Erik Skultety [Mon, 11 Aug 2014 14:06:23 +0000 (16:06 +0200)]
numatune: Fix parsing of empty nodeset (0,^0)

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1121837

10 years agoconf: Format interface's driver more frequently
Michal Privoznik [Mon, 11 Aug 2014 12:51:49 +0000 (14:51 +0200)]
conf: Format interface's driver more frequently

https://bugzilla.redhat.com/show_bug.cgi?id=1128751

There's this <driver/> element under <interface/> which can have
several attributes. However, the driver element is currently formated
only if the driver's name or txmode has been specified. This makes
only a little sense as we parse even partial <driver/>, for instance:

    <interface type='user'>
      <mac address='52:54:00:e5:48:58'/>
      <model type='virtio'/>
      <driver ioeventfd='on' event_idx='on' queues='5'/>
    </interface>

But such XML would never get formatted back.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
10 years agodocs: use correct hints per bus type in <disk> examples
Eric Blake [Mon, 11 Aug 2014 21:42:45 +0000 (15:42 -0600)]
docs: use correct hints per bus type in <disk> examples

Commit 4cf53158 tried to set up unique labels per disk in the
example, but ended up choosing strings that don't correspond
to the usual choice of bus types.  Tweak the strings once again.

* docs/formatdomain.html.in: Use preferred names.

Signed-off-by: Eric Blake <eblake@redhat.com>