[libvirt PATCH v2] hyperv: Handle long CPU models better.

2021-04-13 Thread Dawid Zamirski
o make sure that any other CPU string we did not come across yet won't trigger the error - the virNodeInfo has other useful info that is arguably more important than CPU model string, e.g. core count, or memory size Signed-off-by: Dawid Zamirski Reviewed-by: Neal Gompa --- Changes since v1: * Add

[PATCH] hyperv: Handle long CPU models better.

2021-04-08 Thread Dawid Zamirski
Apparenlly exising code was dealing with stripping down Intel CPU models as reported by Hyper-V host but was still having issues with my AMD CPU for which Hyper-V returns "AMD FX(tm)-8350 Eight-Core Processor". Therefore, this patch deals with it by stripping out the " Processor" part, and if

Re: [libvirt] [libvirt-php PATCH 0/2] Add binding for virDomainInterfaceAddresses

2019-07-13 Thread Dawid Zamirski
Hi Michal, Yes, please feel free to add: Signed-off-by: Dawid Zamirski to both messages. I'll make sure it is included in my future submissions from now on. Thanks, Dawid On Fri, 2019-07-12 at 17:12 +0200, Michal Privoznik wrote: > On 7/8/19 11:32 PM, Dawid Zamirski wrote: > &

[libvirt] [libvirt-php PATCH 1/2] Fix PHP7 VIRT_ARRAY_INIT macro implementation.

2019-07-08 Thread Dawid Zamirski
This is a PHP 7 compatibilty macro which was segfaulting due to the temporary variable being defined in the do..while scoped block (to swallow semicolon for macros), e.g: zval *arr; VIRT_ARRAY_INIT(arr); VIRT_ADD_ASSOC_STRING(arr, "foo", "bar"); // <= segfault here The VIRT_ARRAY_INIT above was

[libvirt] [libvirt-php PATCH 0/2] Add binding for virDomainInterfaceAddresses

2019-07-08 Thread Dawid Zamirski
one. Details are included in the commit messages of each patch. Regards, Dawid Dawid Zamirski (2): Fix PHP7 VIRT_ARRAY_INIT macro implementation. Add binding for virDomainInterfaceAddresses. src/libvirt-domain.c | 55 src/libvirt-domain.h | 2

[libvirt] [libvirt-php PATCH 2/2] Add binding for virDomainInterfaceAddresses.

2019-07-08 Thread Dawid Zamirski
A straight-forward 1:1 mapping to the C API. Returns array in the following format: array ( 0 => array ( 'name' => 'vnet0', 'hwaddr' => '52:54:00:3a:cd:94', 'naddrs' => 1, 'addrs' => array ( 'addr' => '192.168.254.224', 'prefix' => 24, 'type' => 0, ),

[libvirt] [PATCH php v2] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-06 Thread Dawid Zamirski
The PHP7 variant of the macro wasn't safe if the hash key was not a string type. This was found when running php script with just libvirt_connect call under xdebug session which segfaulted. This patch makes the following changes: * make sure that tmp_name is initialized to NULL * set the key name

Re: [libvirt] [libvirt-php PATCH] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-06 Thread Dawid Zamirski
On Wed, 2017-12-06 at 11:40 -0500, Dawid Zamirski wrote: > On Wed, 2017-12-06 at 16:21 +0100, Michal Privoznik wrote: > > On 12/06/2017 12:17 AM, Dawid Zamirski wrote: > > > > > > &_info.length, &_info.index, 0, &_pos); \ > > > > but

Re: [libvirt] [libvirt-php PATCH] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-06 Thread Dawid Zamirski
On Wed, 2017-12-06 at 16:21 +0100, Michal Privoznik wrote: > On 12/06/2017 12:17 AM, Dawid Zamirski wrote: > > > > &_info.length, &_info.index, 0, &_pos); \ > > but not here. Does that work for you? > It does but with a compiler warning :-) I did not reali

[libvirt] [libvirt-php PATCH] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-05 Thread Dawid Zamirski
The PHP7 variant of the macro wasn't safe if the hash key was not a string type. This was found when running php script with just libvirt_connect call under xdebug session which segfaulted. This patch makes the following changes: * make sure that tmp_name is initialized to NULL * set the key name

[libvirt] [PATCH 3/2] news: Update for vbox 5.2 support

2017-11-07 Thread Dawid Zamirski
--- docs/news.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 9361a9165..630784a0a 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -37,6 +37,11 @@ + + + vbox: Add VirtualBox 5.2 support + +

[libvirt] [PATCH 1/2] vbox: Add vbox 5.2 CAPI header file.

2017-11-07 Thread Dawid Zamirski
Extracted from 5.2 SDK and reindented with cppi 0001-vbox-Add-vbox-5.2-CAPI-header-file.tar.xz Description: application/xz-compressed-tar -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 2/2] vbox: Add support for 5.2.x

