Re: [libvirt] [PATCH v2] vz: allow to start vz driver without host cache info

2017-11-07 Thread Mikhail Feoktistov
On 11.07.2017 15:55, Martin Kletzander wrote: On Tue, Jul 11, 2017 at 03:20:38PM +0300, Mikhail Feoktistov wrote: On 11.07.2017 12:22, Martin Kletzander wrote: On Tue, Jul 11, 2017 at 04:59:05AM -0400, Mikhail Feoktistov wrote: Show warning message instead of fail operation. It happens if

Re: [libvirt] [PATCH v2] vz: allow to start vz driver without host cache info

2017-07-11 Thread Mikhail Feoktistov
On 11.07.2017 12:22, Martin Kletzander wrote: On Tue, Jul 11, 2017 at 04:59:05AM -0400, Mikhail Feoktistov wrote: Show warning message instead of fail operation. It happens if kernel or cpu doesn't support reporting cpu cache info. In case of Virtuozzo file "id" doesn't e

[libvirt] [PATCH v2] vz: allow to start vz driver without host cache info

2017-07-11 Thread Mikhail Feoktistov
Show warning message instead of fail operation. It happens if kernel or cpu doesn't support reporting cpu cache info. In case of Virtuozzo file "id" doesn't exist. --- src/vz/vz_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c ind

Re: [libvirt] [PATCH] vz: allow to start vz driver without host cache info

2017-07-11 Thread Mikhail Feoktistov
root root 4096 Jul 10 06:44 type -r--r--r-- 1 root root 4096 Jul 10 06:44 ways_of_associativity On 10.07.2017 15:48, Peter Krempa wrote: On Mon, Jul 10, 2017 at 07:54:03 -0400, Mikhail Feoktistov wrote: Any justification or explanation when this happens? --- src/vz/vz_driver.c | 2 +- 1 fi

[libvirt] [PATCH] vz: allow to start vz driver without host cache info

