[libvirt] [RFC PATCH 06/10] conf: add backup definition

2016-11-13 Thread Nikolay Shirokovskiy
Backup xml description is like this: backup name 1. element is optional. 2. disk @type attribute is optional, default to 'file'. Valid values are 'file', 'block', 'dir', 'network', 'volume' just as usual for specifing domain disk sources. It specifies backup

[libvirt] [RFC PATCH 02/10] add driver based implementation of backup API

2016-11-13 Thread Nikolay Shirokovskiy
--- I wonder should I better name virDomainBackupCreateXML virDomainBackupStartPush as operation is asynchronous. include/libvirt/virterror.h | 2 + src/Makefile.am | 2 + src/datatypes.c | 24 ++ src/datatypes.h | 27 ++

[libvirt] [RFC PATCH 09/10] qemu: prepare backup destination

2016-11-13 Thread Nikolay Shirokovskiy
Prepare here is usual preparation for a disk to be used by qemu made by qemuDomainDiskChainElementPrepare. That is set security labels, add to lock manager and whitelist in cgroups. All three are related to backup target too. Adding to a lock manager is less obvious but can be useful if mirations

[libvirt] [RFC PATCH 07/10] qemu: add qemuDomainBackupCreateXML implementation

2016-11-13 Thread Nikolay Shirokovskiy
Patch adds backup of active domains to files and block devices. Option to specify backup file format is available. --- Using blockjob flag is not complete consistent - on libvirt crash/restart the flag will be lost. However this is not the problem of this particular patch or place.

[libvirt] [RFC PATCH 04/10] qemu: monitor: add backup command

2016-11-13 Thread Nikolay Shirokovskiy
--- This patch series do not use speed, bitmap and reuse arguments but we definitely want to use them later. Speed and reuse have the same meaning as in case of snapshots for example. Bitmap argument is used for incremental backups. Thus as supporting these flags is trivial delegation and

[libvirt] [RFC PATCH 05/10] misc: add backup block job type

2016-11-13 Thread Nikolay Shirokovskiy
--- I wonder should we add 'push' part to job type name having in mind that there are pull backups too and these two have different completion type. Looks like we have for the same reason 'commit' and 'active commit'. Or just don't bother as we can add a proper synonym lately.

[libvirt] [RFC PATCH 08/10] qemu: check backup destination before start

2016-11-13 Thread Nikolay Shirokovskiy
If backup target is file then check it is not present or regular empty file otherwise. If backup target is block device then check it is present. --- I decided to use switches instead of more compact if branches as in other places so that the code will noticeably break when this function will be

[libvirt] [RFC PATCH 10/10] virsh: add create backup command

2016-11-13 Thread Nikolay Shirokovskiy
--- po/POTFILES.in | 1 + tools/Makefile.am| 1 + tools/virsh-backup.c | 101 +++ tools/virsh-backup.h | 29 +++ tools/virsh.c| 2 + tools/virsh.h| 1 + 6 files changed, 135 insertions(+) create mode

[libvirt] [RFC PATCH 03/10] remote: add backup API

2016-11-13 Thread Nikolay Shirokovskiy
--- daemon/remote.c | 8 src/access/viraccessperm.c | 3 ++- src/access/viraccessperm.h | 6 ++ src/datatypes.c | 36 src/datatypes.h | 2 ++ src/remote/remote_driver.c | 7 +++

[libvirt] [RFC PATCH 01/10] api: add API to create backup

2016-11-13 Thread Nikolay Shirokovskiy
--- include/libvirt/libvirt-domain-backup.h | 59 + include/libvirt/libvirt.h | 1 + 2 files changed, 60 insertions(+) create mode 100644 include/libvirt/libvirt-domain-backup.h diff --git a/include/libvirt/libvirt-domain-backup.h

[libvirt] [RFC PATCH 00/10] introduce push backups

2016-11-13 Thread Nikolay Shirokovskiy
Push backup is a backup when hypervisor itself copy backup data to destination in contrast to pull backup when hypervisor exports backup data thru some interface and mgmt itself make a copy. This patch series basically adds API and remote/qemu implementation of backup creation and correspondent

[libvirt] Segfault in qemuDomainDefVcpusPostParse:2480

2016-11-13 Thread Nehal J Wani
The man page of qemu(2.6.2), states the following: -smp [cpus=]n[,cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus] Simulate an SMP system with n CPUs. On the PC target, up to 255 CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs to

Re: [libvirt] [PATCH v6 10/17] qemu: auto-add pcie-root-port/dmi-to-pci-bridge controllers as needed

2016-11-13 Thread Laine Stump
On 11/11/2016 11:09 AM, Laine Stump wrote: On 11/10/2016 09:10 AM, Andrea Bolognani wrote: On Wed, 2016-11-09 at 15:23 -0500, Laine Stump wrote: +} else if (flags & VIR_PCI_CONNECT_TYPE_PCI_BRIDGE && + addrs->buses[0].model == VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT) { +

[libvirt] [PATCH] bhyve: fix memory leaks in bhyvexml2argvtest

2016-11-13 Thread Roman Bogorodskiy
* virNetDevTapCreateInBridgePort() mock: free '*ifname' before strdupping a hardoded value to it * testCompareXMLToArgvFiles(): unref 'conn' object in cleanup * testCompareXMLToArgvHelper(): free 'ldargs' and 'dmargs' in cleanup --- tests/bhyvexml2argvmock.c | 2 ++

Re: [libvirt] [PATCH v3 2/2] bhyve: add e1000 nic support

2016-11-13 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: > Recently e1000 NIC support was added to bhyve; implement that in > the bhyve driver: > > - Add capability check by analyzing output of the 'bhyve -s 0,e1000' >command > - Modify bhyveBuildNetArgStr() to support e1000 and also pass >virConnectPtr so it could