2007-02-14 01:40:09 +00:00
|
|
|
/*
|
|
|
|
* config.h: VM configuration management
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006, 2007 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>
|
|
|
|
*/
|
|
|
|
|
2007-02-14 15:41:03 +00:00
|
|
|
#ifndef __QEMUD_CONF_H
|
|
|
|
#define __QEMUD_CONF_H
|
2007-02-14 01:40:09 +00:00
|
|
|
|
2008-01-29 18:15:54 +00:00
|
|
|
#include <config.h>
|
2007-11-26 11:50:16 +00:00
|
|
|
|
|
|
|
#ifdef WITH_QEMU
|
|
|
|
|
2007-06-27 00:12:29 +00:00
|
|
|
#include "internal.h"
|
2007-06-26 23:48:46 +00:00
|
|
|
#include "bridge.h"
|
|
|
|
#include "iptables.h"
|
2008-02-27 04:35:08 +00:00
|
|
|
#include "capabilities.h"
|
2007-06-26 23:48:46 +00:00
|
|
|
#include <netinet/in.h>
|
|
|
|
|
|
|
|
#define qemudDebug(fmt, ...) do {} while(0)
|
2007-06-26 22:42:47 +00:00
|
|
|
|
2007-06-26 22:13:21 +00:00
|
|
|
/* Different types of QEMU acceleration possible */
|
|
|
|
enum qemud_vm_virt_type {
|
|
|
|
QEMUD_VIRT_QEMU,
|
|
|
|
QEMUD_VIRT_KQEMU,
|
|
|
|
QEMUD_VIRT_KVM,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Two types of disk backends */
|
|
|
|
enum qemud_vm_disk_type {
|
|
|
|
QEMUD_DISK_BLOCK,
|
|
|
|
QEMUD_DISK_FILE
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Three types of disk frontend */
|
|
|
|
enum qemud_vm_disk_device {
|
|
|
|
QEMUD_DISK_DISK,
|
|
|
|
QEMUD_DISK_CDROM,
|
|
|
|
QEMUD_DISK_FLOPPY,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Stores the virtual disk configuration */
|
|
|
|
struct qemud_vm_disk_def {
|
|
|
|
int type;
|
|
|
|
int device;
|
|
|
|
char src[PATH_MAX];
|
|
|
|
char dst[NAME_MAX];
|
|
|
|
int readonly;
|
|
|
|
|
|
|
|
struct qemud_vm_disk_def *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define QEMUD_MAC_ADDRESS_LEN 6
|
|
|
|
#define QEMUD_OS_TYPE_MAX_LEN 10
|
|
|
|
#define QEMUD_OS_ARCH_MAX_LEN 10
|
|
|
|
#define QEMUD_OS_MACHINE_MAX_LEN 10
|
|
|
|
|
|
|
|
/* 5 different types of networking config */
|
|
|
|
enum qemud_vm_net_type {
|
|
|
|
QEMUD_NET_USER,
|
|
|
|
QEMUD_NET_ETHERNET,
|
|
|
|
QEMUD_NET_SERVER,
|
|
|
|
QEMUD_NET_CLIENT,
|
|
|
|
QEMUD_NET_MCAST,
|
|
|
|
QEMUD_NET_NETWORK,
|
|
|
|
QEMUD_NET_BRIDGE,
|
|
|
|
};
|
|
|
|
|
2008-03-28 20:38:21 +00:00
|
|
|
/* 2 possible types of forwarding */
|
|
|
|
enum qemud_vm_net_forward_type {
|
|
|
|
QEMUD_NET_FORWARD_NAT,
|
|
|
|
QEMUD_NET_FORWARD_ROUTE,
|
|
|
|
};
|
|
|
|
|
2007-06-26 23:48:46 +00:00
|
|
|
#define QEMUD_MAX_NAME_LEN 50
|
|
|
|
#define QEMUD_MAX_XML_LEN 4096
|
|
|
|
#define QEMUD_MAX_ERROR_LEN 1024
|
|
|
|
|
2007-06-26 22:13:21 +00:00
|
|
|
/* Stores the virtual network interface configuration */
|
|
|
|
struct qemud_vm_net_def {
|
|
|
|
int type;
|
|
|
|
unsigned char mac[QEMUD_MAC_ADDRESS_LEN];
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
char ifname[BR_IFNAME_MAXLEN];
|
|
|
|
char script[PATH_MAX];
|
|
|
|
} ethernet;
|
|
|
|
struct {
|
|
|
|
char address[BR_INET_ADDR_MAXLEN];
|
|
|
|
int port;
|
|
|
|
} socket; /* any of NET_CLIENT or NET_SERVER or NET_MCAST */
|
|
|
|
struct {
|
|
|
|
char name[QEMUD_MAX_NAME_LEN];
|
|
|
|
char ifname[BR_IFNAME_MAXLEN];
|
|
|
|
} network;
|
|
|
|
struct {
|
|
|
|
char brname[BR_IFNAME_MAXLEN];
|
|
|
|
char ifname[BR_IFNAME_MAXLEN];
|
|
|
|
} bridge;
|
|
|
|
} dst;
|
|
|
|
|
|
|
|
struct qemud_vm_net_def *next;
|
|
|
|
};
|
|
|
|
|
2008-04-25 20:46:13 +00:00
|
|
|
enum qemu_vm_chr_dst_type {
|
|
|
|
QEMUD_CHR_SRC_TYPE_NULL,
|
|
|
|
QEMUD_CHR_SRC_TYPE_VC,
|
|
|
|
QEMUD_CHR_SRC_TYPE_PTY,
|
|
|
|
QEMUD_CHR_SRC_TYPE_DEV,
|
|
|
|
QEMUD_CHR_SRC_TYPE_FILE,
|
|
|
|
QEMUD_CHR_SRC_TYPE_PIPE,
|
|
|
|
QEMUD_CHR_SRC_TYPE_STDIO,
|
|
|
|
QEMUD_CHR_SRC_TYPE_UDP,
|
|
|
|
QEMUD_CHR_SRC_TYPE_TCP,
|
|
|
|
QEMUD_CHR_SRC_TYPE_UNIX,
|
|
|
|
|
|
|
|
QEMUD_CHR_SRC_TYPE_LAST,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
QEMUD_CHR_SRC_TCP_PROTOCOL_RAW,
|
|
|
|
QEMUD_CHR_SRC_TCP_PROTOCOL_TELNET,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct qemud_vm_chr_def {
|
|
|
|
int dstPort;
|
|
|
|
|
|
|
|
int srcType;
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
char path[PATH_MAX];
|
|
|
|
} file; /* pty, file, pipe, or device */
|
|
|
|
struct {
|
|
|
|
char host[BR_INET_ADDR_MAXLEN];
|
|
|
|
char service[BR_INET_ADDR_MAXLEN];
|
|
|
|
int listen;
|
|
|
|
int protocol;
|
|
|
|
} tcp;
|
|
|
|
struct {
|
|
|
|
char bindHost[BR_INET_ADDR_MAXLEN];
|
|
|
|
char bindService[BR_INET_ADDR_MAXLEN];
|
|
|
|
char connectHost[BR_INET_ADDR_MAXLEN];
|
|
|
|
char connectService[BR_INET_ADDR_MAXLEN];
|
|
|
|
} udp;
|
|
|
|
struct {
|
|
|
|
char path[PATH_MAX];
|
|
|
|
int listen;
|
|
|
|
} nix;
|
|
|
|
} srcData;
|
|
|
|
|
|
|
|
struct qemud_vm_chr_def *next;
|
|
|
|
};
|
2007-07-18 21:08:22 +00:00
|
|
|
|
|
|
|
enum qemu_vm_input_type {
|
|
|
|
QEMU_INPUT_TYPE_MOUSE,
|
|
|
|
QEMU_INPUT_TYPE_TABLET,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum qemu_vm_input_bus {
|
|
|
|
QEMU_INPUT_BUS_PS2,
|
|
|
|
QEMU_INPUT_BUS_USB,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct qemud_vm_input_def {
|
|
|
|
int type;
|
|
|
|
int bus;
|
|
|
|
struct qemud_vm_input_def *next;
|
|
|
|
};
|
|
|
|
|
2007-10-27 01:18:38 +00:00
|
|
|
/* Flags for the 'type' field in next struct */
|
|
|
|
enum qemud_vm_device_type {
|
|
|
|
QEMUD_DEVICE_DISK,
|
|
|
|
QEMUD_DEVICE_NET,
|
|
|
|
QEMUD_DEVICE_INPUT,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct qemud_vm_device_def {
|
|
|
|
int type;
|
|
|
|
union {
|
|
|
|
struct qemud_vm_disk_def disk;
|
|
|
|
struct qemud_vm_net_def net;
|
|
|
|
struct qemud_vm_input_def input;
|
|
|
|
} data;
|
|
|
|
};
|
|
|
|
|
2007-06-26 22:13:21 +00:00
|
|
|
#define QEMUD_MAX_BOOT_DEVS 4
|
|
|
|
|
|
|
|
/* 3 possible boot devices */
|
|
|
|
enum qemud_vm_boot_order {
|
|
|
|
QEMUD_BOOT_FLOPPY,
|
|
|
|
QEMUD_BOOT_CDROM,
|
|
|
|
QEMUD_BOOT_DISK,
|
|
|
|
QEMUD_BOOT_NET,
|
|
|
|
};
|
|
|
|
/* 3 possible graphics console modes */
|
2007-07-18 21:08:22 +00:00
|
|
|
enum qemud_vm_graphics_type {
|
2007-06-26 22:13:21 +00:00
|
|
|
QEMUD_GRAPHICS_NONE,
|
|
|
|
QEMUD_GRAPHICS_SDL,
|
|
|
|
QEMUD_GRAPHICS_VNC,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Internal flags to keep track of qemu command line capabilities */
|
|
|
|
enum qemud_cmd_flags {
|
|
|
|
QEMUD_CMD_FLAG_KQEMU = 1,
|
|
|
|
QEMUD_CMD_FLAG_VNC_COLON = 2,
|
|
|
|
QEMUD_CMD_FLAG_NO_REBOOT = 4,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
enum qemud_vm_features {
|
|
|
|
QEMUD_FEATURE_ACPI = 1,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Operating system configuration data & machine / arch */
|
|
|
|
struct qemud_vm_os_def {
|
|
|
|
char type[QEMUD_OS_TYPE_MAX_LEN];
|
|
|
|
char arch[QEMUD_OS_ARCH_MAX_LEN];
|
|
|
|
char machine[QEMUD_OS_MACHINE_MAX_LEN];
|
|
|
|
int nBootDevs;
|
|
|
|
int bootDevs[QEMUD_MAX_BOOT_DEVS];
|
|
|
|
char kernel[PATH_MAX];
|
|
|
|
char initrd[PATH_MAX];
|
|
|
|
char cmdline[PATH_MAX];
|
|
|
|
char binary[PATH_MAX];
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Guest VM main configuration */
|
|
|
|
struct qemud_vm_def {
|
|
|
|
int virtType;
|
2007-08-09 20:19:12 +00:00
|
|
|
unsigned char uuid[VIR_UUID_BUFLEN];
|
2007-06-26 22:13:21 +00:00
|
|
|
char name[QEMUD_MAX_NAME_LEN];
|
|
|
|
|
2008-03-19 14:32:50 +00:00
|
|
|
unsigned long memory;
|
|
|
|
unsigned long maxmem;
|
2007-06-26 22:13:21 +00:00
|
|
|
int vcpus;
|
|
|
|
|
|
|
|
int noReboot;
|
|
|
|
|
|
|
|
struct qemud_vm_os_def os;
|
|
|
|
|
2007-07-16 21:30:30 +00:00
|
|
|
int localtime;
|
2007-06-26 22:13:21 +00:00
|
|
|
int features;
|
|
|
|
int graphicsType;
|
|
|
|
int vncPort;
|
|
|
|
int vncActivePort;
|
2007-07-24 14:30:05 +00:00
|
|
|
char vncListen[BR_INET_ADDR_MAXLEN];
|
2008-01-15 15:18:33 +00:00
|
|
|
char *keymap;
|
2007-06-26 22:13:21 +00:00
|
|
|
|
2008-04-25 20:46:13 +00:00
|
|
|
unsigned int ndisks;
|
2007-06-26 22:13:21 +00:00
|
|
|
struct qemud_vm_disk_def *disks;
|
|
|
|
|
2008-04-25 20:46:13 +00:00
|
|
|
unsigned int nnets;
|
2007-06-26 22:13:21 +00:00
|
|
|
struct qemud_vm_net_def *nets;
|
2007-07-18 21:08:22 +00:00
|
|
|
|
2008-04-25 20:46:13 +00:00
|
|
|
unsigned int ninputs;
|
2007-07-18 21:08:22 +00:00
|
|
|
struct qemud_vm_input_def *inputs;
|
2008-04-25 20:46:13 +00:00
|
|
|
|
|
|
|
unsigned int nserials;
|
|
|
|
struct qemud_vm_chr_def *serials;
|
|
|
|
|
|
|
|
unsigned int nparallels;
|
|
|
|
struct qemud_vm_chr_def *parallels;
|
2007-06-26 22:13:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Guest VM runtime state */
|
|
|
|
struct qemud_vm {
|
2007-08-14 01:28:47 +00:00
|
|
|
int stdin;
|
2007-06-26 22:13:21 +00:00
|
|
|
int stdout;
|
|
|
|
int stderr;
|
|
|
|
int monitor;
|
|
|
|
int logfile;
|
|
|
|
int pid;
|
|
|
|
int id;
|
|
|
|
int state;
|
|
|
|
|
|
|
|
int *tapfds;
|
|
|
|
int ntapfds;
|
|
|
|
|
2007-09-21 21:20:32 +00:00
|
|
|
int qemuVersion;
|
|
|
|
int qemuCmdFlags; /* values from enum qemud_cmd_flags */
|
|
|
|
|
2007-06-26 22:13:21 +00:00
|
|
|
char configFile[PATH_MAX];
|
|
|
|
char autostartLink[PATH_MAX];
|
2007-08-14 01:28:47 +00:00
|
|
|
char migrateFrom[PATH_MAX];
|
2007-06-26 22:13:21 +00:00
|
|
|
|
|
|
|
struct qemud_vm_def *def; /* The current definition */
|
|
|
|
struct qemud_vm_def *newDef; /* New definition to activate at shutdown */
|
|
|
|
|
|
|
|
unsigned int autostart : 1;
|
|
|
|
|
|
|
|
struct qemud_vm *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Store start and end addresses of a dhcp range */
|
|
|
|
struct qemud_dhcp_range_def {
|
|
|
|
char start[BR_INET_ADDR_MAXLEN];
|
|
|
|
char end[BR_INET_ADDR_MAXLEN];
|
|
|
|
|
|
|
|
struct qemud_dhcp_range_def *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Virtual Network main configuration */
|
|
|
|
struct qemud_network_def {
|
2007-08-09 20:19:12 +00:00
|
|
|
unsigned char uuid[VIR_UUID_BUFLEN];
|
2007-06-26 22:13:21 +00:00
|
|
|
char name[QEMUD_MAX_NAME_LEN];
|
|
|
|
|
|
|
|
char bridge[BR_IFNAME_MAXLEN];
|
|
|
|
int disableSTP;
|
|
|
|
int forwardDelay;
|
|
|
|
|
|
|
|
int forward;
|
2008-03-28 20:38:21 +00:00
|
|
|
int forwardMode; /* From qemud_vm_net_forward_type */
|
2007-06-26 22:13:21 +00:00
|
|
|
char forwardDev[BR_IFNAME_MAXLEN];
|
|
|
|
|
|
|
|
char ipAddress[BR_INET_ADDR_MAXLEN];
|
|
|
|
char netmask[BR_INET_ADDR_MAXLEN];
|
|
|
|
char network[BR_INET_ADDR_MAXLEN+BR_INET_ADDR_MAXLEN+1];
|
|
|
|
|
|
|
|
int nranges;
|
|
|
|
struct qemud_dhcp_range_def *ranges;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Virtual Network runtime state */
|
|
|
|
struct qemud_network {
|
|
|
|
char configFile[PATH_MAX];
|
|
|
|
char autostartLink[PATH_MAX];
|
|
|
|
|
|
|
|
struct qemud_network_def *def; /* The current definition */
|
|
|
|
struct qemud_network_def *newDef; /* New definition to activate at shutdown */
|
|
|
|
|
|
|
|
char bridge[BR_IFNAME_MAXLEN];
|
|
|
|
int dnsmasqPid;
|
|
|
|
|
|
|
|
unsigned int active : 1;
|
|
|
|
unsigned int autostart : 1;
|
|
|
|
|
|
|
|
struct qemud_network *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* Main driver state */
|
|
|
|
struct qemud_driver {
|
|
|
|
int qemuVersion;
|
|
|
|
int nactivevms;
|
|
|
|
int ninactivevms;
|
|
|
|
struct qemud_vm *vms;
|
|
|
|
int nextvmid;
|
|
|
|
int nactivenetworks;
|
|
|
|
int ninactivenetworks;
|
|
|
|
struct qemud_network *networks;
|
|
|
|
brControl *brctl;
|
|
|
|
iptablesContext *iptables;
|
|
|
|
char *configDir;
|
|
|
|
char *autostartDir;
|
|
|
|
char *networkConfigDir;
|
|
|
|
char *networkAutostartDir;
|
|
|
|
char logDir[PATH_MAX];
|
2007-11-15 10:56:24 +00:00
|
|
|
unsigned int vncTLS : 1;
|
|
|
|
unsigned int vncTLSx509verify : 1;
|
2007-10-12 16:05:44 +00:00
|
|
|
char *vncTLSx509certdir;
|
|
|
|
char vncListen[BR_INET_ADDR_MAXLEN];
|
2008-02-27 04:35:08 +00:00
|
|
|
|
|
|
|
virCapsPtr caps;
|
2007-06-26 22:13:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static inline int
|
2008-02-26 18:41:43 +00:00
|
|
|
qemudIsActiveVM(const struct qemud_vm *vm)
|
2007-06-26 22:13:21 +00:00
|
|
|
{
|
|
|
|
return vm->id != -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int
|
2008-02-26 18:41:43 +00:00
|
|
|
qemudIsActiveNetwork(const struct qemud_network *network)
|
2007-06-26 22:13:21 +00:00
|
|
|
{
|
|
|
|
return network->active;
|
|
|
|
}
|
|
|
|
|
|
|
|
void qemudReportError(virConnectPtr conn,
|
|
|
|
virDomainPtr dom,
|
|
|
|
virNetworkPtr net,
|
|
|
|
int code, const char *fmt, ...)
|
|
|
|
ATTRIBUTE_FORMAT(printf,5,6);
|
|
|
|
|
|
|
|
|
2007-10-12 16:05:44 +00:00
|
|
|
int qemudLoadDriverConfig(struct qemud_driver *driver,
|
|
|
|
const char *filename);
|
2007-06-26 22:13:21 +00:00
|
|
|
|
|
|
|
struct qemud_vm *qemudFindVMByID(const struct qemud_driver *driver,
|
|
|
|
int id);
|
|
|
|
struct qemud_vm *qemudFindVMByUUID(const struct qemud_driver *driver,
|
|
|
|
const unsigned char *uuid);
|
|
|
|
struct qemud_vm *qemudFindVMByName(const struct qemud_driver *driver,
|
|
|
|
const char *name);
|
|
|
|
|
|
|
|
struct qemud_network *qemudFindNetworkByUUID(const struct qemud_driver *driver,
|
|
|
|
const unsigned char *uuid);
|
|
|
|
struct qemud_network *qemudFindNetworkByName(const struct qemud_driver *driver,
|
|
|
|
const char *name);
|
2007-02-14 01:40:09 +00:00
|
|
|
|
2008-02-27 04:35:08 +00:00
|
|
|
virCapsPtr qemudCapsInit (void);
|
|
|
|
|
2007-07-12 15:09:01 +00:00
|
|
|
int qemudExtractVersion (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver);
|
|
|
|
int qemudBuildCommandLine (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
struct qemud_vm *vm,
|
|
|
|
char ***argv);
|
2007-02-14 15:58:06 +00:00
|
|
|
|
2007-06-26 22:13:21 +00:00
|
|
|
int qemudScanConfigs (struct qemud_driver *driver);
|
2007-07-12 15:09:01 +00:00
|
|
|
int qemudDeleteConfig (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
const char *configFile,
|
|
|
|
const char *name);
|
2007-02-14 17:05:55 +00:00
|
|
|
|
2007-02-23 08:48:02 +00:00
|
|
|
void qemudFreeVMDef (struct qemud_vm_def *vm);
|
|
|
|
void qemudFreeVM (struct qemud_vm *vm);
|
2007-02-14 16:07:27 +00:00
|
|
|
|
2007-02-23 08:48:02 +00:00
|
|
|
struct qemud_vm *
|
2007-07-12 15:09:01 +00:00
|
|
|
qemudAssignVMDef (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
struct qemud_vm_def *def);
|
2007-06-26 22:13:21 +00:00
|
|
|
void qemudRemoveInactiveVM (struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
struct qemud_vm *vm);
|
|
|
|
|
2007-10-27 01:18:38 +00:00
|
|
|
struct qemud_vm_device_def *
|
|
|
|
qemudParseVMDeviceDef (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
|
|
|
const char *xmlStr);
|
|
|
|
|
2007-02-23 08:48:02 +00:00
|
|
|
struct qemud_vm_def *
|
2007-07-12 15:09:01 +00:00
|
|
|
qemudParseVMDef (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
const char *xmlStr,
|
|
|
|
const char *displayName);
|
2007-07-12 15:09:01 +00:00
|
|
|
int qemudSaveVMDef (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
struct qemud_vm *vm,
|
|
|
|
struct qemud_vm_def *def);
|
2007-07-12 15:09:01 +00:00
|
|
|
char * qemudGenerateXML (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
struct qemud_vm *vm,
|
|
|
|
struct qemud_vm_def *def,
|
|
|
|
int live);
|
|
|
|
|
|
|
|
void qemudFreeNetworkDef (struct qemud_network_def *def);
|
|
|
|
void qemudFreeNetwork (struct qemud_network *network);
|
|
|
|
|
|
|
|
struct qemud_network *
|
2007-07-12 15:09:01 +00:00
|
|
|
qemudAssignNetworkDef (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
struct qemud_network_def *def);
|
2007-06-26 22:13:21 +00:00
|
|
|
void qemudRemoveInactiveNetwork (struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
struct qemud_network *network);
|
|
|
|
|
|
|
|
struct qemud_network_def *
|
2007-07-12 15:09:01 +00:00
|
|
|
qemudParseNetworkDef (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
const char *xmlStr,
|
|
|
|
const char *displayName);
|
2007-07-12 15:09:01 +00:00
|
|
|
int qemudSaveNetworkDef (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
struct qemud_network *network,
|
|
|
|
struct qemud_network_def *def);
|
2007-07-12 15:09:01 +00:00
|
|
|
char * qemudGenerateNetworkXML (virConnectPtr conn,
|
|
|
|
struct qemud_driver *driver,
|
2007-02-23 08:48:02 +00:00
|
|
|
struct qemud_network *network,
|
|
|
|
struct qemud_network_def *def);
|
2007-02-14 01:40:09 +00:00
|
|
|
|
2007-03-15 17:24:56 +00:00
|
|
|
|
2007-11-26 11:50:16 +00:00
|
|
|
#endif /* WITH_QEMU */
|
|
|
|
|
|
|
|
#endif /* __QEMUD_CONF_H */
|