Commit Graph

12582 Commits

Author SHA1 Message Date
Taowei
4fab8d3f07 vbox: Rewrite vboxDomainSnapshotDelete 2014-08-15 09:25:12 +02:00
Taowei
a9725126bf vbox: Rewrite vboxDomainRevertToSnapshot 2014-08-15 09:25:12 +02:00
Taowei
410b2183b7 vbox: Rewrite vboxDomainSnapshotHasMetadata 2014-08-15 09:25:12 +02:00
Taowei
d722d8c7a9 vbox: Rewrite vboxDomainSnapshotIsCurrent 2014-08-15 09:25:12 +02:00
Taowei
8bd1316258 vbox: Rewrite vboxDomainSnapshotCurrent 2014-08-15 09:25:12 +02:00
Taowei
cb348feeef vbox: Rewrite vboxDomainSnapshotGetParent 2014-08-15 09:25:12 +02:00
Taowei
7528bf20a2 vbox: Rewrite vboxDomainHasCurrentSnapshot 2014-08-15 09:25:12 +02:00
Taowei
e36d9a7637 vbox: Rewrite vboxSnapshotLookupByName 2014-08-15 09:25:12 +02:00
Taowei
47eb32d311 vbox: Rewrite vboxDomainSnapshotListNames 2014-08-15 09:25:12 +02:00
Taowei
1157d85c12 vbox: Rewrite vboxDomainSnapshotNum 2014-08-15 09:25:12 +02:00
Taowei
72c23d65c1 vbox: Rewrite vboxDomainSnapshotGetXMLDesc 2014-08-15 09:25:12 +02:00
Taowei
677ecdc070 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.
2014-08-15 09:25:12 +02:00
Taowei
51d1a29dd8 vbox: Add API for vboxDomainSnapshotCreateXML 2014-08-15 09:25:12 +02:00
Taowei
2ad7b494a9 vbox: Rewrite vboxDomainDetachDeviceFlags 2014-08-15 09:25:12 +02:00
Taowei
fa12d7c300 vbox: Rewrite vboxDomainDetachDevice 2014-08-15 09:25:12 +02:00
Taowei
6be94596a8 vbox: Rewrite vboxDomainUpdateDeviceFlags
Since vboxDomainAttachDeviceImple not used in vbox_tmpl.c, it has
been deleted.
2014-08-15 09:25:12 +02:00
Taowei
5877687765 vbox: Rewrite vboxDomainAttachDeviceFlags 2014-08-15 09:25:12 +02:00
Taowei
2b5e727413 vbox: Rewrite vboxDomainAttachDevice 2014-08-15 09:25:11 +02:00
Taowei
400bdccb2a vbox: Rewrite vboxDomainUndefine 2014-08-15 09:25:11 +02:00
Taowei
4eaa78be7a vbox: Rewrite vboxConnectNumOfDefinedDomains 2014-08-15 09:25:11 +02:00
Taowei
4ebae5e8b6 vbox: Rewrite vboxConnectListDefinedDomains 2014-08-15 09:25:11 +02:00
Taowei
3611c4000c vbox: Rewrite vboxDomainGetXMLDesc 2014-08-15 09:25:11 +02:00
Taowei
80095678d8 vbox: Add API for vboxDomainGetXMLDesc 2014-08-15 09:25:11 +02:00
Taowei
696ad27977 vbox: Rewrite vboxDomainGetMaxVcpus 2014-08-15 09:25:11 +02:00
Taowei
e9f17c5330 vbox: Rewrite vboxDomainGetVcpusFlags 2014-08-15 09:25:11 +02:00
Taowei
35cb445a51 vbox: Rewrite vboxDomainSetVcpus 2014-08-15 09:25:11 +02:00
Taowei
da3b862aad vbox: Rewrite vboxDomainSetVcpusFlags 2014-08-15 09:25:11 +02:00
Taowei
97d8a17bf5 vbox: Rewrite vboxDomainGetState 2014-08-15 09:25:11 +02:00
Taowei
b412975345 vbox: Rewrite vboxDomainGetInfo 2014-08-15 09:25:11 +02:00
Taowei
2cd7a218de vbox: Rewrite vboxDomainSetMemory 2014-08-15 09:25:11 +02:00
Taowei
0ba1c21471 vbox: Rewrite vboxDomainGetOSType 2014-08-15 09:25:11 +02:00
Taowei
40b733e7e2 vbox: Rewrite vboxDomainDestroy 2014-08-15 09:25:11 +02:00
Taowei
25d807d42a vbox: Rewrite vboxDomainDestroyFlags 2014-08-15 09:25:11 +02:00
Taowei
14babb4981 vbox: Rewrite vboxDomainReboot 2014-08-15 09:25:11 +02:00
Taowei
502c43ee44 vbox: Rewrite vboxDomainShutdown 2014-08-15 09:25:11 +02:00
Taowei
67533a8148 vbox: Rewrite vboxDomainShutdownFlags 2014-08-15 09:25:11 +02:00
Taowei
395ecc456e vbox: Rewrite vboxDomainResume 2014-08-15 09:25:11 +02:00
Taowei
8b89505a20 vbox: Rewrite vboxDomainSuspend 2014-08-15 09:25:10 +02:00
Taowei
caba5247fd vbox: Rewrite vboxDomainIsUpdated 2014-08-15 09:25:10 +02:00
Taowei
c9537d13b0 vbox: Rewrite vboxDomainIsPersistent 2014-08-15 09:25:10 +02:00
Taowei
fa2f9abcc1 vbox: Rewrite vboxDomainIsActive 2014-08-15 09:25:10 +02:00
Taowei
2ba3ccbb88 vbox: Rewrite vboxDomainLookupByName 2014-08-15 09:25:10 +02:00
Taowei
856ceb8cb3 vbox: Rewrite vboxDomainCreateXML 2014-08-15 09:25:10 +02:00
Taowei
e979ad3991 vbox: Rewrite vboxDomainCreate 2014-08-15 09:25:10 +02:00
Taowei
815d17398c vbox: Rewrite vboxDomainCreateWithFlags 2014-08-15 09:25:10 +02:00
Taowei
34364df3c6 vbox: Rewrite vboxDomainDefineXML 2014-08-15 09:25:10 +02:00
Taowei
e60e8da4cb vbox: Rewrite vboxDomainUndefineFlags 2014-08-15 09:25:10 +02:00
Taowei
e89a93c071 vbox: Rewrite vboxDomainLookupByUUID 2014-08-15 09:25:10 +02:00
Taowei
9dd4f8eded vbox: Rewrite vboxDomainLookupById 2014-08-15 09:25:10 +02:00
Taowei
5f15b511e9 vbox: Rewrite vboxConnectNumOfDomains 2014-08-15 09:25:10 +02:00
Taowei
0958334ac0 vbox: Rewrite vboxConnectListDomains 2014-08-15 09:25:10 +02:00
Taowei
30a95f30ef vbox: Rewrite vboxConnectGetCapabilities 2014-08-15 09:25:10 +02:00
Taowei
82513be8ba vbox: Rewrite vboxConnectGetMaxVcpus 2014-08-15 09:25:10 +02:00
Taowei
427931ae0c vbox: Rewrite vboxConnectIsAlive 2014-08-15 09:25:10 +02:00
Taowei
16dcbaf09b vbox: Rewrite vboxConnectIsEncrypted 2014-08-15 09:25:10 +02:00
Taowei
3a959b36fd vbox: Rewrite vboxConnectIsSecure 2014-08-15 09:25:10 +02:00
Taowei
86142d8e9a vbox: Rewrite vboxConnectGetHostname 2014-08-15 09:25:09 +02:00
Taowei
6e906ffa91 vbox: Rewrite vboxConnectGetVersion 2014-08-15 09:25:09 +02:00
Taowei
7e052265c9 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.
2014-08-15 09:25:09 +02:00
Taowei
c6084f19d0 vbox: Rewrite vboxConnectClose 2014-08-15 09:25:09 +02:00
Taowei
7f0f415b87 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.
2014-08-15 09:25:09 +02:00
Laine Stump
7809615056 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.
2014-08-15 02:42:52 -04:00
Jim Fehlig
62c817e516 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>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
2e2ac1ed4a 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>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
a54b4144fb 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>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
5c5cac8ced 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>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
208660e046 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>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
f8ad0198a1 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>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
5dde1629fb 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>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
c849d01c5e 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>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
a7de003a94 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>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
8faab08c14 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>
2014-08-14 11:49:52 -06:00
Kiarie Kahurani
44650e91b9 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>
2014-08-14 11:49:52 -06:00
Pavel Hrdina
0c35a415f7 qemu_process: fix memleak found by coverity
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2014-08-14 19:33:06 +02:00
Richard Weinberger
41885a0224 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>
2014-08-14 14:32:49 +02:00
Sam Bobroff
f0f9eed843 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>
2014-08-14 12:12:42 +02:00
Mo yuxiang
ca8ef1df3b 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>
2014-08-14 10:25:57 +02:00
Chen Hanxiao
bd3b76e355 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>
2014-08-13 17:40:28 -04:00
Eric Blake
b50c8603a2 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>
2014-08-12 11:21:17 -06:00
Dmitry Guryanov
aad6e85f25 bhyve: fix error message in bhyveStateInitialize
If we failed to create BHYVE_STATE_DIR, we should show this
path, not BHYVE_LOG_DIR.
2014-08-12 21:12:19 +04:00
Michal Privoznik
bf4cbe4094 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>
2014-08-12 17:45:43 +02:00
Roman Bogorodskiy
0257d06ba4 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>
2014-08-12 19:40:20 +04:00
Peter Krempa
1b7c2c549e 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.
2014-08-12 17:32:28 +02:00
Peter Krempa
3fe9f61d54 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
2014-08-12 17:31:37 +02:00
Peter Krempa
e3f5af6a5f qemu: process: Fix header format of qemuProcessSetVcpuAffinities
Fix header alignment and remove the unused conn parameter.
2014-08-12 17:24:34 +02:00
Erik Skultety
983f5a5076 numatune: Fix parsing of empty nodeset (0,^0)
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1121837
2014-08-12 17:04:31 +02:00
Michal Privoznik
3085702b54 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>
2014-08-12 09:29:10 +02:00
Laine Stump
2a193f6458 network: populate interface pool immediately when network is started
When a network is defined with "<pf dev='xyz'/>", libvirt will query
sysfs to learn the list of all virtual functions (VF) associated with
that Physical Function (PF) then populate the network's interface pool
accordingly. This action was previously done only when the first guest
actually requested an interface from the network. This patch changes
it to populate the pool immediately when the network is started. This
way any problems with the PF or its VFs will become apparent sooner.

