2008-11-19 16:58:23 +00:00
|
|
|
/*
|
2014-03-07 14:38:51 +01:00
|
|
|
* uml_conf.h: VM configuration management
|
2008-11-19 16:58:23 +00:00
|
|
|
*
|
2010-03-01 16:38:28 -07:00
|
|
|
* Copyright (C) 2006, 2007, 2010 Red Hat, Inc.
|
2008-11-19 16:58:23 +00:00
|
|
|
* 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
|
2012-09-20 16:30:55 -06:00
|
|
|
* License along with this library. If not, see
|
2012-07-21 18:06:23 +08:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2008-11-19 16:58:23 +00:00
|
|
|
*
|
|
|
|
* Author: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UML_CONF_H
|
2010-03-09 19:22:22 +01:00
|
|
|
# define __UML_CONF_H
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2010-03-09 19:22:22 +01:00
|
|
|
# include "internal.h"
|
2013-12-13 17:16:50 +01:00
|
|
|
# include "libvirt_internal.h"
|
2010-03-09 19:22:22 +01:00
|
|
|
# include "capabilities.h"
|
|
|
|
# include "network_conf.h"
|
2015-07-17 11:11:23 +02:00
|
|
|
# include "virdomainobjlist.h"
|
2009-07-06 16:06:11 +01:00
|
|
|
# include "domain_event.h"
|
2012-12-13 18:21:53 +00:00
|
|
|
# include "virerror.h"
|
2012-12-13 15:49:48 +00:00
|
|
|
# include "virthread.h"
|
2012-12-12 16:27:01 +00:00
|
|
|
# include "vircommand.h"
|
2012-01-25 16:13:59 +00:00
|
|
|
# include "virhash.h"
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2016-09-27 00:31:27 +05:30
|
|
|
# define umlDebug(fmt, ...) do {} while (0)
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2010-03-09 19:22:22 +01:00
|
|
|
# define UML_CPUMASK_LEN CPU_SETSIZE
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2010-03-09 19:22:22 +01:00
|
|
|
# define UML_MAX_CHAR_DEVICE 16
|
2008-11-19 16:58:23 +00:00
|
|
|
|
|
|
|
/* Main driver state */
|
|
|
|
struct uml_driver {
|
2009-01-15 19:56:05 +00:00
|
|
|
virMutex lock;
|
2008-12-04 21:14:39 +00:00
|
|
|
|
2012-10-31 19:03:54 +00:00
|
|
|
bool privileged;
|
2012-10-31 19:03:55 +00:00
|
|
|
virStateInhibitCallback inhibitCallback;
|
|
|
|
void *inhibitOpaque;
|
2009-06-12 13:20:13 +00:00
|
|
|
|
2010-03-30 16:15:13 +02:00
|
|
|
unsigned long umlVersion;
|
2008-11-19 16:58:23 +00:00
|
|
|
int nextvmid;
|
|
|
|
|
2013-01-11 16:04:47 +00:00
|
|
|
virDomainObjListPtr domains;
|
2012-10-31 19:03:55 +00:00
|
|
|
size_t nactive;
|
2008-11-19 16:58:23 +00:00
|
|
|
|
|
|
|
char *configDir;
|
|
|
|
char *autostartDir;
|
|
|
|
char *logDir;
|
|
|
|
char *monitorDir;
|
|
|
|
|
|
|
|
int inotifyFD;
|
|
|
|
int inotifyWatch;
|
|
|
|
|
|
|
|
virCapsPtr caps;
|
2013-03-31 20:03:42 +02:00
|
|
|
virDomainXMLOptionPtr xmlopt;
|
2009-07-06 16:06:11 +01:00
|
|
|
|
|
|
|
/* Event handling */
|
2013-11-21 11:43:10 +01:00
|
|
|
virObjectEventStatePtr domainEventState;
|
2011-07-13 12:21:54 +01:00
|
|
|
|
|
|
|
/* Mapping of 'char *uuidstr' -> virConnectPtr
|
|
|
|
* of guests which will be automatically killed
|
|
|
|
* when the virConnectPtr is closed*/
|
|
|
|
virHashTablePtr autodestroy;
|
2008-11-19 16:58:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
virCapsPtr umlCapsInit (void);
|
|
|
|
|
2010-05-25 14:17:48 +01:00
|
|
|
virCommandPtr umlBuildCommandLine(virConnectPtr conn,
|
|
|
|
struct uml_driver *driver,
|
|
|
|
virDomainObjPtr dom);
|
2008-11-19 16:58:23 +00:00
|
|
|
|
|
|
|
#endif /* __UML_CONF_H */
|