[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 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] 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 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 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

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] 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. ---

[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: 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 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 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 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] 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] 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: 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

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 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.

[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 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 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 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 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 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

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 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

[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 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 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 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 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 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

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

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 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 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 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 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 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 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 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 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

[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

[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 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 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 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 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

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 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

[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 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 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 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 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] 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

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 2/3] parallels: Use IS_CT() macro instead of STREQ("exe")

2015-02-17 Thread Mikhail Feoktistov
--- src/parallels/parallels_sdk.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index 3bb2ce8..8660259 100644 --- a/src/parallels/parallels_sdk.c +++ b/src/parallels/parallels_sdk.c @@ -1865,8 +1865,8

[libvirt] [PATCH 3/3] parallels: Set the first HDD from XML as bootable

2015-02-17 Thread Mikhail Feoktistov
1. Delete all boot devices for VM instance 2. Find the first HDD from XML and set it as bootable Now we support only one boot device and it should be HDD --- src/parallels/parallels_sdk.c | 95 +++-- 1 files changed, 91 insertions(+), 4 deletions(-) diff --g

[libvirt] [PATCH 1/3] parallels: code aligment

2015-02-17 Thread Mikhail Feoktistov
--- src/parallels/parallels_sdk.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index d0d2ce2..3bb2ce8 100644 --- a/src/parallels/parallels_sdk.c +++ b/src/parallels/parallels_sdk.c @@ -2804,23

[libvirt] [PATCH] parallels: implement attach/detach network.

2015-06-04 Thread Mikhail Feoktistov
Support nova commands interface-attach and interface-detach. For containers only. --- src/parallels/parallels_driver.c | 16 src/parallels/parallels_sdk.c| 144 +- src/parallels/parallels_sdk.h|4 + 3 files changed, 161 insertions(+), 3 delet

[libvirt] [PATCH] parallels: implement attach/detach network.

2015-06-11 Thread Mikhail Feoktistov
Support nova commands interface-attach and interface-detach. For containers only. I use memcmp() to compare MAC addresses, because PrlVmDevNet_GetMacAddress() returns MAC as a UTF-8 encoded, null-terminated string. --- src/parallels/parallels_driver.c | 16 src/parallels/parallels_sdk.c

[libvirt] [PATCH 3/4] parallels: Switch on DHCP for newly created network adapters

2015-06-15 Thread Mikhail Feoktistov
Let network adapter use DHCP server to get network configuration. To do this we use PrlVmDevNet_SetConfigureWithDhcp to enable it and PrlVmDevNet_SetAutoApply to makes necessary settings within guest OS In linux case it creates network startup scripts /etc/sysconfig/network-scripts/ifcfg-ethN and f

[libvirt] [PATCH 4/4] parallels: implementation of attach/detach network devices

2015-06-15 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 2/4] parallels: Fix false error messages in libvirt log

2015-06-15 Thread Mikhail Feoktistov
There was many errors in libvirt.log caused by prlsdkDelNet function because job variable was always initialized as PRL_INVALID_HANDLE In this patch job variable gets return value of PrlSrv_DeleteVirtualNetwork function() --- src/parallels/parallels_sdk.c |2 +- 1 files changed, 1 insertions(

[libvirt] [PATCH 1/4] parallels: Fix initialization of buflen variable in each loop iteration

2015-06-15 Thread Mikhail Feoktistov
We need to initialize buflen every time when we get network adapter's friendly name because we call PrlVmDev_GetFriendlyName in a loop --- src/parallels/parallels_sdk.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_

[libvirt] [PATCH 0/4] parallels: Implementation of attach/detach network devices and small network fixes

2015-06-15 Thread Mikhail Feoktistov
Mikhail Feoktistov (4): parallels: Fix initialization of buflen variable in each loop iteration parallels: Fix false error messages in libvirt log parallels: Switch on DHCP for newly created network adapters parallels: implementation of attach/detach network devices -- libvir-list

[libvirt] [PATCH 3/4] parallels: Switch on DHCP for newly created network adapters

2015-06-17 Thread Mikhail Feoktistov
Let network adapter use DHCP server to get network configuration. To do this we use PrlVmDevNet_SetConfigureWithDhcp to enable it and PrlVmDevNet_SetAutoApply to makes necessary settings within guest OS In linux case it creates network startup scripts /etc/sysconfig/network-scripts/ifcfg-ethN and f

[libvirt] [PATCH 4/4] parallels: implementation of attach/detach network devices

2015-06-17 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 0/4] parallels: Implementation of attach/detach network devices and small network fixes

2015-06-17 Thread Mikhail Feoktistov
Mikhail Feoktistov (4): parallels: Fix initialization of buflen variable in each loop iteration parallels: Fix false error messages in libvirt log parallels: Switch on DHCP for newly created network adapters parallels: implementation of attach/detach network devices -- libvir-list

[libvirt] [PATCH 1/4] parallels: Fix initialization of buflen variable in each loop iteration

2015-06-17 Thread Mikhail Feoktistov
We need to initialize buflen every time when we get network adapter's friendly name because we call PrlVmDev_GetFriendlyName in a loop --- src/vz/vz_sdk.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index f9cde44..c36dad6 100644 --- a/

[libvirt] [PATCH 2/4] parallels: Fix false error messages in libvirt log

2015-06-17 Thread Mikhail Feoktistov
There was many errors in libvirt.log caused by prlsdkDelNet function because job variable was always initialized as PRL_INVALID_HANDLE In this patch job variable gets return value of PrlSrv_DeleteVirtualNetwork function() --- src/vz/vz_sdk.c |2 +- 1 files changed, 1 insertions(+), 1 deletion

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

2015-06-22 Thread Mikhail Feoktistov
We need to handle events with PIE_DISPATCHER type. Do not write error messages to log in case of unhandled event types. --- src/parallels/parallels_sdk.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index

Re: [libvirt] [PATCH] vz: Fix error messages in libvirt log caused by unhadled events

2015-06-22 Thread Mikhail Feoktistov
22.06.2015 14:22, Maxim Nestratov пишет: 22.06.2015 14:15, Mikhail Feoktistov пишет: We need to handle events with PIE_DISPATCHER type. Could you please shed some more light on why we need this. I guess it fixes some problem, so more explanation could be useful. If the configuration of the

[libvirt] [PATCH v2] parallels: 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 prlsdkDetachNet() function. Patch

[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

[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

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

[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

[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

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: 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

[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: 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 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 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] 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

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 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 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

  1   2   >