2017-11-07 Thread Dawid Zamirski
Simply add the 5.2 SDK header to the existing unified framework. No other special handling is needed as there's no API break between exising 5.1 and the just added 5.2. --- src/Makefile.am | 1 + src/vbox/vbox_V5_2.c | 13 + src/vbox/vbox_common.h| 2

[libvirt] [PATCH 0/2] vbox: Add support for 5.2.x

2017-11-07 Thread Dawid Zamirski
. [1] https://www.redhat.com/archives/libvir-list/2016-November/msg00355.html Dawid Zamirski (2): vbox: Add vbox 5.2 CAPI header file. vbox: Add support for 5.2.x src/Makefile.am | 1 + src/vbox/vbox_CAPI_v5_2.h | 26870 src/vbox

Re: [libvirt] [PATCH 1/2] docs: Update vbox driver documentation.

2017-11-07 Thread Dawid Zamirski
On Tue, 2017-11-07 at 17:05 -0500, John Ferlan wrote: > > On 11/07/2017 04:36 PM, Dawid Zamirski wrote: > > * libvirt no longer supports vbox <= 3.x > > * update XML definition sample to show how to attach disks to > > VBOX's SAS > > controller and h

[libvirt] [PATCH 2/2] docs: Document autoport behavior in the vbox driver

2017-11-07 Thread Dawid Zamirski
--- docs/formatdomain.html.in | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 92e14a919..d3cabac44 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -6100,7 +6100,10 @@ qemu-kvm -net

[libvirt] [PATCH 0/2] Update documentation for latest vbox changes.

2017-11-07 Thread Dawid Zamirski
* update docs/drvvbox.html.in to show support for * update docs/fomatdomain.html.in to describe autoport behavior in the vbox driver Dawid Zamirski (2): docs: Update vbox driver documentation. docs: Document autoport behavior in the vbox driver docs/drvvbox.html.in | 28

[libvirt] [PATCH 1/2] docs: Update vbox driver documentation.

2017-11-07 Thread Dawid Zamirski
* libvirt no longer supports vbox <= 3.x * update XML definition sample to show how to attach disks to VBOX's SAS controller and how to change IDE controller model. * update XML to show how to create RDP display with autoport. --- docs/drvvbox.html.in | 28 +++- 1 file

Re: [libvirt] [PATCH v2 12/15] vbox: Correctly generate drive name in dumpxml

2017-11-07 Thread Dawid Zamirski
On Fri, 2017-11-03 at 09:52 -0400, John Ferlan wrote: > > On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > > If a VBOX VM has e.g. a SATA and SCSI disk attached, the XML > > generated > > by dumpxml used to produce "sda" for both of those disks. This is > &

[libvirt] [PATCH v3 02/13] vbox: Process element in domain XML

2017-11-07 Thread Dawid Zamirski
With this patch, the vbox driver will no longer attach all supported storage controllers by default even if no disk devices are associated with them. Instead, it will attach only those that are implicitly added by virDomainDefAddImplicitController based on element or if explicitly specified via

[libvirt] [PATCH v3 13/13] docs: Update news.xml with vbox changes.

2017-11-07 Thread Dawid Zamirski
--- docs/news.xml | 74 +++ 1 file changed, 74 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index ef855d895..454c63d8b 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -37,8 +37,82 @@ + + +

[libvirt] [PATCH v3 04/13] vbox: Rename vboxDumpIDEHDDs to vboxDumpDisks

2017-11-07 Thread Dawid Zamirski
Because it deals with other disk types as well not just IDE. Also this function now returns -1 on error --- src/vbox/vbox_common.c | 57 ++ 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt] [PATCH v3 08/13] vbox: Correctly generate drive name in dumpxml

2017-11-07 Thread Dawid Zamirski
If a VBOX VM has e.g. a SATA and SCSI disk attached, the XML generated by dumpxml used to produce "sda" for both of those disks. This is an invalid domain XML as libvirt does not allow duplicate device names. To address this, keep the running total of disks that will use "sd" prefix for device

[libvirt] [PATCH v3 05/13] vbox: Cleanup/prepare snasphot dumpxml functions

2017-11-07 Thread Dawid Zamirski
This patch prepares the vboxSnapshotGetReadOnlyDisks and vboxSnapshotGetReadWriteDisks functions for further changes so that the code movement does not obstruct the gist of those future changes. This is done primarily because we'll need to know the type of vbox storage controller as early as

[libvirt] [PATCH v3 11/13] vbox: Generate disk address element in dumpxml

2017-11-07 Thread Dawid Zamirski
This patch adds element to each device since device names alone won't adequately reflect the storage device layout in the VM. With this patch, the ouput produced by dumpxml will faithfully reproduce the storage layout of the VM if used with define. --- src/vbox/vbox_common.c | 51

[libvirt] [PATCH v3 03/13] vbox: Add vboxDumpStorageControllers

