2010-12-16 16:10:54 +00:00
|
|
|
/*
|
|
|
|
* qemu_hotplug.h: QEMU device hotplug management
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006-2007, 2009-2010 Red Hat, Inc.
|
|
|
|
* Copyright (C) 2006 Daniel P. Berrange
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
* Author: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __QEMU_HOTPLUG_H__
|
|
|
|
# define __QEMU_HOTPLUG_H__
|
|
|
|
|
|
|
|
# include "qemu_conf.h"
|
|
|
|
# include "domain_conf.h"
|
|
|
|
|
|
|
|
int qemuDomainChangeEjectableMedia(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
virDomainDiskDefPtr disk,
|
|
|
|
bool force);
|
|
|
|
int qemuDomainAttachPciDiskDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainDiskDefPtr disk);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainAttachPciControllerDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainControllerDefPtr controller);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainAttachSCSIDisk(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainDiskDefPtr disk);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainAttachUsbMassstorageDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainDiskDefPtr disk);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainAttachNetDevice(virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainNetDefPtr net);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainAttachHostPciDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainHostdevDefPtr hostdev);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainAttachHostUsbDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainHostdevDefPtr hostdev);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainAttachHostDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainHostdevDefPtr hostdev);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainChangeGraphics(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
virDomainGraphicsDefPtr dev);
|
Use the new set_password monitor command to set password.
We try to use that command first when setting a VNC/SPICE password. If
that doesn't work we fallback to the legacy VNC only password
Allow an expiry time to be set, if that doesn't work, throw an error
if they try to use SPICE.
Change since v1:
- moved qemuInitGraphicsPasswords to qemu_hotplug, renamed
to qemuDomainChangeGraphicsPasswords.
- updated what looks like a typo (that appears to work anyway) in
initial patch from Daniel:
- ret = qemuInitGraphicsPasswords(driver, vm,
- VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
- &vm->def->graphics[0]->data.vnc.auth,
- driver->vncPassword);
+ ret = qemuInitGraphicsPasswords(driver, vm,
+ VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
+ &vm->def->graphics[0]->data.spice.auth,
+ driver->spicePassword);
Based on patch by Daniel P. Berrange <berrange@redhat.com>.
2011-01-10 11:12:33 +00:00
|
|
|
int qemuDomainChangeGraphicsPasswords(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
int type,
|
|
|
|
virDomainGraphicsAuthDefPtr auth,
|
|
|
|
const char *defaultPasswd);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainDetachPciDiskDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainDeviceDefPtr dev);
|
2011-03-07 03:31:48 +00:00
|
|
|
int qemuDomainDetachDiskDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainDeviceDefPtr dev);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainDetachPciControllerDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainDeviceDefPtr dev);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainDetachNetDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainDeviceDefPtr dev);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainDetachHostPciDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainDeviceDefPtr dev);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainDetachHostUsbDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainDeviceDefPtr dev);
|
2010-12-16 16:10:54 +00:00
|
|
|
int qemuDomainDetachHostDevice(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-04 12:09:09 +00:00
|
|
|
virDomainDeviceDefPtr dev);
|
2011-05-18 16:20:53 +00:00
|
|
|
int qemuDomainAttachLease(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
virDomainLeaseDefPtr lease);
|
|
|
|
int qemuDomainDetachLease(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
virDomainLeaseDefPtr lease);
|
2010-12-16 16:10:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* __QEMU_HOTPLUG_H__ */
|