[libvirt] PATCH: Support VNC password for QEMU guests
Guido Günther
agx at sigxcpu.org
Wed Jan 21 00:04:42 UTC 2009
On Tue, Jan 20, 2009 at 11:08:56PM +0000, Daniel P. Berrange wrote:
[..snip..]
> +static int
> +qemudInitPasswords(virConnectPtr conn,
> + virDomainObjPtr vm) {
> + char *info = NULL;
> +
> + /*
> + * NB: Might have more passwords to set in the future. eg a qcow
> + * disk decryption password, but there's no monitor command
> + * for that yet...
> + */
> +
> + if (vm->def->graphics &&
> + vm->def->graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
> + vm->def->graphics->data.vnc.passwd) {
> +
> + if (qemudMonitorCommandExtra(vm, "change vnc password",
> + vm->def->graphics->data.vnc.passwd,
> + QEMU_PASSWD_PROMPT,
> + &info) < 0) {
> + qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
> + "%s", _("resume operation failed"));
\--- cut'n'paste?
> + return -1;
> + }
> + VIR_FREE(info);
> + }
> +
> + return 0;
> +}
-- Guido
More information about the libvir-list
mailing list