2017-11-07 Thread Dawid Zamirski
--- src/vbox/vbox_common.c | 109 + 1 file changed, 109 insertions(+) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 49df52c12..4d596075c 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -3147,6 +3147,113 @@

[libvirt] [PATCH v3 06/13] vbox: Do not free disk definitions on cleanup

2017-11-07 Thread Dawid Zamirski
Both vboxSnapshotGetReadWriteDisks and vboxSnapshotGetReadWriteDisks do not need to free the def->disks on cleanup because it's being done by the caller via virDomainSnaphotDefFree --- src/vbox/vbox_common.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git

[libvirt] [PATCH v3 09/13] vbox: Cleanup vboxDumpDisks implementation

2017-11-07 Thread Dawid Zamirski
Primer the code for further changes: * move variable declarations to the top of the function * group together free/release statements * error check and report VBOX API calls used --- src/vbox/vbox_common.c | 190 +++-- 1 file changed, 122

[libvirt] [PATCH v3 10/13] vbox: Process empty removable disks in dumpxml

2017-11-07 Thread Dawid Zamirski
Previously any removable storage device without media attached was omitted from domain XML dump. They're still (rightfully) omitted in snapshot XMl dump but need to be accounted properly to for the device names to stay in 'sync' between domain and snapshot XML dumps. --- src/vbox/vbox_common.c |

[libvirt] [PATCH v3 12/13] vbox: Add SAS controller support

2017-11-07 Thread Dawid Zamirski
In VirtualBox SAS and SCSI are separate controller types whereas libvirt does not make such distinction. This patch adds support for attaching the VBOX SAS controllers by mapping the 'lsisas1068' controller model in libvirt XML to VBOX SAS controller type. If VBOX VM has disks attached to both

[libvirt] [PATCH v3 07/13] vbox: Swap vboxSnapshotGetReadOnlyDisks arguments

2017-11-07 Thread Dawid Zamirski
So that the function signature matches vboxSnapshotGetReadWriteDisks --- src/vbox/vbox_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 79030e36e..4d39beb1e 100644 --- a/src/vbox/vbox_common.c +++

[libvirt] [PATCH v3 00/13] vbox: Improve handling of storage devices

2017-11-07 Thread Dawid Zamirski
* Split up the snapshot function cleanup code into separate patches * Fixed code formatting as pointed out in review * Rename vboxDumpIDEHDDs -> vboxDumpDisks into a separate patch * Add docs/news.xml patch to describe improvements/fixes in the series Dawid Zamirski (13): vbox: Cleanup partia

Re: [libvirt] [PATCH v2 10/15] vbox: Process element in domain XML

2017-11-03 Thread Dawid Zamirski
On Fri, 2017-11-03 at 09:51 -0400, John Ferlan wrote: > > On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > > > > +case VIR_DOMAIN_CONTROLLER_TYPE_SCSI: > > +VBOX_UTF8_TO_UTF16(VBOX_CONTROLLER_SCSI_NAME, > > ); > > +vboxBusType = Stora

Re: [libvirt] [PATCH v2 05/15] vbox: Cleanup vboxAttachDrives implementation

2017-11-03 Thread Dawid Zamirski
On Fri, 2017-11-03 at 09:43 -0400, John Ferlan wrote: > > On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > > This commit primes vboxAttachDrives for further changes so when > > they > > are made, the diff is less noisy: > > > > * move variable declarations

Re: [libvirt] [PATCH v2 10/15] vbox: Process element in domain XML

2017-11-03 Thread Dawid Zamirski
On Fri, 2017-11-03 at 09:51 -0400, John Ferlan wrote: > > On 10/24/2017 03:35 PM, Dawid Zamirski wrote: > > This patch enables the VBOX driver to process the > > element > > in domain XML through which one can now customize the controller > > model. > > >

Re: [libvirt] [PATCH v2 03/15] vbox: Cleanup partially-defined VM on failure

2017-10-26 Thread Dawid Zamirski
On Tue, 2017-10-24 at 15:35 -0400, Dawid Zamirski wrote: > Since the VBOX API requires to register an initial VM before > proceeding > to attach any remaining devices to it, any failure to attach such > devices should result in automatic cleanup of the initially > registered > VM

Re: [libvirt] [PATCH v2 3/3] vbox: Read runtime RDP port and handle autoport

2017-10-25 Thread Dawid Zamirski
On Wed, 2017-10-25 at 17:35 -0400, John Ferlan wrote: > > On 10/24/2017 05:09 PM, Dawid Zamirski wrote: > > VirutalBox has a IVRDEServerInfo structure available that > > gives the effective runtime port that the VM is using when it's > > running. This is useful when the &

[libvirt] [PATCH v2 0/3] Update VRDE server port handling.