Note that we can't remove the old calls to networkCreateInterfacePool
that happen whenever a guest requests an interface - doing so would be
asking for failures on hosts that had libvirt upgraded with a network
that had been started but not yet used.

This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1047818
2014-08-11 17:34:28 -04:00
Laine Stump
cd7759cb96 network: make networkCreateInterfacePool more robust
networkCreateInterfacePool was a bit loose in its error cleanup, which
could result in a network definition with interfaces in the pool that
were NULL. This would in turn lead to a libvirtd crash when a guest
tried to attach an interface using the network with that pool.

In particular this would happen when creating a pool to be used for
macvtap connections. macvtap needs the netdev name of the virtual
function in order to use it, and each VF only has a netdev name if it
is currently bound to a network driver. If one of the VFs of a PF
happened to be bound to the pci-stub or vfio-pci driver (indicating
it's already in use for PCI passthrough), or no driver at all, it
would have no name. In this case networkCreateInterfacePool would
return an error, but would leave the netdef->forward.nifs set to the
total number of VFs in the PF. The interface attach that triggered
calling of networkCreateInterfacePool (it uses a "lazy fill" strategy)
would simply fail, but the very next attempt to attach an interface
using the same network pool would result in a crash.

This patch refactors networkCreateInterfacePool to bring it more in
line with current coding practices (label name, use of a switch with
no default case) as well as providing the following two changes to
behavior:

1) If a VF with no netdev name is encountered, just log a warning and
continue; only fail if exactly 0 devices are found to put in the pool.

