- 18 5月, 2016 1 次提交
-
-
由 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>
-
- 13 4月, 2016 4 次提交
-
-
由 Maxim Nestratov 提交于
We don't need them anymore as all pointers within vzDriver structure are not changed during the time it exists. Where we still need to synchronize we use virObjectLock/Unlock as far as vzDriver is lockable object. Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Maxim Nestratov 提交于
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>
-
由 Maxim Nestratov 提交于
No need to remember connection name and have corresponding domain type to keep backward compatibility with former 'parallels' driver. It is enough to be able to accept 'parallels' uri and domain types. Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
- 17 3月, 2016 5 次提交
-
-
由 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.
-
由 Mikhail Feoktistov 提交于
Because Vz6 supports SCSI(BUSLOGIC), IDE and SATA controllers only and Vz7 supports SCSI(VIRTIO_SCSI) and IDE only we add list of supported controllers and scsi models to vzCapabilities structure. When a new connection opens, we select proper capabilities values according to Virtuozzo version and check them in XMLPostParse. Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Mikhail Feoktistov 提交于
Now we check disk parameters correctness in DomainPostParse. Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Mikhail Feoktistov 提交于
As far as Virtuozzo6 and Virtuozzo7 support different disk types for virtual machines (ploop and qcow2 respectively) and different buses (vz6: IDE, SCSI, SATA; vz7: IDE SCSI) we add vzCapabilities structure to help undestand which disk formats and buses are supported in the context of a current connection. When a new connection opens, we select proper capabilities in accordance to current Virtuozzo version.
-
由 Mikhail Feoktistov 提交于
Move code from connectGetVersion callback to vzInitVersion function
-
- 01 3月, 2016 1 次提交
-
-
由 Nikolay Shirokovskiy 提交于
Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
- 12 2月, 2016 2 次提交
-
-
由 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 created. It calls prlsdkHandleVmAddedEvent() and also tries to add new 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. This fix splits logic of prlsdkAddDomain() into two functions. 1. vzNewDomain() creates new empty domain in domains list with the specific uuid. 2. prlsdkLoadDomain() add data from VM to domain object. New algorithm for creating an instance: In vzDomainDefineXMLFlags() we add new domain to domain list by calling vzNewDomain() and only after that we call CreateVm() to create VM. It means that we "reserve" domain object with the specific uuid. After creation of new VM we add info from this VM to reserved domain object by calling prlsdkLoadDomain(). Before this patch prlsdkLoadDomain() worked in 2 different cases: 1. It creates and initializes new domain. Then updates it from sdk handle. 2. It updates existed domain from sdk handle. In this patch we remove code which creates new domain from LoadDomain() and move it to vzNewDomain(). Now prlsdkLoadDomain() only updates domain from skd handle. In notification handler prlsdkHandleVmAddedEvent() we check the existence of a domain and if it doesn't exist we add new domain by calling vzNewDomain() and load info from sdk handle via prlsdkLoadDomain().
-
由 Mikhail Feoktistov 提交于
In commit 7039bb3c we have removed code that saves uuid to vzDomObj.uuid So this field is no longer needed.
-
- 30 11月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
Our domain_conf.* files are big enough. Not only they contain XML parsing code, but they served as a storage of all functions whose name is virDomain prefixed. This is just wrong as it gathers not related functions (and modules) into one big file which is then harder to maintain. Split virDomainObjList module into a separate file called virdomainobjlist.[ch]. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 08 10月, 2015 1 次提交
-
-
由 Maxim Nestratov 提交于
Remove unused definitions, functions and structure fields. Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
- 06 10月, 2015 2 次提交
-
-
由 Maxim Nestratov 提交于
In fact, it was never used as far as vz has no features supporting it. That is why there will be no harm to anyone if we just remove this code to prevent further misunderstanding and efforts to support dead code. Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
由 Maxim Nestratov 提交于
At the time this code was added we had intentions to support libvirt interface to manage vz networks. In fact, it was never implemented completely to work correctly that makes me think that there will be no harm to anyone if we just rip it off. Moreover, in vz7 we started to use libvirt bridge network driver to manage networks. Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
- 26 6月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
Honour our formatting style. Adjust indentation so it matches the rest of our code. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 17 6月, 2015 2 次提交
-
-
由 Maxim Nestratov 提交于
This patch moves all src/parallels/parallels* files to vz/vz* and fixes build accordingly. No functional changes. Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
由 Maxim Nestratov 提交于
This patch changes all parallels/vz driver structure and function prefixes from parallels to vz. No functional changes. Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
- 09 6月, 2015 2 次提交
-
-
由 Dmitry Guryanov 提交于
This patch fixes several formatting errors, which I missed before pushing previous patches. Mostly because of missing cppi package.
-
由 Nikolay Shirokovskiy 提交于
Statistics provided through PCS SDK. As we have only async interface in SDK we need to be subscribed to statistics in order to get it. Trivial solution on every stat request to subscribe, wait event and then unsubscribe will lead to significant delays in case of a number of successive requests, as the event will be delivered on next PCS server notify cycle. On the other hand we don't want to keep unnesessary subscribtion. So we take an hibrid solution to subcsribe on first request and then keep a subscription while requests are active. We populate cache of statistics on subscribtion events and use this cache to serve libvirts requests. * Cache details. Cache is just handle to last arrived event, we call this cache as if this handle is valid it is used to serve synchronous statistics requests. We use number of successive events count to detect that user lost interest to statistics. We reset this count to 0 on every request. If more than PARALLELS_STATISTICS_DROP_COUNT successive events arrive we unsubscribe. Special value of -1 of this counter is used to differentiate between subscribed/unsubscribed state to protect from delayed events. Values of PARALLELS_STATISTICS_DROP_COUNT and PARALLELS_STATISTICS_TIMEOUT are just drop-ins, choosen without special consideration. * Thread safety issues Use parallelsDomObjFromDomainRef in parallelsDomainBlockStats as we could wait on domain lock down on stack in prlsdkGetStatsParam and if we won't keep reference we could get dangling pointer on return from wait. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@parallels.com>
-
- 03 6月, 2015 1 次提交
-
-
由 Maxim Nestratov 提交于
We remember driver name in a new field 'drivername' within private parallels connection structure. When a new domain is defined we use this name to set corresponding virtType. We set VIR_DOMAIN_VIRT_VZ for 'vz' driver and VIR_DOMAIN_VIRT_PARALLELS for 'Parallels'. Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
- 13 5月, 2015 1 次提交
-
-
由 Nikolay Shirokovskiy 提交于
We have a lot of passing arguments code just to pass connection object cause it holds jobTimeout. Taking into account that right now this value is defined at compile time let's just get rid of it and make arguments list more clear in many places. In case we later need some runtime configurable timeout value we can provide this value through arguments function already operate such as a parallels domain object etc as this timeouts are operation( and thus object) specific in practice. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@parallels.com>
-
- 23 4月, 2015 3 次提交
-
-
由 Maxim Nestratov 提交于
CT stands for containers, i.e. def->os.type should be compared with VIR_DOMAIN_OSTYPE_EXE rather than VIR_DOMAIN_OSTYPE_HVM Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
由 Michal Privoznik 提交于
This function is practically copied over from qemu driver. Its only purpose in life is to lookup a domain object and print an error if no object is found. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The pointer does not change throughout the while life of a parallels connection. Mark it as such. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 21 4月, 2015 1 次提交
-
-
由 Cole Robinson 提交于
-
- 19 3月, 2015 1 次提交
-
-
由 Maxim Nestratov 提交于
Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
- 11 3月, 2015 1 次提交
-
-
由 Maxim Nestratov 提交于
Signed-off-by: NMaxim Nestratov <mnestratov@parallels.com>
-
- 04 3月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
In order to hide the object internals (and use just accessors everywhere), lets store a pointer to the object, instead of object itself. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 27 1月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
For stateless, client side drivers, it is never correct to probe for secondary drivers. It is only ever appropriate to use the secondary driver that is associated with the hypervisor in question. As a result the ESX & HyperV drivers have both been forced to do hacks where they register no-op drivers for the ones they don't implement. For stateful, server side drivers, we always just want to use the same built-in shared driver. The exception is virtualbox which is really a stateless driver and so wants to use its own server side secondary drivers. To deal with this virtualbox has to be built as 3 separate loadable modules to allow registration to work in the right order. This can all be simplified by introducing a new struct recording the precise set of secondary drivers each hypervisor driver wants struct _virConnectDriver { virHypervisorDriverPtr hypervisorDriver; virInterfaceDriverPtr interfaceDriver; virNetworkDriverPtr networkDriver; virNodeDeviceDriverPtr nodeDeviceDriver; virNWFilterDriverPtr nwfilterDriver; virSecretDriverPtr secretDriver; virStorageDriverPtr storageDriver; }; Instead of registering the hypervisor driver, we now just register a virConnectDriver instead. This allows us to remove all probing of secondary drivers. Once we have chosen the primary driver, we immediately know the correct secondary drivers to use. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 12月, 2014 3 次提交
-
-
由 Dmitry Guryanov 提交于
Move macro parallelsDomNotFoundError to file parallels_utils.h, because it will be used in parallels_sdk.c. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Alexander Burluka 提交于
Obtain information about domains using parallels sdk instead of prlctl. prlsdkLoadDomains functions behaves as former parallelsLoadDomains with NULL as second parameter (name) - it fills parallelsConn.domains list. prlsdkLoadDomain is now able to update specified domain by given virDomainObjPtr. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
由 Dmitry Guryanov 提交于
This macro will be used in paralles_sdk.c so move it to common header. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
- 07 11月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
Since the secondary drivers are only active when the primary driver is also the Parallels driver, there is no need to use the different type specific privateData fields. The object that was being stored in the storagePrivateData can easily be kept in the parallelsConn struct instead.
-
- 25 9月, 2014 1 次提交
-
-
由 Dmitry Guryanov 提交于
Add files parallels_sdk.c and parallels_sdk.h for code which works with SDK, so libvirt's code will not mix with dealing with parallels SDK. To use Parallels SDK you must first call PrlApi_InitEx function, and then you will be able to connect to a server with PrlSrv_LoginLocalEx function. When you've done you must call PrlApi_Deinit. So let's call PrlApi_InitEx on first .connectOpen, count number of connections and deinitialize, when this counter becomes zero. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
- 06 6月, 2014 1 次提交
-
-
由 Alexander Burluka 提交于
OpenStack Nova requires this function to start VM instance. Cpumask info is obtained via prlctl utility. Unlike KVM, Parallels Cloud Server is unable to set cpu affinity mask for every VCpu. Mask is unique for all VCpu. You can set it using 'prlctl set <vm_id|vm_name> --cpumask <{n[,n,n1-n2]|all}>' command. For example, 'prlctl set SomeDomain --cpumask 0,1,5-7' would set this mask to yy---yyy. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 10 12月, 2013 1 次提交
-
-
由 Cédric Bosdonnat 提交于
Leave virDomainEventRegister and its Deregister brother as these are legacy functions only for domain lifecycle events.
-
- 24 4月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Ensure that all drivers implementing public APIs use a naming convention for their implementation that matches the public API name. eg for the public API virDomainCreate make sure QEMU uses qemuDomainCreate and not qemuDomainStart Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-