2017-10-24 Thread Dawid Zamirski
if vboxGetActiveRdpPort returns -1 and add more verbose code comments to clarify the logic Dawid Zamirski (3): vbox: Remove old unflexible macros vbox: Make autoport set RDP port range. vbox: Read runtime RDP port and handle autoport src/vbox/vbox_common.c| 3 +- src/vbox/vbox_tmpl.c

[libvirt] [PATCH v2 1/3] vbox: Remove old unflexible macros

2017-10-24 Thread Dawid Zamirski
The VBOX_SESSION_OPEN/CLOSE macros are only called in _vboxDomainSnapshotRestore and they are unflexible because: * assume the caller will have variable named "data" * can only create Write lock type As per above, it's not that hard to simply use the VBOX API directly. --- src/vbox/vbox_tmpl.c

[libvirt] [PATCH v2 2/3] vbox: Make autoport set RDP port range.

2017-10-24 Thread Dawid Zamirski
From: Dawid Zamirski <dzr...@gmail.com> Originally autoport in vbox driver was setting the port to default value (3389) which caused multiple VM instances use the same port. Since libvirt XML does not allow to set port ranges, this patch changes the "autoport" behavior to set V

[libvirt] [PATCH v2 3/3] vbox: Read runtime RDP port and handle autoport

2017-10-24 Thread Dawid Zamirski
VirutalBox has a IVRDEServerInfo structure available that gives the effective runtime port that the VM is using when it's running. This is useful when the "TCP/Ports" VBox property was set to port range (e.g. via autoport = "yes" or via VBoxManage) in which case it would be impossible to get the

[libvirt] [PATCH v2 13/15] vbox: Cleanup vboxDumpDisks implementation

2017-10-24 Thread Dawid Zamirski
Primer the code for further changes: * move variable declarations to the top of the function * group together free/release statements * error check and report VBOX API calls used --- src/vbox/vbox_common.c | 188 +++-- 1 file changed, 120

[libvirt] [PATCH v2 11/15] vbox: Add vboxDumpStorageControllers

2017-10-24 Thread Dawid Zamirski
--- src/vbox/vbox_common.c | 119 + 1 file changed, 119 insertions(+) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 9d45e4a76..715eb670e 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -3153,6 +3153,123 @@

[libvirt] [PATCH v2 14/15] vbox: Process empty removable disks in dumpxml

2017-10-24 Thread Dawid Zamirski
Previously any removable storage device without media attached was omitted from domain XML dump. They're still (rightfully) omitted in snapshot XMl dump but need to be accounted properly to for the device names to stay in 'sync' between domain and snapshot XML dumps. --- src/vbox/vbox_common.c |

[libvirt] [PATCH v2 12/15] vbox: Correctly generate drive name in dumpxml

2017-10-24 Thread Dawid Zamirski
If a VBOX VM has e.g. a SATA and SCSI disk attached, the XML generated by dumpxml used to produce "sda" for both of those disks. This is an invalid domain XML as libvirt does not allow duplicate device names. To address this, keep the running total of disks that will use "sd" prefix for device

[libvirt] [PATCH v2 06/15] vbox: Errors in vboxAttachDrives are now critical

2017-10-24 Thread Dawid Zamirski
Previously, if one tried to define a VBOX VM and the API failed to perform the requested actions for some reason, it would just log the error and move on to process remaining disk definitions. This is not desired as it could result in incorrectly defined VM without the caller even knowing about

[libvirt] [PATCH v2 00/15] vbox: Improve handling of storage devices

2017-10-24 Thread Dawid Zamirski
From: Dawid Zamirski <dzr...@gmail.com> v1: https://www.redhat.com/archives/libvir-list/2017-October/msg00381.html Changes since v1: * split out the original patches into smaller ones, with each bugfix or cleanup task is in its own isolated and compilable patch * make sure switch stat

[libvirt] [PATCH v2 10/15] vbox: Process element in domain XML

2017-10-24 Thread Dawid Zamirski
This patch enables the VBOX driver to process the element in domain XML through which one can now customize the controller model. Since VirtualBox has two distinct SAS and SCSI they do not "map" directly to libvirt XML, he VBOX driver uses to create SAS controller in VBOX VM. Additionally once

[libvirt] [PATCH v2 15/15] vbox: Generate disk address element in dumpxml

2017-10-24 Thread Dawid Zamirski
This patch adds element to each device since device names alone won't adequately reflect the storage device layout in the VM. With this patch, the ouput produced by dumpxml will faithfully reproduce the storage layout of the VM if used with define. --- src/vbox/vbox_common.c | 79

[libvirt] [PATCH v2 01/15] vbox: Update ATTRIBUTE_UNUSED usage

2017-10-24 Thread Dawid Zamirski
Since the removal of VBOX <= 3x, the function arguments are actually used so they should not be marked with ATTRIBUTE_UNUSED anymore. --- src/vbox/vbox_tmpl.c | 49 +++-- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git

[libvirt] [PATCH v2 09/15] domain: Allow 'model' attribute for ide controller