2) If the function fails, clean up any partial interface pool and set
netdef->forward.nifs to 0.

This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1111455
2014-08-11 17:34:20 -04:00
Guido Günther
ee2a7c5483 Don't fail qemu driver intialization if we can't determine hugepage size
Otherwise we fail like

  libvirt version: 1.2.7, package: 6 (root 2014-08-08-16:09:22 bogon)
  virAuditOpen:62 : Unable to initialize audit layer: Protocol not supported
  virFileGetDefaultHugepageSize:2958 : internal error: Unable to parse /proc/meminfo
  virStateInitialize:749 : Initialization of QEMU state driver failed: internal error: Unable to parse /proc/meminfo
  daemonRunStateInit:922 : Driver state initialization failed

if the data can't be determined.

Reference: http://bugs.debian.org/757609
2014-08-11 22:23:48 +02:00
Guido Günther
712374d15f Include param.h in case of HAVE_BSD_CPU_AFFINITY
This fixes compilation on kFreeBSD which otherwise fails like

  CC       util/libvirt_util_la-virprocess.lo
In file included from /usr/include/sys/cpuset.h:35:0,
                 from util/virprocess.c:43:
/usr/include/sys/_cpuset.h:49:43: error: 'NBBY' undeclared here (not in
a function)
  long __bits[howmany(CPU_SETSIZE, _NCPUBITS)];
                                           ^
