- 17 6月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
-
- 15 6月, 2016 2 次提交
-
-
由 Nikolay Shirokovskiy 提交于
Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Ján Tomko 提交于
To allow tightening syntax check.
-
- 11 6月, 2016 6 次提交
-
-
由 Maxim Nestratov 提交于
As it turned out PrlVmDev_GetStackIndex can return negative values without reporting an error, which is incorrect but nevertheless. After that we feed this negative index to virIndexToDiskName, which in turn returns NULL and we set it to virDomainDiskDef.dst. Using virDiskNameToBusDeviceIndex with a virDomainDiskDef structure which has NULL dst field crashes. Fix this by returning an error in prlsdkGetDiskId in such cases. Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Mikhail Feoktistov 提交于
-
由 Maxim Nestratov 提交于
Map PRL_ERR_UNIMPLEMENTED to VIR_ERR_OPERATION_INVALID Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Maxim Nestratov 提交于
Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
The approach of subscribing on first stat API call and then waiting for receiving of performance event from sdk to process the call originates in times when every vz libvirt connections spawns its own sdk connection. Thus without this waiting virsh stat call would return empty stats. Now with single sdk connection this scheme is unnecessary complicated. This patch subscribes to performance events on first domain appearence and unsubscribe on its removing. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Maxim Nestratov 提交于
After eaf18f4c some functions changed their homes Pushed under build breaking rule
-
- 10 6月, 2016 2 次提交
-
-
由 Daniel P. Berrange 提交于
In preparation for moving all the CPU related APIs out of the nodeinfo file, give them a virHostCPU name prefix. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Nearly all the methods in the nodeinfo file are given a 'const char *sysfs_prefix' parameter to override the default sysfs path (/sys/devices/system). Every single caller passes in NULL for this, except one use in the unit tests. Furthermore this parameter is totally Linux-specific, when the APIs are intended to be cross platform portable. This removes the sysfs_prefix parameter and instead gives a new method linuxNodeInfoSetSysFSSystemPath for use by the test suite. For two of the methods this hardcodes use of the constant SYSFS_SYSTEM_PATH, since the test suite does not need to override the path for thos methods. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 09 6月, 2016 1 次提交
-
-
由 Pavel Hrdina 提交于
VNC graphics already supports sockets but only via 'socket' attribute. This patch coverts that attribute into listen type 'socket'. For backward compatibility we need to handle listen type 'socket' and 'socket' attribute properly to support old XMLs and new XMLs. If both are provided they have to match, if only one of them is provided we need to be able to parse that configuration too. To not break migration back to old libvirt if the socket is provided by user we need to generate migratable XML without the listen element and use only 'socket' attribute. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 24 5月, 2016 1 次提交
-
-
由 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
-
- 20 5月, 2016 1 次提交
-
-
由 Pavel Hrdina 提交于
We have both in the code. Let's use only one format. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 19 5月, 2016 3 次提交
-
-
由 Nikolay Shirokovskiy 提交于
vz puts uuids into curly braces. Simply introduce new contstant to reflect this and get rid of magic +2 in code. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
The newest version of migration protocol - version 3 with parameters is implemented. Supported flags is VIR_MIGRATE_PAUSED only. Supported parameters are VIR_MIGRATE_PARAM_URI and VIR_MIGRATE_PARAM_DEST_NAME. VIR_MIGRATE_PARAM_DEST_XML is in VZ_MIGRATION_PARAMETERS for technical onyl reasons. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
This session uuid acts as authN token for different multihost vz operations one of which is migration. Unfortunately we can't get it from server at any time thus we need to save it at login. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
- 18 5月, 2016 2 次提交
-
-
由 Nikolay Shirokovskiy 提交于
Let's use introduced domain snapshots infrastructure instead. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
This solution does not keep snapshots cache because vz sdk lacks good support for snapshot related events. Libvirt and vz sdk has different approach to snapshot ids. vz sdk always auto generate them while libvirt has ability to specify id by user. Thus I have no other choice rather than simply ignore ids set by user or generated by libvirt. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
- 17 5月, 2016 5 次提交
-
-
由 Maxim Nestratov 提交于
This reverts commit 071fe092. It was committed by a mistake and correct patch was committed earlier as baad90fb.
-
由 Nikolay Shirokovskiy 提交于
Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Mikhail Feoktistov 提交于
First we don't need to add disk in this case. Second flag should be skipped. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Mikhail Feoktistov 提交于
SDK handles empty cdroms all right. We just need to pass "" instead of NULL (not setting is good too). However we can get problems here. Disk detaching treats source as ids. Fortunately disk detaching is not supported for cdroms yet and for hard disks we can not get empty source - this is prohibitited by xml parsing code. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
- 30 4月, 2016 1 次提交
-
-
由 Yuri Chornoivan 提交于
Signed-off-by: NYuri Chornoivan <yurchor@ukr.net>
-
- 29 4月, 2016 1 次提交
-
-
由 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 always use zero index.
-
- 20 4月, 2016 6 次提交
-
-
由 Nikolay Shirokovskiy 提交于
We don't have input devices in SDK thus for define/dumpxml operations to be consistent we need to: 1. on dumpxml: infer input devices from other parts of config. It is already done in prlsdkLoadDomain. 2. on define: check that input devices are the same that will be infer back on dumpxml operation. The second part should be fixed. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Mikhail Feoktistov 提交于
libvirt handles empty source as NULL, while vz sdk as "" thus we need a bit of conversion. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
-
由 Nikolay Shirokovskiy 提交于
Current implementation does not detect all incompatible configurations. For example if we have in vzsdk bootorder "cdrom1, cdrom0" (that is "hdb, hda" in case of ide cdroms) and cdroms do not have disk images inserted. In this case boot order check code fails to distiguish them at all as for both PrlVmDev_GetFriendlyName gives "". Well the consequences are only missing warnings but as we just have introduced all the necessary tools to face the problem - let's fix it. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
Actually using disk PrlVmDev_GetFriendlyName as id on detaching volumes is not a problem. We can only detach hard disks and these can not have empty friendly names. But upcoming update device functionality for cdroms can not use disk source as id at all as update operation typically change this same source value. Thus we will need to use cdrom bus and cdrom target name as cdrom id. So in attempt to use same id scheme for all purpuses lets fix hard disk detach function to use new id. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
Our intention is to use disk bus and disk target name pair as disk id instead of name returned by PrlVmDev_GetFriendlyName. We already have the code that extracts this pair from vzsdk data. Let's factor it out into a function. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
- 14 4月, 2016 1 次提交
-
-
由 Nikolay Shirokovskiy 提交于
SDK does not allocate memory when getting strings thus we need to call every function that returns string twice. First to obtain string length, second to obtain string itself. It is tedious so let's create helper functions for cases when we know length of the result beforehand and we are not. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
- 13 4月, 2016 4 次提交
-
-
由 Maxim Nestratov 提交于
Lock driver when a new domain is created in prlsdkNewDomainByHandle and try to find it in the list under lock again because it can race with vzDomainDefineXMLFlags when a domain with the same uuid is added via vz dispatcher directly and libvirt define. Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Maxim Nestratov 提交于
This patch introduces a new 'vzDriver' lockable object and provides helper functions to allocate/destroy it and we pass it to prlsdkXxx functions instead of virConnectPtr. Now we store domain related objects such as domain list, capabitilies etc. within a single vz_driver vzDriver structure, which is shared by all driver connections. It is allocated during daemon initialization or in a lazy manner when a new connection to 'vz' driver is established. When a connection to vz daemon drops, vzDestroyConnection is called, which in turn relays disconnect event to all connection to 'vz' driver. Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Pavel Hrdina 提交于
GCC in RHEL-6 complains about listen: ../../src/conf/domain_conf.c:23718: error: declaration of 'listen' shadows a global declaration [-Wshadow] /usr/include/sys/socket.h:204: error: shadowed declaration is here [-Wshadow] This renames all the listen to gListen. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
There is no point the use two different getters on the same listen structure few lines apart. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 12 4月, 2016 2 次提交
-
-
由 Nikolay Shirokovskiy 提交于
we don't need to allocate macstr at all as it is an array and already has the the space it needs. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Nikolay Shirokovskiy 提交于
Quite straigthforward as vz sdk memory setting function makes just what we want to that is set "amount of physical memory allocated to a domain". 'useflags' is introduced for non flag function implementation. We can't just use combination of flags like "live | config" or we fail for inactive domains. Other combinations have drawbacks too. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
- 07 4月, 2016 1 次提交
-
-
由 Nikolay Shirokovskiy 提交于
As usual we try to deal correctly with vz domains that were created by other means and thus can have all range of SDK domain parameters. If vz domain boot order can't be represented in libvirt os boot section let's give warning and make os boot section represent SDK to some extent. 1. Os boot section supports up to 4 boot devices. Here we just cut SDK boot order up to this limit. Not too bad. 2. If there is a floppy in boot order let's just skip it. Anyway we don't show it in the xml. Not too bad too. 3. SDK boot order with unsupported disks order. Say we have "hdb, hda" in SDK. We can not present this thru os boot order. Well let's just give warning but leave double <boot dev='hd'/> in xml. It's kind of misleading but we warn you! SDK boot order have an extra parameters 'inUse' and 'sequenceIndex' which makes our task more complicated. In realitly however 'inUse' is always on and 'sequenceIndex' is not less than 'boot position index' which simplifies out task back again! To be on a safe side let's explicitly check for this conditions! We have another exercise here. We want to check for unrepresentable condition 3 (see above). The tricky part is that in contrast to domains defined thru this driver 3-rd party defined domains can have device ordering different from default. Thus we need some id to check that N-th boot disk of os boot section is same as N-th boot disk of SDK boot. This is what prlsdkBootOrderCheck for. It uses disks sources paths as id for disks and iface names for network devices. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-