2017-10-24 Thread Dawid Zamirski
The optional values are 'piix3', 'piix4' or 'ich6'. Those will be needed to allow setting IDE controller model in VirtualBox driver. --- docs/formatdomain.html.in | 4 docs/schemas/domaincommon.rng | 18 -- src/conf/domain_conf.c| 9 +

[libvirt] [PATCH v2 07/15] vbox: Support empty removable drives.

2017-10-24 Thread Dawid Zamirski
Original code was checking for non empty disk source before proceeding to actually attach disk device to VM. This prevented from creating empty removable devices like DVD or floppy. Therefore, this patch re-organizes the loop work-flow to allow such configurations as well as makes the code follow

[libvirt] [PATCH v2 08/15] vbox: Add more IStorageController API mappings

2017-10-24 Thread Dawid Zamirski
This patch exposes additional methods of the native VBOX API to the libvirt 'unified' vbox API to deal with IStorageController. The exposed methods are: * IStorageController->GetStorageControllerType() * IStorageController->SetStorageControllerType() * IMachine->GetStorageControllers() ---

[libvirt] [PATCH v2 05/15] vbox: Cleanup vboxAttachDrives implementation

2017-10-24 Thread Dawid Zamirski
This commit primes vboxAttachDrives for further changes so when they are made, the diff is less noisy: * move variable declarations to the top of the function * add disk variable to replace all the def->disks[i] instances * add cleanup at the end of the loop body, so it's all in one place

[libvirt] [PATCH v2 03/15] vbox: Cleanup partially-defined VM on failure

2017-10-24 Thread Dawid Zamirski
Since the VBOX API requires to register an initial VM before proceeding to attach any remaining devices to it, any failure to attach such devices should result in automatic cleanup of the initially registered VM so that the state of VBOX registry remains clean without any leftover "aborted" VMs in

[libvirt] [PATCH v2 02/15] vbox: Close media when undefining domains

2017-10-24 Thread Dawid Zamirski
When registering a VM we call OpenMedium on each disk image which adds it to vbox's global media registry. Therefore, we should make sure to call Close when unregistering VM so we cleanup the media registry entries after ourselves - this does not remove disk image files. This follows the behaviour

[libvirt] [PATCH v2 04/15] vbox: vboxAttachDrives now relies on address info

2017-10-24 Thread Dawid Zamirski
Previously, the driver was computing VBOX's devicePort/deviceSlot values based on device name and max port/slot values. While this worked, it completely ignored values. Additionally, libvirt's built-in virDomainDiskDefAssignAddress already does a good job setting default values on

Re: [libvirt] [PATCH 5/6] vbox: Process controller definitions from xml.

2017-10-19 Thread Dawid Zamirski
On Tue, 2017-10-17 at 15:46 -0400, John Ferlan wrote: > > On 10/09/2017 04:49 PM, Dawid Zamirski wrote: > > From: Dawid Zamirski <dzamir...@datto.com> > > > Lots of potentially use DEBUG information being lost. IDC, but seems > a > shame to not have it. Altho

Re: [libvirt] [PATCH 2/6] domain: Allow 'model' attribute for ide controller.

2017-10-18 Thread Dawid Zamirski
On Tue, 2017-10-17 at 15:46 -0400, John Ferlan wrote: > > On 10/09/2017 04:49 PM, Dawid Zamirski wrote: > > From: Dawid Zamirski <dzamir...@datto.com> > > > > The optional values are 'piix3', 'piix4' or 'ich6'. Those will be > > needed to allow setting IDE c

Re: [libvirt] [PATCH 1/6] vbox: Close media when undefining domains.

2017-10-17 Thread Dawid Zamirski
On Tue, 2017-10-17 at 15:44 -0400, John Ferlan wrote: > > On 10/09/2017 04:49 PM, Dawid Zamirski wrote: > > From: Dawid Zamirski <dzamir...@datto.com> > > > > When registering a VM we call OpenMedium on each disk image which > > adds it > > to vbox's g

[libvirt] [PATCH 1/3] vbox: Make autoport set RDP port range.

2017-10-10 Thread Dawid Zamirski
Originally autoport in vbox driver was setting the port to default value (3389) which caused mutiple VM instances use the same port. Since libvirt XML does not allow to set port ranges, this patch changes the "autoport" behavior to set VBox's "TCP/Ports" property to an arbitraty port range

[libvirt] [PATCH 3/3] docs: Fix multiUser/replaceUser in RDP display doc.

2017-10-10 Thread Dawid Zamirski
The original description got it backwards. --- docs/formatdomain.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index c0e3c2221..19a778bce 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in

[libvirt] [PATCH 2/3] vbox: Read runtime RDP port and handle autoport.

