mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
bhyve: add 'driver' to bhyveProcessStart method
This allows for passinga NULL connection object in cases where domain autodestroy is not required. Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
2626fa0569
commit
2eb1de2a16
@ -79,7 +79,7 @@ bhyveAutostartDomain(virDomainObj *vm, void *opaque)
|
||||
|
||||
if (vm->autostart && !virDomainObjIsActive(vm)) {
|
||||
virResetLastError();
|
||||
ret = virBhyveProcessStart(data->conn, vm,
|
||||
ret = virBhyveProcessStart(data->driver, data->conn, vm,
|
||||
VIR_DOMAIN_RUNNING_BOOTED, 0);
|
||||
if (ret < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
@ -834,7 +834,7 @@ bhyveDomainCreateWithFlags(virDomainPtr dom,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = virBhyveProcessStart(dom->conn, vm,
|
||||
ret = virBhyveProcessStart(privconn, dom->conn, vm,
|
||||
VIR_DOMAIN_RUNNING_BOOTED,
|
||||
start_flags);
|
||||
|
||||
@ -892,7 +892,7 @@ bhyveDomainCreateXML(virConnectPtr conn,
|
||||
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, NULL)))
|
||||
goto cleanup;
|
||||
|
||||
if (virBhyveProcessStart(conn, vm,
|
||||
if (virBhyveProcessStart(privconn, conn, vm,
|
||||
VIR_DOMAIN_RUNNING_BOOTED,
|
||||
start_flags) < 0) {
|
||||
/* If domain is not persistent, remove its data */
|
||||
|
@ -270,13 +270,12 @@ bhyveProcessPrepareDomain(bhyveConn *driver,
|
||||
}
|
||||
|
||||
int
|
||||
virBhyveProcessStart(virConnectPtr conn,
|
||||
virBhyveProcessStart(bhyveConn *driver,
|
||||
virConnectPtr conn,
|
||||
virDomainObj *vm,
|
||||
virDomainRunningReason reason,
|
||||
unsigned int flags)
|
||||
{
|
||||
struct _bhyveConn *driver = conn->privateData;
|
||||
|
||||
/* Run an early hook to setup missing devices. */
|
||||
if (bhyveProcessStartHook(driver, vm, VIR_HOOK_BHYVE_OP_PREPARE) < 0)
|
||||
return -1;
|
||||
|
@ -28,7 +28,8 @@ bhyveProcessPrepareDomain(bhyveConn *driver,
|
||||
virDomainObj *vm,
|
||||
unsigned int flags);
|
||||
|
||||
int virBhyveProcessStart(virConnect *conn,
|
||||
int virBhyveProcessStart(bhyveConn *driver,
|
||||
virConnectPtr conn,
|
||||
virDomainObj *vm,
|
||||
virDomainRunningReason reason,
|
||||
unsigned int flags);
|
||||
|
Loading…
x
Reference in New Issue
Block a user