2009-07-23 22:21:08 +02:00
|
|
|
|
|
|
|
/*
|
2010-03-02 22:19:24 +01:00
|
|
|
* esx_vmx.h: VMX related functions for the VMware ESX driver
|
2009-07-23 22:21:08 +02:00
|
|
|
*
|
|
|
|
* Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ESX_VMX_H__
|
2010-03-09 19:22:22 +01:00
|
|
|
# define __ESX_VMX_H__
|
2009-07-23 22:21:08 +02:00
|
|
|
|
2010-03-09 19:22:22 +01:00
|
|
|
# include "internal.h"
|
|
|
|
# include "conf.h"
|
|
|
|
# include "domain_conf.h"
|
|
|
|
# include "esx_vi.h"
|
2009-07-23 22:21:08 +02:00
|
|
|
|
2009-09-23 14:16:41 +02:00
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_SCSIDiskNameToControllerAndID(const char *name, int *controller, int *id);
|
2009-09-23 14:52:36 +02:00
|
|
|
|
2009-09-23 14:16:41 +02:00
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_IDEDiskNameToControllerAndID(const char *name, int *controller, int *id);
|
2009-09-23 14:52:36 +02:00
|
|
|
|
2009-09-23 14:16:41 +02:00
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_FloppyDiskNameToController(const char *name, int *controller);
|
2009-09-23 14:16:41 +02:00
|
|
|
|
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_GatherSCSIControllers(virDomainDefPtr conf, char *virtualDev[4],
|
|
|
|
int present[4]);
|
2009-09-23 14:16:41 +02:00
|
|
|
|
2009-09-23 14:52:36 +02:00
|
|
|
char *
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_AbsolutePathToDatastoreRelatedPath(esxVI_Context *ctx,
|
2009-09-23 14:52:36 +02:00
|
|
|
const char *absolutePath);
|
2009-09-23 14:16:41 +02:00
|
|
|
|
|
|
|
|
2009-12-03 17:17:40 +01:00
|
|
|
|
2009-09-23 14:16:41 +02:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
* VMX -> Domain XML
|
|
|
|
*/
|
|
|
|
|
2009-09-23 14:52:36 +02:00
|
|
|
char *
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_ParseFileName(esxVI_Context *ctx, const char *fileName,
|
|
|
|
const char *datastoreName, const char *directoryName);
|
2009-09-23 14:52:36 +02:00
|
|
|
|
2009-07-23 22:21:08 +02:00
|
|
|
virDomainDefPtr
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_ParseConfig(esxVI_Context *ctx, const char *vmx,
|
2009-09-23 14:52:36 +02:00
|
|
|
const char *datastoreName, const char *directoryName,
|
2010-04-18 18:04:24 +02:00
|
|
|
esxVI_ProductVersion productVersion);
|
2009-07-23 22:21:08 +02:00
|
|
|
|
2010-01-16 13:52:34 +01:00
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_ParseVNC(virConfPtr conf, virDomainGraphicsDefPtr *def);
|
2010-01-16 13:52:34 +01:00
|
|
|
|
2009-07-23 22:21:08 +02:00
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_ParseSCSIController(virConfPtr conf, int controller, int *present,
|
|
|
|
char **virtualDev);
|
2009-07-23 22:21:08 +02:00
|
|
|
|
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_ParseDisk(esxVI_Context *ctx, virConfPtr conf, int device, int bus,
|
|
|
|
int controller, int id, const char *virtualDev,
|
|
|
|
const char *datastoreName, const char *directoryName,
|
|
|
|
virDomainDiskDefPtr *def);
|
2009-07-23 22:21:08 +02:00
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_ParseEthernet(virConfPtr conf, int controller, virDomainNetDefPtr *def);
|
2009-07-23 22:21:08 +02:00
|
|
|
|
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_ParseSerial(esxVI_Context *ctx, virConfPtr conf, int port,
|
|
|
|
const char *datastoreName, const char *directoryName,
|
|
|
|
virDomainChrDefPtr *def);
|
2009-07-23 22:21:08 +02:00
|
|
|
|
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_ParseParallel(esxVI_Context *ctx, virConfPtr conf, int port,
|
|
|
|
const char *datastoreName, const char *directoryName,
|
|
|
|
virDomainChrDefPtr *def);
|
2009-07-23 22:21:08 +02:00
|
|
|
|
2009-09-23 14:16:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
* Domain XML -> VMX
|
|
|
|
*/
|
|
|
|
|
|
|
|
char *
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_FormatFileName(esxVI_Context *ctx, const char *src);
|
2009-09-23 14:52:36 +02:00
|
|
|
|
|
|
|
char *
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_FormatConfig(esxVI_Context *ctx, virDomainDefPtr def,
|
2010-04-18 18:04:24 +02:00
|
|
|
esxVI_ProductVersion productVersion);
|
2009-09-23 14:16:41 +02:00
|
|
|
|
2010-01-16 13:52:34 +01:00
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_FormatVNC(virDomainGraphicsDefPtr def, virBufferPtr buffer);
|
2010-01-16 13:52:34 +01:00
|
|
|
|
2009-09-23 14:16:41 +02:00
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_FormatHardDisk(esxVI_Context *ctx, virDomainDiskDefPtr def,
|
|
|
|
virBufferPtr buffer);
|
2009-09-23 14:16:41 +02:00
|
|
|
|
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_FormatCDROM(esxVI_Context *ctx, virDomainDiskDefPtr def,
|
|
|
|
virBufferPtr buffer);
|
2009-09-23 14:16:41 +02:00
|
|
|
|
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_FormatFloppy(esxVI_Context *ctx, virDomainDiskDefPtr def,
|
|
|
|
virBufferPtr buffer);
|
2009-09-23 14:16:41 +02:00
|
|
|
|
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_FormatEthernet(virDomainNetDefPtr def, int controller,
|
|
|
|
virBufferPtr buffer);
|
2009-09-23 14:16:41 +02:00
|
|
|
|
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_FormatSerial(esxVI_Context *ctx, virDomainChrDefPtr def,
|
|
|
|
virBufferPtr buffer);
|
2009-09-23 14:16:41 +02:00
|
|
|
|
|
|
|
int
|
2010-01-15 23:05:26 +01:00
|
|
|
esxVMX_FormatParallel(esxVI_Context *ctx, virDomainChrDefPtr def,
|
|
|
|
virBufferPtr buffer);
|
2009-09-23 14:16:41 +02:00
|
|
|
|
2009-07-23 22:21:08 +02:00
|
|
|
#endif /* __ESX_VMX_H__ */
|