2017-10-10 Thread Dawid Zamirski
VirutalBox has a IVRDEServerInfo sturcture available that gives the effective runtime port that the VM is using when it's running. This is useful when the "TCP/Ports" VBox property was set to port range (e.g. via autoport = "yes" or via VBoxManage) in which case it would be impossible to get the

[libvirt] [PATCH 0/3] vbox: Update VRDE server port handling.

2017-10-10 Thread Dawid Zamirski
n RDP wher the descriptions of multiUser and replaceUser were swapped. Dawid Zamirski (3): vbox: Make autoport set RDP port range. vbox: Read runtime RDP port and handle autoport. docs: Fix multiUser/replaceUser in RDP display doc. docs/formatdomain.html.in | 4 +- src/vbox/vbox_common.c

[libvirt] [PATCH 3/6] docs: Add info about ide model attribute.

2017-10-09 Thread Dawid Zamirski
From: Dawid Zamirski <dzamir...@datto.com> --- docs/formatdomain.html.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index c0e3c2221..ddcc9f1b1 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -

[libvirt] [PATCH 5/6] vbox: Process controller definitions from xml.

2017-10-09 Thread Dawid Zamirski
From: Dawid Zamirski <dzamir...@datto.com> Until now the vbox driver was completely ignoring element for storage in the XML definition. This patch adds support for interpretting element for storage devices. With this the following other changes were made to the whole storage attachmen

[libvirt] [PATCH 6/6] vbox: Update XML dump of storage devices.

2017-10-09 Thread Dawid Zamirski
From: Dawid Zamirski <dzamir...@datto.com> * added vboxDumpStorageControllers * replaced vboxDumpIDEHDDs with vboxDumpDisks which has been refectored quite a bit to handle removable devices, the new SAS controller support etc. * align the logic in vboxSnapshotGetReadWrit

[libvirt] [PATCH 2/6] domain: Allow 'model' attribute for ide controller.

2017-10-09 Thread Dawid Zamirski
From: Dawid Zamirski <dzamir...@datto.com> The optional values are 'piix3', 'piix4' or 'ich6'. Those will be needed to allow setting IDE controller model in VirtualBox driver. --- docs/schemas/domaincommon.rng | 18 -- src/conf/domain_conf.c| 9 + sr

[libvirt] [PATCH 4/6] vbox: Add more IStorageController API mappings.

