mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +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,
|
||||
virConnectPtr sconn,
|
||||
virDomainObjPtr vm,
|
||||
@ -4053,7 +4065,7 @@ static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
|
||||
*/
|
||||
|
||||
qemuDomainObjEnterRemote(vm);
|
||||
dconn = virConnectOpen(dconnuri);
|
||||
dconn = virConnectOpenAuth(dconnuri, &virConnectAuthConfig, 0);
|
||||
qemuDomainObjExitRemote(vm);
|
||||
if (dconn == NULL) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
|
Loading…
x
Reference in New Issue
Block a user