2006-11-16 19:06:13 +00:00
|
|
|
/*
|
|
|
|
* xm_internal.h: helper routines for dealing with inactive domains
|
|
|
|
*
|
2011-07-06 20:40:19 +00:00
|
|
|
* Copyright (C) 2006-2007, 2010-2011 Red Hat, Inc.
|
2007-01-19 20:23:37 +00:00
|
|
|
* Copyright (C) 2006 Daniel P. Berrange
|
2006-11-16 19:06:13 +00:00
|
|
|
*
|
2007-01-19 20:23:37 +00:00
|
|
|
* 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>
|
2006-11-16 19:06:13 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _LIBVIRT_XM_INTERNAL_H_
|
2010-03-09 18:22:22 +00:00
|
|
|
# define _LIBVIRT_XM_INTERNAL_H_
|
2006-11-16 19:06:13 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "internal.h"
|
|
|
|
# include "driver.h"
|
|
|
|
# include "conf.h"
|
|
|
|
# include "domain_conf.h"
|
2006-11-16 19:06:13 +00:00
|
|
|
|
Fri Jul 6 16:08:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/proxy_internal.c, src/proxy_internal.h,
src.xen_internal.c, src/xen_internal.h,
src/xen_unified.c, src/xen_unified.h,
src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h,
src/xs_internal.c, src/xs_internal.h: The interface
between xen_unified.c and its underlying driver now uses
a custom structure (struct xenUnifiedDriver) instead
of reusing virDriver.
* src/xen_unified.c: virDomainLookup* functions in Xen
now throw VIR_ERR_NO_DOMAIN if the domain does not exist.
* src/xs_internal.c: Fix indentation.
2007-07-06 15:11:22 +00:00
|
|
|
extern struct xenUnifiedDriver xenXMDriver;
|
2007-04-04 14:19:49 +00:00
|
|
|
|
2008-11-25 10:44:52 +00:00
|
|
|
int xenXMConfigCacheRefresh (virConnectPtr conn);
|
|
|
|
int xenXMConfigCacheAddFile(virConnectPtr conn, const char *filename);
|
|
|
|
int xenXMConfigCacheRemoveFile(virConnectPtr conn, const char *filename);
|
|
|
|
|
2011-07-06 20:40:19 +00:00
|
|
|
virDrvOpenStatus xenXMOpen(virConnectPtr conn, virConnectAuthPtr auth,
|
|
|
|
unsigned int flags);
|
2006-11-16 19:06:13 +00:00
|
|
|
int xenXMClose(virConnectPtr conn);
|
|
|
|
const char *xenXMGetType(virConnectPtr conn);
|
|
|
|
int xenXMDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info);
|
2011-05-02 09:35:29 +00:00
|
|
|
int xenXMDomainGetState(virDomainPtr domain,
|
|
|
|
int *state,
|
|
|
|
int *reason,
|
|
|
|
unsigned int flags);
|
xen: reject unknown flags
Also fix a logic bug in xenXMDomain{Attach,Detach}DeviceFlags,
where (flags & VIR_DOMAIN_DEVICE_MODIFY_CURRENT) is always false.
* src/xen/xen_driver.c (xenUnifiedDomainXMLFromNative)
(xenUnifiedDomainXMLToNative, xenUnifiedDomainBlockPeek): Reject
unknown flags.
* src/xen/xen_hypervisor.c (xenHypervisorOpen)
(xenHypervisorGetDomainState): Likewise.
* src/xen/xen_inotify.c (xenInotifyOpen): Likewise.
* src/xen/xs_internal.c (xenStoreOpen, xenStoreDomainGetState)
(xenStoreDomainReboot): Likewise.
* src/xen/xend_internal.c (xenDaemonOpen, xenDaemonDomainReboot)
(xenDaemonDomainCoreDump, xenDaemonDomainGetState)
(xenDaemonDomainMigratePrepare, xenDaemonDomainSetVcpusFlags,
xenDaemonDomainGetVcpusFlags, xenDaemonAttachDeviceFlags,
xenDaemonDetachDeviceFlags): Likewise.
(xenDaemonDomainGetXMLDesc): Prefer unsigned flags.
* src/xen/xend_internal.h (xenDaemonDomainGetXMLDesc): Likewise.
* src/xen/xm_internal.h (xenXMDomainGetXMLDesc): Likewise.
* src/xen/xm_internal.c (xenXMDomainGetXMLDesc): Likewise.
(xenXMOpen, xenXMDomainGetState, xenXMDomainSetVcpusFlags)
(xenXMDomainGetVcpusFlags): Reject unknown flags.
(xenXMDomainAttachDeviceFlags, xenXMDomainDetachDeviceFlags):
Likewise, and avoid always-false conditional.
* src/xen/xen_driver.h (XEN_MIGRATION_FLAGS): New define.
2011-07-06 23:15:33 +00:00
|
|
|
char *xenXMDomainGetXMLDesc(virDomainPtr domain, unsigned int flags);
|
2006-11-16 19:06:13 +00:00
|
|
|
int xenXMDomainSetMemory(virDomainPtr domain, unsigned long memory);
|
|
|
|
int xenXMDomainSetMaxMemory(virDomainPtr domain, unsigned long memory);
|
|
|
|
unsigned long xenXMDomainGetMaxMemory(virDomainPtr domain);
|
|
|
|
int xenXMDomainSetVcpus(virDomainPtr domain, unsigned int vcpus);
|
2010-10-14 22:17:18 +00:00
|
|
|
int xenXMDomainSetVcpusFlags(virDomainPtr domain, unsigned int vcpus,
|
|
|
|
unsigned int flags);
|
2010-10-06 23:54:41 +00:00
|
|
|
int xenXMDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags);
|
2007-11-28 10:11:18 +00:00
|
|
|
int xenXMDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
|
|
|
|
unsigned char *cpumap, int maplen);
|
2006-11-16 19:06:13 +00:00
|
|
|
virDomainPtr xenXMDomainLookupByName(virConnectPtr conn, const char *domname);
|
|
|
|
virDomainPtr xenXMDomainLookupByUUID(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const unsigned char *uuid);
|
2006-11-16 19:06:13 +00:00
|
|
|
|
2007-03-06 21:55:44 +00:00
|
|
|
int xenXMListDefinedDomains(virConnectPtr conn, char ** const names, int maxnames);
|
2006-11-16 19:06:13 +00:00
|
|
|
int xenXMNumOfDefinedDomains(virConnectPtr conn);
|
|
|
|
|
|
|
|
int xenXMDomainCreate(virDomainPtr domain);
|
|
|
|
virDomainPtr xenXMDomainDefineXML(virConnectPtr con, const char *xml);
|
|
|
|
int xenXMDomainUndefine(virDomainPtr domain);
|
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int xenXMDomainBlockPeek (virDomainPtr dom, const char *path, unsigned long long offset, size_t size, void *buffer);
|
2006-11-16 19:06:13 +00:00
|
|
|
|
2008-11-25 11:04:34 +00:00
|
|
|
int xenXMDomainGetAutostart(virDomainPtr dom, int *autostart);
|
|
|
|
int xenXMDomainSetAutostart(virDomainPtr dom, int autostart);
|
|
|
|
|
2006-11-16 19:06:13 +00:00
|
|
|
#endif
|