2017-10-09 Thread Dawid Zamirski
From: Dawid Zamirski <dzamir...@datto.com> This patch 'maps' additonal methods for VBOX API to the libvirt unified vbox API to deal with IStorageController. The 'mapped' methods are: * IStorageController->GetStorageControllerType() * IStorageController->SetStorageControllerType(

[libvirt] [PATCH 0/6] vbox: Improve handling of storage devices.

2017-10-09 Thread Dawid Zamirski
undefining VMs. Leaving media unclosed may cause errors when defining VMs pointing at the same local path. Dawid Zamirski (6): vbox: Close media when undefining domains. domain: Allow 'model' attribute for ide controller. docs: Add info about ide model attribute. vbox: Add more

[libvirt] [PATCH 1/6] vbox: Close media when undefining domains.

2017-10-09 Thread Dawid Zamirski
From: Dawid Zamirski <dzamir...@datto.com> When registering a VM we call OpenMedium on each disk image which adds it to vbox's global media registry. Therefore, we should make sure to call Close when unregistering VM so we cleanup the media registry entries after ourselves - this does not

Re: [libvirt] [libvirt-php PATCH v2 00/11] Refactor into smaller components

2017-08-21 Thread Dawid Zamirski
On Thu, 2017-08-03 at 14:34 -0400, Dawid Zamirski wrote: > As per [1], this patch series splits up the large libvirt-php.c into > components that (attempts) to resemble the structure of the libvirt > project. Each patch successive patch was compile-tested while the > whole > seri

Re: [libvirt] [libvirt-php PATCH v2 01/11] Move PHP version compat macros to utils.h

2017-08-03 Thread Dawid Zamirski
On Thu, 2017-08-03 at 14:34 -0400, Dawid Zamirski wrote: > Also util now includes all the PHP headers. > --- > src/libvirt-php.c | 1 - > src/libvirt-php.h | 157 +--- > > src/u

[libvirt] [libvirt-php PATCH v2 08/11] Split up the bindings for libvirt snapshot API

2017-08-03 Thread Dawid Zamirski
--- src/Makefile.am| 1 + src/libvirt-php.c | 257 + src/libvirt-php.h | 18 +--- src/libvirt-snapshot.c | 244 ++ src/libvirt-snapshot.h | 58 +++ 5 files changed, 306

[libvirt] [libvirt-php PATCH v2 10/11] Split up the bindings for libvirt NWFilter API

2017-08-03 Thread Dawid Zamirski
--- src/Makefile.am| 3 +- src/libvirt-nwfilter.c | 415 + src/libvirt-nwfilter.h | 66 src/libvirt-php.c | 445 + src/libvirt-php.h | 28 5 files changed, 487

[libvirt] [libvirt-php PATCH v2 03/11] Split up the bindings for libvirt node API

2017-08-03 Thread Dawid Zamirski
--- src/Makefile.am | 3 +- src/libvirt-connection.c | 1 + src/libvirt-connection.h | 2 - src/libvirt-node.c | 305 src/libvirt-node.h | 23 src/libvirt-php.c| 322

[libvirt] [libvirt-php PATCH v2 07/11] Split up the bindings for libvirt storage API

2017-08-03 Thread Dawid Zamirski
--- src/Makefile.am |3 +- src/libvirt-php.c | 1188 + src/libvirt-php.h | 49 -- src/libvirt-storage.c | 1130 ++ src/libvirt-storage.h | 137 ++ 5 files changed, 1271

[libvirt] [libvirt-php PATCH v2 01/11] Move PHP version compat macros to utils.h

2017-08-03 Thread Dawid Zamirski
Also util now includes all the PHP headers. --- src/libvirt-php.c | 1 - src/libvirt-php.h | 157 +--- src/util.h| 174 ++ 3 files changed, 175 insertions(+), 157 deletions(-) diff --git

[libvirt] [libvirt-php PATCH v2 06/11] Split up the bindings for libvirt network API

2017-08-03 Thread Dawid Zamirski
--- src/Makefile.am | 3 +- src/libvirt-network.c | 587 src/libvirt-network.h | 73 ++ src/libvirt-php.c | 610 +- src/libvirt-php.h | 24 +- 5 files changed, 665 insertions(+),

[libvirt] [libvirt-php PATCH v2 04/11] Split up the bindings for libvirt stream API

2017-08-03 Thread Dawid Zamirski
--- src/Makefile.am | 3 +- src/libvirt-php.c| 231 +-- src/libvirt-php.h| 15 +--- src/libvirt-stream.c | 230 ++ src/libvirt-stream.h | 39 + 5 files changed, 274

[libvirt] [libvirt-php PATCH v2 09/11] Split up the bindings for libvirt nodedev API

2017-08-03 Thread Dawid Zamirski
--- src/Makefile.am | 3 +- src/libvirt-nodedev.c | 340 src/libvirt-nodedev.h | 54 src/libvirt-php.c | 353 +- src/libvirt-php.h | 13 -- 5 files changed, 399

[libvirt] [libvirt-php PATCH v2 11/11] Fix is_local_connection implementation.

2017-08-03 Thread Dawid Zamirski
As it was failing when local host is using FQDN for hostnames. The logic to do so follows libvirt's implementation for the same thing. This fixes an issue where unit tests would falsely fail on workstations that have FQDN hostnames. --- src/libvirt-php.c | 38

[libvirt] [libvirt-php PATCH v2 02/11] Split up the bindings for libvirt connection API

2017-08-03 Thread Dawid Zamirski
* add libvirt-connection.h and libvirt-connection.c * move all libvirt_connect_* function declarations and definitions to above files * other minor adjusments to libvirt-php.h and util.h to keep the code compilable while the code is being moved around. --- src/Makefile.am | 3 +-

[libvirt] [libvirt-php PATCH v2 00/11] Refactor into smaller components

2017-08-03 Thread Dawid Zamirski
m/archives/libvir-list/2017-August/msg00046.html Dawid Zamirski (11): Move PHP version compat macros to utils.h Split up the bindings for libvirt connection API Split up the bindings for libvirt node API Split up the bindings for libvirt stream API Split up the bindings for libvirt

Re: [libvirt] [libvirt-php PATCH 04/13] Split up the bindings for libvirt connection API

2017-08-03 Thread Dawid Zamirski
On Thu, 2017-08-03 at 17:02 +0200, Michal Privoznik wrote: > On 08/03/2017 04:58 PM, Dawid Zamirski wrote: > > > > On Thu, 2017-08-03 at 14:27 +0200, Michal Privoznik wrote: > > > On 08/01/2017 11:46 PM, Dawid Zamirski wrote: > > > > * add libvirt-c

Re: [libvirt] [libvirt-php PATCH 04/13] Split up the bindings for libvirt connection API

2017-08-03 Thread Dawid Zamirski
On Thu, 2017-08-03 at 14:27 +0200, Michal Privoznik wrote: > On 08/01/2017 11:46 PM, Dawid Zamirski wrote: > > * add libvirt-connection.h and libvirt-connection.c > > * move all libvirt_connect_* function declarations and definitions > > to > > above files &

[libvirt] [libvirt-php PATCH 08/13] Split up the bindings for libvirt network API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am | 3 +- src/libvirt-network.c | 586 src/libvirt-network.h | 73 ++ src/libvirt-php.c | 610 +- src/libvirt-php.h | 24 +- 5 files changed, 664 insertions(+),

[libvirt] [libvirt-php PATCH 03/13] Do not reuse PHPFUNC macro definition

2017-08-01 Thread Dawid Zamirski
The sockets.c and vncfunc.c should have their own function macros as they are "helper" functions not directly related to PHP bindings themselves. This is simple s/PHPFUNC/SOCKETFUNC/ and s/PHPFUNC/VNCFUNC/ --- src/sockets.c | 44 +-- src/vncfunc.c | 138

Re: [libvirt] [libvirt-php PATCH 0/7] add bindings for NWFilter APIs

2017-08-01 Thread Dawid Zamirski
On Mon, 2017-07-31 at 11:31 -0400, Dawid Zamirski wrote: > On Mon, 2017-07-31 at 12:35 +0200, Michal Privoznik wrote: > > Hi Michal, > > I've been busy at work lately with little or no spare time for my OSS > work :-( I've started on this last week but have been dragged away.

[libvirt] [libvirt-php PATCH 12/13] Split up the bindings for libvirt NWFilter API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am| 3 +- src/libvirt-nwfilter.c | 414 + src/libvirt-nwfilter.h | 66 src/libvirt-php.c | 445 + src/libvirt-php.h | 28 5 files changed, 486

[libvirt] [libvirt-php PATCH 10/13] Split up the bindings for libvirt snapshot API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am| 1 + src/libvirt-php.c | 257 + src/libvirt-php.h | 18 +--- src/libvirt-snapshot.c | 243 ++ src/libvirt-snapshot.h | 58 +++ 5 files changed, 305

[libvirt] [libvirt-php PATCH 04/13] Split up the bindings for libvirt connection API

2017-08-01 Thread Dawid Zamirski
* add libvirt-connection.h and libvirt-connection.c * move all libvirt_connect_* function declarations and definitions to above files * other minor adjusments to libvirt-php.h and util.h to keep the code compilable while the code is being moved around. --- src/Makefile.am | 3 +-

[libvirt] [libvirt-php PATCH 05/13] Split up the bindings for libvirt node API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am| 3 +- src/libvirt-node.c | 304 ++ src/libvirt-node.h | 25 + src/libvirt-php.c | 322 + src/libvirt-php.h | 6 - src/util.h | 25 + 6 files

[libvirt] [libvirt-php PATCH 00/13] Refactor into smaller components

2017-08-01 Thread Dawid Zamirski
As per [1], this patch series splits up the large libvirt-php.c into components that (attempts) to resemble the structure of the libvirt project. Each patch successive patch was compile-tested while the whole series was verified with "make check" and a simple custom written PHP scri

[libvirt] [libvirt-php PATCH 01/13] Move PHP version compat macros to utils.h

2017-08-01 Thread Dawid Zamirski
--- src/libvirt-php.h | 144 -- src/util.h| 154 ++ 2 files changed, 164 insertions(+), 134 deletions(-) diff --git a/src/libvirt-php.h b/src/libvirt-php.h index 7962e33..867eb60 100644

[libvirt] [libvirt-php PATCH 02/13] Update AUTHORS file

2017-08-01 Thread Dawid Zamirski
oo.org> +Yukihiro Kawada <warp.kaw...@gmail.com> +Remi Collet <r...@famillecollet.com> +Ivo van den Abeelen <ivovandenabee...@gmail.com> +Tiziano Müller <dev-z...@gentoo.org> +Pavel Odintsov <pavel.odint...@gmail.com> +Tugdual Saunier <tugdual.sau

Re: [libvirt] [libvirt-php PATCH 00/13] Refactor into smaller components

2017-08-01 Thread Dawid Zamirski
On Tue, 2017-08-01 at 17:46 -0400, Dawid Zamirski wrote: > As per [1], this patch series splits up the large libvirt-php.c into > components that (attempts) to resemble the structure of the libvirt > project. Each patch successive patch was compile-tested while the > whole > seri

[libvirt] [libvirt-php PATCH 11/13] Split up the bindings for libvirt nodedev API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am | 3 +- src/libvirt-nodedev.c | 339 src/libvirt-nodedev.h | 54 src/libvirt-php.c | 353 +- src/libvirt-php.h | 13 -- 5 files changed, 398

[libvirt] [libvirt-php PATCH 09/13] Split up the bindings for libvirt storage API

2017-08-01 Thread Dawid Zamirski
--- src/Makefile.am |3 +- src/libvirt-php.c | 1188 + src/libvirt-php.h | 49 -- src/libvirt-storage.c | 1129 ++ src/libvirt-storage.h | 138 ++ 5 files changed, 1271

[libvirt] [libvirt-php PATCH 13/13] Fix is_local_connection implementation.

2017-08-01 Thread Dawid Zamirski
As it was failing when local host is using FQDN for hostnames. The logic to do so follows libvirt's implementation for the same thing. This fixes an issue where unit tests would falsely fail on workstations that have FQDN hostnames. --- src/libvirt-php.c | 38

  1   2   3   >