In file included from util/virprocess.c:43:0:
/usr/include/sys/cpuset.h:215:12: error: unknown type name 'cpusetid_t'
 int cpuset(cpusetid_t *);
            ^
/usr/include/sys/cpuset.h:216:30: error: expected ')' before 'id_t'
 int cpuset_setid(cpuwhich_t, id_t, cpusetid_t);
                              ^
/usr/include/sys/cpuset.h:217:42: error: expected ')' before 'id_t'
 int cpuset_getid(cpulevel_t, cpuwhich_t, id_t, cpusetid_t *);
                                          ^
/usr/include/sys/cpuset.h:218:48: error: expected ')' before 'id_t'
 int cpuset_getaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, cpuset_t
*);
                                                ^
/usr/include/sys/cpuset.h:219:48: error: expected ')' before 'id_t'
 int cpuset_setaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, const
cpuset_t *);

And it's the correct usage as documented in

  http://www.freebsd.org/cgi/man.cgi?query=cpuset_setid

Also change the #ifdef HAVE_BSH_CPU_AFFINITY to #if for consistency.
2014-08-11 22:23:48 +02:00
Tomoki Sekiyama
09dbb47832 qemu: use guest-fsfreeze-freeze-list command if mountpoints to freeze specified
A command to freeze a part of mounted file systems is implemented in
upstream QEMU-guest-agent with a name of 'guest-fsfreeze-freeze-list'.
This fixes the name of the command used to partial fsfreeze in qemu driver
when 'mountpoints' option is specified to virDomainFSFreeze API.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
2014-08-11 12:11:41 +02:00
Jianwei Hu
337c6eec1b qemu: Actually clear bandwidth settings
The virDomainSetInterfaceParameters implementation in qemu over
VIR_DOMAIN_AFFECT_CONFIG doesn't work as expected. When trying to
clear out the bandwidth settings for an interface, it has no
actual effect:

    virsh # domiftune --config $domain $interface
    inbound.average: 100
    inbound.peak   : 0
    inbound.burst  : 0
    outbound.average: 10
    outbound.peak  : 0
    outbound.burst : 0

    virsh domiftune --config $domain $interface 0 0

    virsh # domiftune --config $domain $interface
    inbound.average: 100
    inbound.peak   : 0
    inbound.burst  : 0
    outbound.average: 10
    outbound.peak  : 0
    outbound.burst : 0

But according to virsh man page:

    To clear inbound or outbound settings, use --inbound or
    --outbound respectfully with average value of zero.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2014-08-11 11:56:58 +02:00
Kiarie Kahurani
954538720d src/xenxs: Refactor code parsing OS config
introduce function
  xenParseXMOS(virConfPtr conf,...........);
which parses the OS config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-08 15:41:17 -06:00
Kiarie Kahurani
24543c6571 src/xenxs: Refactor code parsing general config
introduce function
   xenParseXMGeneralMeta(virConfPtr conf, .......);
which parses general metadata instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-08 15:41:03 -06:00
Kiarie Kahurani
3631f5dfc6 src/xenxs: Refactor code parsing emulated hardware config
introduce function
   xenParseXMEmulatedHardware(virConfPtr conf,.........);
which parses emulated devices config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-08 15:20:59 -06:00
Kiarie Kahurani
4821c32c94 src/xenxs: Refactor code parsing Vif config
introduce function
  xenParseXMVif(virConfPtr conf,........);
which parses Vfb config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-08 15:20:59 -06:00
Kiarie Kahurani
aa964890cb src/xenxs: Refactor code parsing Char devices config
introduce function
  xenParseXMCharDev(virConfPtr conf,.........);
which parses Char devices config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-08 15:20:59 -06:00
Kiarie Kahurani
f4f9eae128 src/xenxs: Refactor code parsing Vfb config
introduce function
 xenParseXMVfb(virConfPtr conf,..........);
which parses Vfb config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-08 15:20:59 -06:00
Kiarie Kahurani
70328f6cc8 src/xenxs: Refactor code parsing xm disk config
introduce function
  xenParseXMDisk(virConfPtr conf, ........);
which parses xm disk config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-08 15:20:41 -06:00