mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
Add support for QEMU migration to use SASL authentication
This commit provides the ability to virDomainMigrateToURI to check for SASL credentials when attempts to migrate a domain with the driver QEMU. Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
This commit is contained in:
parent
e8eb5146de
commit
f393c4603a
@ -4020,6 +4020,18 @@ doPeer2PeerMigrate3(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int virConnectCredType[] = {
|
||||||
|
VIR_CRED_AUTHNAME,
|
||||||
|
VIR_CRED_PASSPHRASE,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static virConnectAuth virConnectAuthConfig = {
|
||||||
|
.credtype = virConnectCredType,
|
||||||
|
.ncredtype = ARRAY_CARDINALITY(virConnectCredType),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
|
static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
|
||||||
virConnectPtr sconn,
|
virConnectPtr sconn,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
@ -4053,7 +4065,7 @@ static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
qemuDomainObjEnterRemote(vm);
|
qemuDomainObjEnterRemote(vm);
|
||||||
dconn = virConnectOpen(dconnuri);
|
dconn = virConnectOpenAuth(dconnuri, &virConnectAuthConfig, 0);
|
||||||
qemuDomainObjExitRemote(vm);
|
qemuDomainObjExitRemote(vm);
|
||||||
if (dconn == NULL) {
|
if (dconn == NULL) {
|
||||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user