2017-07-10 Thread Mikhail Feoktistov
--- src/vz/vz_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 6f4aee3..eb97e54 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -119,7 +119,7 @@ vzBuildCapabilities(void) goto error; if (virCapabi

[libvirt] [PATCH 2/2] vz: nseclabels member is moved to virDomainChrSourceDef struct

2017-06-29 Thread Mikhail Feoktistov
--- src/vz/vz_sdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index a62b310..0aa1a30 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -2894,7 +2894,7 @@ static int prlsdkCheckSerialUnsupportedParams(virDomainChrDefPtr chr)

[libvirt] [PATCH v2 0/2] vz: fix vz driver compilation

2017-06-29 Thread Mikhail Feoktistov
Mikhail Feoktistov (2): vz: add argument xmlopt for virDomainDefCheckABIStability call vz: nseclabels member is moved to virDomainChrSourceDef struct src/vz/vz_driver.c | 2 +- src/vz/vz_sdk.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 1.8.3.1 -- libvir-list mailing

[libvirt] [PATCH 1/2] vz: add argument xmlopt for virDomainDefCheckABIStability call

2017-06-29 Thread Mikhail Feoktistov
--- src/vz/vz_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index d47774c..6f4aee3 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -872,7 +872,7 @@ vzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsign

[libvirt] [PATCH] vz: fix vz driver compilation

2017-06-28 Thread Mikhail Feoktistov
- add argument xmlopt for virDomainDefCheckABIStability - nseclabels is moved to virDomainChrSourceDefPtr --- src/vz/vz_driver.c | 2 +- src/vz/vz_sdk.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index d47774c..6f4aee3 100644 -

[libvirt] [PATCH] vz: Remove unused variable

2017-03-17 Thread Mikhail Feoktistov
emulatedType is not used in prlsdkAddDomainHardDisksInfo() --- src/vz/vz_sdk.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 3fd17db..8e6e89d 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -817,14 +817,9 @@ prlsdkAddDomainHardDisksInfo(vzDri

[libvirt] [PATCH] vz: correct error message

2017-02-20 Thread Mikhail Feoktistov
--- src/vz/vz_sdk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index e16bb0c..84e89a5 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -2601,8 +2601,10 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDomainDefPtr def)

Re: [libvirt] [PATCH 1/2] util: qemu: make qemuSafeSerialParamValue function usable by other drivers

2016-10-20 Thread Mikhail Feoktistov
On 20.10.2016 14:09, Maxim Nestratov wrote: Rename qemuSafeSerialParamValue to virSafeSerialParamValue and move it to utils Signed-off-by: Maxim Nestratov --- src/libvirt_private.syms | 1 + src/qemu/qemu_command.c | 19 +-- src/util/virutil.c | 16

Re: [libvirt] [PATCH 2/2] vz: support setting disk serial number

2016-10-20 Thread Mikhail Feoktistov
On 20.10.2016 14:09, Maxim Nestratov wrote: Signed-off-by: Maxim Nestratov --- src/vz/vz_sdk.c | 19 +++ src/vz/vz_utils.c | 5 - 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index b5b0197..f27441d 100644 --- a/src/v

[libvirt] [PATCH] vz: set localhost as vnc address

2016-10-18 Thread Mikhail Feoktistov
We should set localhost as vnc address in case of empty string. Because Virtuozzo sets 0.0.0.0 as default vnc address. --- src/vz/vz_sdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index f2a5c96..7235172 100644 --- a/src/vz/vz_sdk.c +++ b

Re: [libvirt] [PATCH] vz: fix vnc host address

2016-10-10 Thread Mikhail Feoktistov
On 10.10.2016 11:49, Michal Privoznik wrote: On 08.10.2016 00:05, Mikhail Feoktistov wrote: Empty string means 127.0.0.1 in terms of vzSDK But in this case we should set 0.0.0.0 --- .gnulib | 2 +- src/vz/vz_sdk.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[libvirt] [PATCH] vz: fix vnc host address

2016-10-07 Thread Mikhail Feoktistov
Empty string means 127.0.0.1 in terms of vzSDK But in this case we should set 0.0.0.0 --- .gnulib | 2 +- src/vz/vz_sdk.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gnulib b/.gnulib index e89b4a7..a2a3943 16 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproje

Re: [libvirt] [PATCH] vz: update domain cache after device updates

2016-08-25 Thread Mikhail Feoktistov
On 25.08.2016 11:33, Nikolay Shirokovskiy wrote: --- src/vz/vz_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index b34fe33..f223794 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -1694,6 +1694,9 @@ static int vzDomainUpdat

Re: [libvirt] [PATCH v2] vz: fixed race in vzDomainAttach/DettachDevice

2016-08-18 Thread Mikhail Feoktistov
Ack On 18.08.2016 15:37, Olga Krishtal wrote: While dettaching/attaching device in OpenStack, nova calls vzDomainDettachDevice twice, because the update of the internal configuration of the ct comes a bit latter than the update event. As the result, we suffer from the second call to dettach the

Re: [libvirt] [PATCH] vz: fixed race in vzDomainAttach/DettachDevice

2016-08-18 Thread Mikhail Feoktistov
On 18.08.2016 14:57, Olga Krishtal wrote: While dettaching/attaching device in OpenStack, nova calls vzDomainDettachDevice twice, because the update of the internal configuration of the ct comes a bit latter than the update event. As the result, we suffer from the second call to dettach the same

Re: [libvirt] [PATCH] vz: add validation callbacks

2016-08-18 Thread Mikhail Feoktistov
On 18.08.2016 14:47, Maxim Nestratov wrote: 18-Aug-16 14:43, Mikhail Feoktistov пишет: This patch fixes a bug which occurs when we check a bus and unit number for a new attached disk. We should do this check in ValidadionCallback, not in PostParse callback. Because in PostParse we have not

[libvirt] [PATCH] vz: add validation callbacks

2016-08-18 Thread Mikhail Feoktistov
This patch fixes a bug which occurs when we check a bus and unit number for a new attached disk. We should do this check in ValidadionCallback, not in PostParse callback. Because in PostParse we have not initialized disk->info.addr.drive struct yet. Move part of code from domainPostParseCallback to

Re: [libvirt] [PATCH v2 0/7] qemu: util: vz: some fixes and improvements

2016-08-17 Thread Mikhail Feoktistov
Ack the series, except [PATCH v2 7/7] vz: relax disk bus controller and device indices check On 16.08.2016 15:24, Maxim Nestratov wrote: v1-v2 changes: - fixed "vz: reset errors after ignoring return values" - added "vz: relax disk bus controller and device indices check" Maxim Nestratov (6):

Re: [libvirt] [PATCH v2 7/7] vz: relax disk bus controller and device indices check

2016-08-17 Thread Mikhail Feoktistov
I think there is a better solution, we should move our checks from postParse callback to validateCallback. I'm doing patch series now, so we can discuss these changes a bit later. On 16.08.2016 15:24, Maxim Nestratov wrote: We should not be too strict regarding device indices check because it i

[libvirt] [PATCH] vz: getting bus type for containers

2016-08-15 Thread Mikhail Feoktistov
We should query bus type for containers too, like for VM. In openstack we add volume disk like SCSI, so we can't hardcode SATA bus. --- src/vz/vz_sdk.c | 32 +--- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index f81

Re: [libvirt] [PATCH 2/6] vz: get additional error information from job correctly

2016-08-12 Thread Mikhail Feoktistov
On 10.08.2016 20:44, Maxim Nestratov wrote: First, make function logPrlEventErrorHelper be void and only print information (if any) from an event. Second, don't rewrite original error with any errors we get during parsing event info. Third, ignore PRL_ERR_NO_DATA at all. Signed-off-by: Maxim N

[libvirt] [PATCH] vz: implementation of domainSetUserPassword callback

2016-05-27 Thread Mikhail Feoktistov
--- .gnulib| 2 +- src/vz/vz_driver.c | 20 src/vz/vz_sdk.c| 31 +++ src/vz/vz_sdk.h| 5 - 4 files changed, 56 insertions(+), 2 deletions(-) diff --git a/.gnulib b/.gnulib index 8d807a9..6cc32c6 16 --- a/.gnulib +++ b/

[libvirt] [PATCH] util: compilation fix if build without GNUTLS library

2016-05-21 Thread Mikhail Feoktistov
--- src/util/vircrypto.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/util/vircrypto.c b/src/util/vircrypto.c index 5183d49..4f288f0 100644 --- a/src/util/vircrypto.c +++ b/src/util/vircrypto.c @@ -24,6 +24,7 @@ #include "virlog.h" #include "virerror.h"

[libvirt] [PATCH] vz: add error code for case if vm is already stopped

2016-05-21 Thread Mikhail Feoktistov
If try to stop VM or container which is already stopped than Virtuozzo 7 returns code PRL_ERR_INVALID_ACTION_REQUESTED. Error code PRL_ERR_DISP_VM_IS_NOT_STARTED is used in Virtuozzo 6 --- src/vz/vz_sdk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index a

Re: [libvirt] [PATCH] storage: dir: adapts .wipeVol for ploop volumes

2016-05-17 Thread Mikhail Feoktistov
On 16.05.2016 10:19, Olga Krishtal wrote: The modification of .volWipe callback wipes ploop volume using one of given wiping algorithm: dod, nnsa, etc. However, in case of ploop volume we need to reinitialize root.hds and DiskDescriptor.xml. Signed-off-by: Olga Krishtal --- src/storage/sto

[libvirt] [PATCH] vz: fix disk enumeration

2016-04-27 Thread Mikhail Feoktistov
If we want to delete all disks for container or vm we should make a loop from 0 to NumberOfDisks and always use zero index in PrlVmCfg_GetHardDisk to get disk handle. When we delete first disk after that numbers of other disks will be changed, start from 0 to NumberOfDisks-1. That's why we should a

[libvirt] [PATCH] vz: correct iomode check

2016-04-12 Thread Mikhail Feoktistov
Virtuozzo hypervisor supports native iomode. So we should allow to add disk with iomode "native" or "default". --- src/vz/vz_utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c index fed48a5..a89cf73 100644 --- a/src/vz/vz_utils.c

Re: [libvirt] [PATCH v2] add func to set shared drivers after libvirtd init

2016-04-08 Thread Mikhail Feoktistov
On 07.04.2016 19:28, Maxim Nestratov wrote: 19.11.2015 15:22, Mikhail Feoktistov пишет: Diff from v1: Remove vz prefix from the title of this letter. Because this is the common case for all drivers in libvirt. Description: Built-in drivers in libvirt are initialized before libvirtd

Re: [libvirt] [PATCH v2 0/7] vz: add disk and controller check in domainPostParse phase

2016-03-19 Thread Mikhail Feoktistov
prlsdkCheckDiskUnsupportedParams to vz_utils.c Mikhail Feoktistov (6): vz: save vz version in connection structure vz: add vzCapabilities to connection structure vz: check supported disk format and bus vz: report correct disk format in domainGetXMLDesc vz: check supported controllers vz

[libvirt] [PATCH] vz: code refactoring

2016-03-19 Thread Mikhail Feoktistov
In prlsdkAddNet() Attach/DetachNet() functions privconn should be the first argument --- src/vz/vz_driver.c | 4 ++-- src/vz/vz_sdk.c| 16 src/vz/vz_sdk.h| 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c in

[libvirt] [PATCH 0/6] vz: add disk and controller check in domainPostParse phase

2016-03-15 Thread Mikhail Feoktistov
Mikhail Feoktistov (6): vz: save vz version in connection structure vz: add vzCapabilities to connection structure vz: check supported disk format and bus vz: report correct disk format in domainGetXMLDesc vz: check supported controllers vz: set default SCSI model src/vz/vz_driver.c

[libvirt] [PATCH 3/6] vz: check supported disk format and bus

2016-03-15 Thread Mikhail Feoktistov
In DomainPostParse phase we check disk format and bus. If disk format is not specified in XML (VIR_STORAGE_FILE_NONE) than we accept this disk. Otherwise we try to find disk format in vzCapabilities struct. Also we try to find disk bus in vzCapabilities->diskBuses. It contains buses that we suppor

[libvirt] [PATCH 2/6] vz: add vzCapabilities to connection structure

2016-03-15 Thread Mikhail Feoktistov
Virtuozzo6 supports only ploop disks for containers and virtual machines on IDE SCSI and SATA buses. Virtuozzo7 supports only qcow2 for virtual machines on IDE and SCSI buses. In this patch we add vzCapabilities structure to connection structure. It contains disk formats and list of buses that we s

[libvirt] [PATCH 1/6] vz: save vz version in connection structure

2016-03-15 Thread Mikhail Feoktistov
Move code from connectGetVersion callback to vzInitVersion function --- src/vz/vz_driver.c | 50 +++--- src/vz/vz_utils.c | 47 +++ src/vz/vz_utils.h | 3 +++ 3 files changed, 57 insertions(+), 43 deletions(

[libvirt] [PATCH 4/6] vz: report correct disk format in domainGetXMLDesc

2016-03-15 Thread Mikhail Feoktistov
We should report correct disk format, because it depends on virtuozzo version and domain type. Now we support only one disk format for each domain type. So we can take it from vzCapabilities structure. --- src/vz/vz_sdk.c | 29 + 1 file changed, 17 insertions(+), 12 del

[libvirt] [PATCH 6/6] vz: set default SCSI model

2016-03-15 Thread Mikhail Feoktistov
Each version of virtuozzo supports only one type of SCSI controller So if we add disk on SCSI bus, we should set SCSI controller model. We can take it from vzCapabilities structure. --- src/vz/vz_driver.c | 2 +- src/vz/vz_sdk.c| 27 +++ src/vz/vz_sdk.h| 2 +- src

[libvirt] [PATCH 5/6] vz: check supported controllers

2016-03-15 Thread Mikhail Feoktistov
Virtuozzo6 supports only SCSI(BUSLOGIC) IDE and SATA controllers. Virtuozzo7 supports only SCSI(VIRTIO_SCSI) and IDE. In this patch we add list of supported controllers and scsi models to vzCapabilities structure. In openConnection() callback we get virtuozzo version and select proper capabilitie

Re: [libvirt] [PATCH 0/3] vz: disk format support

2016-03-04 Thread Mikhail Feoktistov
Please ignore these patches. I'll send a new version soon. On 01.03.2016 13:46, Mikhail Feoktistov wrote: Mikhail Feoktistov (3): vz: add vzInitVersion function vz: add virStorageFileFormat to connection structure vz: check supported disk format src/vz/vz_driver.c

[libvirt] [PATCH 2/3] vz: add virStorageFileFormat to connection structure

2016-03-01 Thread Mikhail Feoktistov
Virtuozzo6 supports only ploop disks for containers and virtual machines. Virtuozzo7 supports only qcow2 for virtual machines. In this patch we add virStorageFileFormat variables to connection structure. Each variable contains disk format that we support for virtual machines and containers. In ope

[libvirt] [PATCH 1/3] vz: add vzInitVersion function

2016-03-01 Thread Mikhail Feoktistov
Move code from connectGetVersion callback to vzInitVersion function Move variable contains version number to connection structure. --- src/vz/vz_driver.c | 50 +++--- src/vz/vz_utils.c | 47 +++ src/vz/vz_util

[libvirt] [PATCH 0/3] vz: disk format support

2016-03-01 Thread Mikhail Feoktistov
Mikhail Feoktistov (3): vz: add vzInitVersion function vz: add virStorageFileFormat to connection structure vz: check supported disk format src/vz/vz_driver.c | 52 +++--- src/vz/vz_sdk.c| 28 --- src/vz/vz_sdk.h| 2 +- src

[libvirt] [PATCH 3/3] vz: check supported disk format

2016-03-01 Thread Mikhail Feoktistov
In prlsdkAddDisk() we try to check disk format, before adding disk. If disk format is not specified in XML (VIR_STORAGE_FILE_NONE) than we accept this disk. Otherwise we try to find disk format in connection struct. --- src/vz/vz_driver.c | 2 +- src/vz/vz_sdk.c| 28 -

[libvirt] [PATCH 0/4] vz: rework domain creation

2016-02-10 Thread Mikhail Feoktistov
domain to domains list. These two threads call virDomainObjListFindByUUID() from prlsdkAddDomain() and don't find new domain. So they add two domains with the same uuid to domains list. Mikhail Feoktistov (4): vz: make output arguments in prlsdkGetDomainIds as optional vz: remove unused s

[libvirt] [PATCH 4/4] vz: fix race condition when adding domain to domains list

2016-02-10 Thread Mikhail Feoktistov
Race condition: User calls defineXML to create new instance. The main thread from vzDomainDefineXMLFlags() creates new instance by prlsdkCreateVm. Then this thread calls prlsdkAddDomain to add new domain to domains list. The second thread receives notification from hypervisor that new VM was creat

[libvirt] [PATCH 1/4] vz: make output arguments in prlsdkGetDomainIds as optional

2016-02-10 Thread Mikhail Feoktistov
prlsdkGetDomainIds() returns name and uuid for specified instance. Now output arguments can be NULL. It allows to get only necessary info(name or uuid). --- src/vz/vz_sdk.c | 38 ++ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/src/vz/vz_sdk.c

[libvirt] [PATCH 3/4] vz: fix notification subscription

2016-02-10 Thread Mikhail Feoktistov
Bug cause: Update the domain that is subscribed to hypervisor notification. LoadDomain() rewrites notifications fields in vzDomObj structure and makes domain as "unsubscribed". Fix: Initialize notification fields in vzDomObj only if we create a new domain. And do not reinitialize these fields if w

[libvirt] [PATCH 2/4] vz: remove unused struct field

2016-02-10 Thread Mikhail Feoktistov
In commit 7039bb3c we have removed code that saves uuid to vzDomObj.uuid So this field is no longer needed. --- src/vz/vz_sdk.c | 5 - src/vz/vz_utils.h | 1 - 2 files changed, 6 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index a47c5d6..3b7d7b3 100644 --- a/src/vz/vz_sdk.c

Re: [libvirt] [PATCH 0/7] storage:dir: ploop volumes support

2016-02-08 Thread Mikhail Feoktistov
invalid email in cc list "=nshirokovs...@virtuozzo.com" On 05.02.2016 19:23, Olga Krishtal wrote: This series of patches is aimed to support ploop volumes directory storage pools. Ploop is a disk loopback block device, not unlike loop but with many features like dynamic resize, snapshots, backu

Re: [libvirt] [PATCH 4/7] storage:dir: adapts .uploadVol .dowloadVol for ploop volume

2016-02-08 Thread Mikhail Feoktistov
On 05.02.2016 19:23, Olga Krishtal wrote: In case of ploop volume, target path of the volume is the path to the directory that contains image file named root.hds and DiskDescriptor.xml. While using uploadVol and downloadVol callbacks we need to open root.hds itself. To accomplish this goal we m

Re: [libvirt] [PATCH 3/7] storage:dir: .deleteVol callback for ploop volume

2016-02-08 Thread Mikhail Feoktistov
On 05.02.2016 19:23, Olga Krishtal wrote: Deletes whole directory of a ploop volume. To delete ploop image it has to be unmounted. Signed-off-by: Olga Krishtal --- src/storage/storage_backend.c| 6 ++ src/storage/storage_backend.h| 2 ++ src/storage/storage_backend_fs.c | 5 ++

Re: [libvirt] [PATCH 2/7] storage:dir: .buildVol and .buildVolFrom callbacks for ploop

2016-02-08 Thread Mikhail Feoktistov
On 05.02.2016 19:23, Olga Krishtal wrote: These callbacks let us to create ploop volumes in directory pools. If a ploop volume was created via buildVol callback, then this volume is an empty ploop device with DiskDescriptor.xml. If the volume was created via .buildFrom - then its content is the

Re: [libvirt] [PATCH 1/7] storage:dir: added ploop format in vol-create-as cmd

2016-02-08 Thread Mikhail Feoktistov
On 05.02.2016 19:23, Olga Krishtal wrote: In order to support ploop in storage pools we need separate volume type: VIR_STORAGE_VOL_PLOOP Signed-off-by: Olga Krishtal --- include/libvirt/libvirt-storage.h | 2 +- src/conf/storage_conf.c | 2 +- src/storage/storage_backend_fs.c |

Re: [libvirt] [PATCH 4/4] vz: fix race condition when adding domain to domains list

2016-01-29 Thread Mikhail Feoktistov
29.01.2016 11:06, Nikolay Shirokovskiy пишет: On 28.01.2016 18:38, Mikhail Feoktistov wrote: Race condition: User calls defineXML to create new instance. The main thread from vzDomainDefineXMLFlags() creates new instance by prlsdkCreateVm. Then this thread calls prlsdkAddDomain to add new

Re: [libvirt] [PATCH 4/4] vz: fix race condition when adding domain to domains list

2016-01-29 Thread Mikhail Feoktistov
29.01.2016 17:39, Maxim Nestratov пишет: 28.01.2016 18:38, Mikhail Feoktistov пишет: Race condition: User calls defineXML to create new instance. The main thread from vzDomainDefineXMLFlags() creates new instance by prlsdkCreateVm. Then this thread calls prlsdkAddDomain to add new domain to

Re: [libvirt] [PATCH 1/4] vz: make output arguments in prlsdkGetDomainIds as optional

2016-01-29 Thread Mikhail Feoktistov
prlsdkGetDomainIds() returns name and uuid for specified instance. Now output arguments can be NULL. It allows to get only necessary info(name or uuid). --- src/vz/vz_sdk.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/vz/vz_sdk.c

Re: [libvirt] [PATCH 1/4] vz: make output arguments in prlsdkGetDomainIds as optional

2016-01-29 Thread Mikhail Feoktistov
29.01.2016 11:25, Maxim Nestratov пишет: 28.01.2016 18:38, Mikhail Feoktistov пишет: prlsdkGetDomainIds() returns name and uuid for specified instance. Now output arguments can be NULL. It allows to get only necessary info(name or uuid). --- src/vz/vz_sdk.c | 34

Re: [libvirt] [PATCH] vz: remove unused struct field

2016-01-28 Thread Mikhail Feoktistov
ignore this patch I include it into patch series. 26.01.2016 15:16, Mikhail Feoktistov пишет: In commit 7039bb3c we have removed code that saves uuid to vzDomObj.uuid So this field is no longer needed. --- src/vz/vz_sdk.c | 5 - src/vz/vz_utils.h | 1 - 2 files changed, 6 deletions

[libvirt] [PATCH 1/4] vz: make output arguments in prlsdkGetDomainIds as optional

2016-01-28 Thread Mikhail Feoktistov
prlsdkGetDomainIds() returns name and uuid for specified instance. Now output arguments can be NULL. It allows to get only necessary info(name or uuid). --- src/vz/vz_sdk.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/vz/vz_sdk.c b/sr

[libvirt] [PATCH 4/4] vz: fix race condition when adding domain to domains list

2016-01-28 Thread Mikhail Feoktistov
Race condition: User calls defineXML to create new instance. The main thread from vzDomainDefineXMLFlags() creates new instance by prlsdkCreateVm. Then this thread calls prlsdkAddDomain to add new domain to domains list. The second thread receives notification from hypervisor that new VM was creat

[libvirt] [PATCH 3/4] vz: fix notification subscription

2016-01-28 Thread Mikhail Feoktistov
Bug cause: Update the domain that is subscribed to hypervisor notification. LoadDomain() rewrites notifications fields in vzDomObj structure and makes domain as "unsubscribed". Fix: Initialize notification fields in vzDomObj only if we create a new domain. And do not reinitialize these fields if w

[libvirt] [PATCH 0/4 v2] vz: rework domain creation

2016-01-28 Thread Mikhail Feoktistov
domain to domains list. These two threads call virDomainObjListFindByUUID() from prlsdkAddDomain() and don't find new domain. So they add two domains with the same uuid to domains list. Mikhail Feoktistov (4): vz: make output arguments in prlsdkGetDomainIds as optional vz: remove unused s

[libvirt] [PATCH 2/4] vz: remove unused struct field

2016-01-28 Thread Mikhail Feoktistov
In commit 7039bb3c we have removed code that saves uuid to vzDomObj.uuid So this field is no longer needed. --- src/vz/vz_sdk.c | 5 - src/vz/vz_utils.h | 1 - 2 files changed, 6 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 8181149..40ab2d9 100644 --- a/src/vz/vz_sdk.c

[libvirt] [PATCH] vz: remove unused struct field

2016-01-26 Thread Mikhail Feoktistov
In commit 7039bb3c we have removed code that saves uuid to vzDomObj.uuid So this field is no longer needed. --- src/vz/vz_sdk.c | 5 - src/vz/vz_utils.h | 1 - 2 files changed, 6 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index d610979..5e4c4ac 100644 --- a/src/vz/vz_sdk.c

[libvirt] [PATCH 4/4] vz: fix notification subscription

2016-01-23 Thread Mikhail Feoktistov
Bug cause: Update the domain that is subscribed to hypervisor notification. LoadDomain() rewrites notifications fields in vzDomObj structure and makes domain as "unsubscribed". Fix: Initialize notification fields in vzDomObj only if we create a new domain. And do not reinitialize these fields if w

[libvirt] [PATCH 2/4] vz: Remove prlsdkAddDomain() and use new functions

2016-01-23 Thread Mikhail Feoktistov
Use prlsdkNewDomain() and prlsdkSetDomainInstance() instead of prlsdkAddDomain() New algorithm for creating an instance: In vzDomainDefineXMLFlags() we add new domain to domain list by calling prlsdkNewDomain() and only after that we call CreateVm() to create VM. It means that we "reserve" domain

[libvirt] [PATCH 1/4] vz: Split logic of prlsdkAddDomain() into two functions

2016-01-23 Thread Mikhail Feoktistov
Add two functions 1. prlsdkNewDomain() creates new empty domain in domains list with the specific uuid. 2. prlsdkSetDomainInstance() add data from VM to domain object. --- src/vz/vz_sdk.c | 49 + src/vz/vz_sdk.h | 8 2 files changed, 57 in

[libvirt] [PATCH 3/4] vz: remove code duplication from LoadDomain()

2016-01-23 Thread Mikhail Feoktistov
Now we create new domain by calling prlsdkNewDomain(). In LoadDomain() we just load info from vm instance to domain object. So remove code to create domain from LoadDomain(). --- src/vz/vz_sdk.c | 55 +-- 1 file changed, 17 insertions(+), 38 del

[libvirt] [PATCH 0/4] vz: rework domain creation

2016-01-23 Thread Mikhail Feoktistov
omain info we should receive and handle notification from hypervisor. Mikhail Feoktistov (4): vz: Split logic of prlsdkAddDomain() into two functions vz: Remove prlsdkAddDomain() and use new functions vz: remove code duplication from LoadDomain() vz: fix notification subscription s

Re: [libvirt] [PATCH v2] vz: implementation of domainCreateXML callback

2015-12-16 Thread Mikhail Feoktistov
It's my fault. Please, disregard this patch. Thanks to Michal. 16.12.2015 11:30, Michal Privoznik пишет: On 09.12.2015 16:48, Mikhail Feoktistov wrote: --- diff from v1. Remove call of vzDomainSuspend() in case of VIR_DOMAIN_START_PAUSED flag is set. Now we don't support

[libvirt] [PATCH 3/3 v2] vz: implementation of boot device order

2015-12-15 Thread Mikhail Feoktistov
This patch implements functionality of boot device order based on boot element from os section in XML. Now we support boot from CDROM and HDD. If we have several devices of the same type (for example hdd0 and hdd1), than we mark the first one as bootable. --- diff from v1: Move this commit to pat

[libvirt] [PATCH 1/3 v3] vz: allow to create container based on template

2015-12-15 Thread Mikhail Feoktistov
We shouldn't delete disk from default config if we create container based on template, because we don't have the new disk from XML, only template name. And don't add template section from XML as new filesystem, we use PrlVmCfg_SetOsTemplate function to set template name. Do not set PRNVM_PRESERVE_

[libvirt] [PATCH 0/3] vz: allow to create CT from template and boot VM from cdrom

2015-12-15 Thread Mikhail Feoktistov
Mikhail Feoktistov (3): vz: allow to create container based on template vz: allow to boot VM from cdrom vz: implementation of boot device order src/vz/vz_sdk.c | 174 1 file changed, 125 insertions(+), 49 deletions(-) -- 1.8.3.1

[libvirt] [PATCH 2/3 v2] vz: allow to boot VM from cdrom

2015-12-15 Thread Mikhail Feoktistov
If user creates virtual machine via virt-manager and select "boot from ISO" then in libvirt we can see the following devices section These devices don't have disk->format parameter, so we should allow to add disks with format = VIR_STORAGE_FILE_NONE.

[libvirt] [PATCH 3/3 v2] vz: implementation of boot device order

2015-12-15 Thread Mikhail Feoktistov
This patch implements functionality of boot device order based on boot element from os section in XML. Now we support boot from CDROM and HDD. If we have several devices of the same type (for example hdd0 and hdd1), than we mark the first one as bootable. --- diff from v1: Move this commit to pat

[libvirt] [PATCH 1/3 v2] vz: allow to create container based on template

2015-12-15 Thread Mikhail Feoktistov
We shouldn't delete disk from default config if we create container based on template, because we don't have the new disk from XML, only template name. And don't add template section from XML as new filesystem, we use PrlVmCfg_SetOsTemplate function to set template name. Do not set PRNVM_PRESERVE_

[libvirt] [PATCH 2/3 v2] vz: allow to boot VM from cdrom

2015-12-15 Thread Mikhail Feoktistov
If user creates virtual machine via virt-manager and select "boot from ISO" then in libvirt we can see the following devices section These devices don't have disk->format parameter, so we should allow to add disks with format = VIR_STORAGE_FILE_NONE.

[libvirt] [PATCH 0/3] vz: allow to create CT from template and boot VM from cdrom

2015-12-15 Thread Mikhail Feoktistov
Mikhail Feoktistov (3): vz: allow to create container based on template vz: allow to boot VM from cdrom vz: implementation of boot device order src/vz/vz_sdk.c | 174 1 file changed, 125 insertions(+), 49 deletions(-) -- 1.8.3.1

[libvirt] [PATCH v2] vz: implementation of domainCreateXML callback

2015-12-13 Thread Mikhail Feoktistov
--- diff from v1. Remove call of vzDomainSuspend() in case of VIR_DOMAIN_START_PAUSED flag is set. Now we don't support to create instance in stopped state. src/vz/vz_driver.c | 24 1 file changed, 24 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.

Re: [libvirt] [PATCH] vz: Allow to create container based on template

2015-12-10 Thread Mikhail Feoktistov
24.11.2015 17:14, Dmitry Guryanov пишет: On Thu, 2015-11-19 at 14:44 +0300, Mikhail Feoktistov wrote: We shouldn't delete disk from default config if we create container based on template, because we don't have the new disk from XML, only template name. And don't add template s

[libvirt] [PATCH] vz: implementation of boot device order

2015-11-23 Thread Mikhail Feoktistov
This patch implements functionality of boot device order based on boot element from os section in XML. Now we support boot from CDROM and HDD. If we have several devices of the same type (for example hdd0 and hdd1), than we mark the first one as bootable. --- src/vz/vz_sdk.c | 111

[libvirt] [PATCH] vz: implementation of domainCreateXML callback

2015-11-20 Thread Mikhail Feoktistov
--- src/vz/vz_driver.c | 33 + 1 file changed, 33 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 39f58a4..31dfb6a 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -979,6 +979,38 @@ vzDomainUndefine(virDomainPtr domain) retu

[libvirt] [PATCH] vz: allow to boot VM from cdrom

2015-11-20 Thread Mikhail Feoktistov
--- src/vz/vz_sdk.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 750133d..9bdf7aa9a 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -2023,8 +2023,9 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDo

[libvirt] [PATCH v2] add func to set shared drivers after libvirtd init

2015-11-19 Thread Mikhail Feoktistov
Diff from v1: Remove vz prefix from the title of this letter. Because this is the common case for all drivers in libvirt. Description: Built-in drivers in libvirt are initialized before libvirtd initialization. Libvirt loads shared drivers on libvirtd initialization step. For built-in drivers we c

[libvirt] [PATCH v2] vz: implementation of domainReboot callback

2015-11-19 Thread Mikhail Feoktistov
Diff from v1. 1. Add virCheckFlags() call in vzDomainReboot --- src/vz/vz_driver.c | 8 src/vz/vz_sdk.c| 8 src/vz/vz_sdk.h| 1 + 3 files changed, 17 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 0a968b9..39f58a4 100644 --- a/src/vz/vz_driver.

[libvirt] [PATCH] vz: Allow to create container based on template

2015-11-19 Thread Mikhail Feoktistov
We shouldn't delete disk from default config if we create container based on template, because we don't have the new disk from XML, only template name. And don't add template section from XML as new filesystem, we use PrlVmCfg_SetOsTemplate function to set template name. --- src/vz/vz_sdk.c | 33

[libvirt] [PATCH] vz: implementation of domainReboot callback

2015-11-18 Thread Mikhail Feoktistov
--- src/vz/vz_driver.c | 8 src/vz/vz_sdk.c| 8 src/vz/vz_sdk.h| 1 + 3 files changed, 17 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 0a968b9..5f56eaf 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -923,6 +923,13 @@ static int vz

[libvirt] [PATCH] vz: allow only en-us keymap for VNC

2015-11-18 Thread Mikhail Feoktistov
In virtuozzo we support only en-us keymap for VMs and containers. If keymap is specified than check that it's en-us, otherwise show error message. --- src/vz/vz_sdk.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 89c9e89..526c0f2

[libvirt] [PATCH] vz: add func to set shared drivers after libvirtd init

2015-10-22 Thread Mikhail Feoktistov
Built-in drivers in libvirt are initialized before libvirtd initialization. Libvirt loads shared drivers on libvirtd initialization step. For built-in drivers we can't set shared drivers, because they are not initialized yet. This patch adds function to set shared drivers after libvirtd init. ---

Re: [libvirt] [PATCH] vz: assign static IPs and default gateways for network adapter

2015-07-07 Thread Mikhail Feoktistov
send v2 06.07.2015 21:28, Dmitry Guryanov пишет: On 07/01/2015 01:15 PM, Mikhail Feoktistov wrote: We support only one IPv4 and one IPv6 default gateway. If static IPs are not present in instance config, then we switch on DHCP for this adapter. PrlVmDevNet_SetAutoApply to makes necessary

[libvirt] [PATCH v2 1/1] vz: assign static IPs and default gateways for network adapter

2015-07-07 Thread Mikhail Feoktistov
We support only one IPv4 and one IPv6 default gateway. If static IPs are not present in instance config, then we switch on DHCP for this adapter. PrlVmDevNet_SetAutoApply to makes necessary settings within guest OS In linux case it creates network startup scripts /etc/sysconfig/network-scripts/ifcf

[libvirt] [PATCH v2 0/1] vz: assign static IPs and default gateways for network adapter

2015-07-07 Thread Mikhail Feoktistov
fix "avoid_if_before_free" warnings for VIR_FREE calls fix "found diagnostic without %" warnings for virReportError calls use virAsprintf instead of virBufferAsprintf set default gateway only if static ip is present write inet family to log in case of unsupported gateway M

[libvirt] [PATCH] vz: assign static IPs and default gateways for network adapter

2015-07-01 Thread Mikhail Feoktistov
We support only one IPv4 and one IPv6 default gateway. If static IPs are not present in instance config, then we switch on DHCP for this adapter. PrlVmDevNet_SetAutoApply to makes necessary settings within guest OS In linux case it creates network startup scripts /etc/sysconfig/network-scripts/ifcf

[libvirt] [PATCH v2 1/1] vz: Fix error messages in libvirt log caused by unhadled events

2015-06-23 Thread Mikhail Feoktistov
If the configuration of the instance has been modified, for example added disk or network device, then hypervisor sends event with prlIssuerType = PIE_DISPATCHER and EventType = PET_DSP_EVT_VM_CONFIG_CHANGED We should handle this event in prlsdkHandleVmEvent function to update instance's XML con

[libvirt] [PATCH v2 0/1] vz: Fix error messages in libvirt log caused by unhadled events

2015-06-23 Thread Mikhail Feoktistov
Changes from v1 Rebase patch Mikhail Feoktistov (1): vz: Fix error messages in libvirt log caused by unhadled events -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v2] vz: implementation of attach/detach network devices

2015-06-22 Thread Mikhail Feoktistov
In this patch we add VIR_DOMAIN_DEVICE_NET handlers implementation for domainAttachDevice and domainDetachDevice callbacks. As soon as we don't support this operation for hypervisor type domains, we implement this functionality for containers only. In detach procedure we find network device by MA

[libvirt] [PATCH v2] vz: implementation of attach/detach network devices

2015-06-22 Thread Mikhail Feoktistov
Changes from v1 Remove "cleanup" label and "goto" operator from prlsdkAttachNet() and prlsdkDetachNet() Replace it with "return" operator. Rename netMac variable to expectedMac in prlsdkGetNetIndex() Move prlsdkGetNetIndex() call after PrlVm_BeginEdit call in prlsdkD

  1   2   >