typedef struct _esxPrivate {
esxVI_Context *host;
esxVI_Context *vCenter;
- int phantom; // boolean
virCapsPtr caps;
char *transport;
int32_t maxVcpus;
char edxLongModeBit = '?';
char edxFirstBit = '?';
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (priv->supportsLongMode != esxVI_Boolean_Undefined) {
return priv->supportsLongMode;
}
static virCapsPtr
esxCapsInit(virConnectPtr conn)
{
- esxPrivate *priv = (esxPrivate *)conn->privateData;
- esxVI_Boolean supportsLongMode = esxVI_Boolean_Undefined;
+ esxVI_Boolean supportsLongMode = esxSupportsLongMode(conn);
virCapsPtr caps = NULL;
virCapsGuestPtr guest = NULL;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- return NULL;
- }
-
- supportsLongMode = esxSupportsLongMode(conn);
-
if (supportsLongMode == esxVI_Boolean_Undefined) {
return NULL;
}
/*
* URI format: {esx|gsx}://[<user>@]<server>[:<port>][?transport={http|https}][&vcenter=<vcenter>][&no_verify={0|1}]
- * esx:///phantom
*
* If no port is specified the default port is set dependent on the scheme and
* transport parameter:
*
* If the no_verify parameter is set to 1, this disables libcurl client checks
* of the server's certificate. The default value it 0.
- *
- * The esx:///phantom URI may be used for tasks that don't require an actual
- * connection to the hypervisor like domxml-{from,to}-native:
- *
- * virsh -c esx:///phantom domxml-from-native vmware-vmx dummy.vmx
*/
static virDrvOpenStatus
esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)
int noVerify = 0; // boolean
char *username = NULL;
char *password = NULL;
- int phantom = 0; // boolean
/* Decline if the URI is NULL or the scheme is neither 'esx' nor 'gsx' */
if (conn->uri == NULL || conn->uri->scheme == NULL ||
return VIR_DRV_OPEN_DECLINED;
}
- /* Check for 'esx:///phantom' URI */
- if (conn->uri->server == NULL && conn->uri->path != NULL &&
- STREQ(conn->uri->path, "/phantom")) {
- phantom = 1;
+ /* Decline URIs without server part, or missing auth */
+ if (conn->uri->server == NULL || auth == NULL || auth->cb == NULL) {
+ return VIR_DRV_OPEN_DECLINED;
}
- if (! phantom) {
- /* Decline non-phantom URIs without server part, or missing auth */
- if (conn->uri->server == NULL || auth == NULL || auth->cb == NULL) {
- return VIR_DRV_OPEN_DECLINED;
- }
-
- if (conn->uri->path != NULL) {
- VIR_WARN("Ignoring unexpected path '%s' in URI", conn->uri->path);
- }
+ if (conn->uri->path != NULL) {
+ VIR_WARN("Ignoring unexpected path '%s' in URI", conn->uri->path);
}
/* Allocate per-connection private data */
goto failure;
}
- priv->phantom = phantom;
priv->maxVcpus = -1;
priv->supportsVMotion = esxVI_Boolean_Undefined;
priv->supportsLongMode = esxVI_Boolean_Undefined;
priv->usedCpuTimeCounterId = -1;
- /* Request credentials and login to non-phantom host/vCenter */
- if (! phantom) {
- if (esxUtil_ParseQuery(conn, &priv->transport, &vCenter,
- &noVerify) < 0) {
- goto failure;
+ /* Request credentials and login to host/vCenter */
+ if (esxUtil_ParseQuery(conn, &priv->transport, &vCenter, &noVerify) < 0) {
+ goto failure;
+ }
+
+ if (esxUtil_ResolveHostname(conn, conn->uri->server, hostIpAddress,
+ NI_MAXHOST) < 0) {
+ goto failure;
+ }
+
+ if (vCenter != NULL &&
+ esxUtil_ResolveHostname(conn, vCenter, vCenterIpAddress,
+ NI_MAXHOST) < 0) {
+ goto failure;
+ }
+
+ /*
+ * Set the port dependent on the transport protocol if no port is
+ * specified. This allows us to rely on the port parameter being
+ * correctly set when building URIs later on, without the need to
+ * distinguish between the situations port == 0 and port != 0
+ */
+ if (conn->uri->port == 0) {
+ if (STRCASEEQ(conn->uri->scheme, "esx")) {
+ if (STRCASEEQ(priv->transport, "https")) {
+ conn->uri->port = 443;
+ } else {
+ conn->uri->port = 80;
+ }
+ } else { /* GSX */
+ if (STRCASEEQ(priv->transport, "https")) {
+ conn->uri->port = 8333;
+ } else {
+ conn->uri->port = 8222;
+ }
}
+ }
- if (esxUtil_ResolveHostname(conn, conn->uri->server, hostIpAddress,
- NI_MAXHOST) < 0) {
+ /* Login to host */
+ if (virAsprintf(&url, "%s://%s:%d/sdk", priv->transport,
+ conn->uri->server, conn->uri->port) < 0) {
+ virReportOOMError(conn);
+ goto failure;
+ }
+
+ if (conn->uri->user != NULL) {
+ username = strdup(conn->uri->user);
+
+ if (username == NULL) {
+ virReportOOMError(conn);
goto failure;
}
+ } else {
+ username = esxUtil_RequestUsername(auth, "root", conn->uri->server);
- if (vCenter != NULL &&
- esxUtil_ResolveHostname(conn, vCenter, vCenterIpAddress,
- NI_MAXHOST) < 0) {
+ if (username == NULL) {
+ ESX_ERROR(conn, VIR_ERR_AUTH_FAILED, "Username request failed");
goto failure;
}
+ }
- /*
- * Set the port dependent on the transport protocol if no port is
- * specified. This allows us to rely on the port parameter being
- * correctly set when building URIs later on, without the need to
- * distinguish between the situations port == 0 and port != 0
- */
- if (conn->uri->port == 0) {
- if (STRCASEEQ(conn->uri->scheme, "esx")) {
- if (STRCASEEQ(priv->transport, "https")) {
- conn->uri->port = 443;
- } else {
- conn->uri->port = 80;
- }
- } else { /* GSX */
- if (STRCASEEQ(priv->transport, "https")) {
- conn->uri->port = 8333;
- } else {
- conn->uri->port = 8222;
- }
- }
- }
+ if (esxVI_Context_Alloc(conn, &priv->host) < 0) {
+ goto failure;
+ }
- /* Login to host */
- if (virAsprintf(&url, "%s://%s:%d/sdk", priv->transport,
- conn->uri->server, conn->uri->port) < 0) {
- virReportOOMError(conn);
+ password = esxUtil_RequestPassword(auth, username, conn->uri->server);
+
+ if (password == NULL) {
+ ESX_ERROR(conn, VIR_ERR_AUTH_FAILED, "Password request failed");
+ goto failure;
+ }
+
+ if (esxVI_Context_Connect(conn, priv->host, url, hostIpAddress,
+ username, password, noVerify) < 0) {
+ goto failure;
+ }
+
+ if (STRCASEEQ(conn->uri->scheme, "esx")) {
+ if (priv->host->productVersion != esxVI_ProductVersion_ESX35 &&
+ priv->host->productVersion != esxVI_ProductVersion_ESX40) {
+ ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
+ "%s is neither an ESX 3.5 host nor an ESX 4.0 host",
+ conn->uri->server);
goto failure;
}
+ } else { /* GSX */
+ if (priv->host->productVersion != esxVI_ProductVersion_GSX20) {
+ ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
+ "%s isn't a GSX 2.0 host", conn->uri->server);
+ goto failure;
+ }
+ }
- if (conn->uri->user != NULL) {
- username = strdup(conn->uri->user);
+ VIR_FREE(url);
+ VIR_FREE(password);
+ VIR_FREE(username);
- if (username == NULL) {
- virReportOOMError(conn);
- goto failure;
- }
- } else {
- username = esxUtil_RequestUsername(auth, "root", conn->uri->server);
+ /* Login to vCenter */
+ if (vCenter != NULL) {
+ if (virAsprintf(&url, "%s://%s/sdk", priv->transport,
+ vCenter) < 0) {
+ virReportOOMError(conn);
+ goto failure;
+ }
- if (username == NULL) {
- ESX_ERROR(conn, VIR_ERR_AUTH_FAILED, "Username request failed");
- goto failure;
- }
+ if (esxVI_Context_Alloc(conn, &priv->vCenter) < 0) {
+ goto failure;
}
- if (esxVI_Context_Alloc(conn, &priv->host) < 0) {
+ username = esxUtil_RequestUsername(auth, "administrator", vCenter);
+
+ if (username == NULL) {
+ ESX_ERROR(conn, VIR_ERR_AUTH_FAILED,
+ "Username request failed");
goto failure;
}
- password = esxUtil_RequestPassword(auth, username, conn->uri->server);
+ password = esxUtil_RequestPassword(auth, username, vCenter);
if (password == NULL) {
- ESX_ERROR(conn, VIR_ERR_AUTH_FAILED, "Password request failed");
+ ESX_ERROR(conn, VIR_ERR_AUTH_FAILED,
+ "Password request failed");
goto failure;
}
- if (esxVI_Context_Connect(conn, priv->host, url, hostIpAddress,
- username, password, noVerify) < 0) {
+ if (esxVI_Context_Connect(conn, priv->vCenter, url,
+ vCenterIpAddress, username, password,
+ noVerify) < 0) {
goto failure;
}
- if (STRCASEEQ(conn->uri->scheme, "esx")) {
- if (priv->host->productVersion != esxVI_ProductVersion_ESX35 &&
- priv->host->productVersion != esxVI_ProductVersion_ESX40) {
- ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
- "%s is neither an ESX 3.5 host nor an ESX 4.0 host",
- conn->uri->server);
- goto failure;
- }
- } else { /* GSX */
- if (priv->host->productVersion != esxVI_ProductVersion_GSX20) {
- ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
- "%s isn't a GSX 2.0 host", conn->uri->server);
- goto failure;
- }
+ if (priv->vCenter->productVersion != esxVI_ProductVersion_VPX25 &&
+ priv->vCenter->productVersion != esxVI_ProductVersion_VPX40) {
+ ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
+ "%s is neither a vCenter 2.5 server nor a vCenter "
+ "4.0 server",
+ conn->uri->server);
+ goto failure;
}
VIR_FREE(url);
+ VIR_FREE(vCenter);
VIR_FREE(password);
VIR_FREE(username);
-
- /* Login to vCenter */
- if (vCenter != NULL) {
- if (virAsprintf(&url, "%s://%s/sdk", priv->transport,
- vCenter) < 0) {
- virReportOOMError(conn);
- goto failure;
- }
-
- if (esxVI_Context_Alloc(conn, &priv->vCenter) < 0) {
- goto failure;
- }
-
- username = esxUtil_RequestUsername(auth, "administrator", vCenter);
-
- if (username == NULL) {
- ESX_ERROR(conn, VIR_ERR_AUTH_FAILED,
- "Username request failed");
- goto failure;
- }
-
- password = esxUtil_RequestPassword(auth, username, vCenter);
-
- if (password == NULL) {
- ESX_ERROR(conn, VIR_ERR_AUTH_FAILED,
- "Password request failed");
- goto failure;
- }
-
- if (esxVI_Context_Connect(conn, priv->vCenter, url,
- vCenterIpAddress, username, password,
- noVerify) < 0) {
- goto failure;
- }
-
- if (priv->vCenter->productVersion != esxVI_ProductVersion_VPX25 &&
- priv->vCenter->productVersion != esxVI_ProductVersion_VPX40) {
- ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
- "%s is neither a vCenter 2.5 server nor a vCenter "
- "4.0 server",
- conn->uri->server);
- goto failure;
- }
-
- VIR_FREE(url);
- VIR_FREE(password);
- VIR_FREE(username);
- }
-
- VIR_FREE(vCenter);
}
conn->privateData = priv;
- if (! phantom) {
- /* Setup capabilities */
- priv->caps = esxCapsInit(conn);
+ /* Setup capabilities */
+ priv->caps = esxCapsInit(conn);
- if (priv->caps == NULL) {
- goto failure;
- }
+ if (priv->caps == NULL) {
+ goto failure;
}
return VIR_DRV_OPEN_SUCCESS;
{
esxPrivate *priv = (esxPrivate *)conn->privateData;
- if (! priv->phantom) {
- esxVI_EnsureSession(conn, priv->host);
+ esxVI_EnsureSession(conn, priv->host);
- esxVI_Logout(conn, priv->host);
- esxVI_Context_Free(&priv->host);
+ esxVI_Logout(conn, priv->host);
+ esxVI_Context_Free(&priv->host);
- if (priv->vCenter != NULL) {
- esxVI_EnsureSession(conn, priv->vCenter);
+ if (priv->vCenter != NULL) {
+ esxVI_EnsureSession(conn, priv->vCenter);
- esxVI_Logout(conn, priv->vCenter);
- esxVI_Context_Free(&priv->vCenter);
- }
+ esxVI_Logout(conn, priv->vCenter);
+ esxVI_Context_Free(&priv->vCenter);
}
virCapabilitiesFree(priv->caps);
esxVI_ObjectContent *hostSystem = NULL;
esxVI_DynamicProperty *dynamicProperty = NULL;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (priv->supportsVMotion != esxVI_Boolean_Undefined) {
return priv->supportsVMotion;
}
esxPrivate *priv = (esxPrivate *)conn->privateData;
esxVI_Boolean supportsVMotion = esxVI_Boolean_Undefined;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- return -1;
- }
-
switch (feature) {
case VIR_DRV_FEATURE_MIGRATION_V1:
supportsVMotion = esxSupportsVMotion(conn);
char *temp;
unsigned int major, minor, release;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- return -1;
- }
-
temp = (char *)priv->host->service->about->version;
/* Expecting 'major.minor.release' format */
const char *domainName = NULL;
char *complete = NULL;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(conn, priv->host) < 0) {
goto failure;
}
memset(nodeinfo, 0, sizeof(virNodeInfo));
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(conn, priv->host) < 0) {
goto failure;
}
esxGetCapabilities(virConnectPtr conn)
{
esxPrivate *priv = (esxPrivate *)conn->privateData;
- char *xml = NULL;
-
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- return NULL;
- }
-
- xml = virCapabilitiesFormatXML(priv->caps);
+ char *xml = virCapabilitiesFormatXML(priv->caps);
if (xml == NULL) {
virReportOOMError(conn);
esxVI_VirtualMachinePowerState powerState;
int count = 0;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (ids == NULL || maxids < 0) {
goto failure;
}
{
esxPrivate *priv = (esxPrivate *)conn->privateData;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- return -1;
- }
-
if (esxVI_EnsureSession(conn, priv->host) < 0) {
return -1;
}
unsigned char uuid_candidate[VIR_UUID_BUFLEN];
virDomainPtr domain = NULL;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(conn, priv->host) < 0) {
goto failure;
}
char uuid_string[VIR_UUID_STRING_BUFLEN];
virDomainPtr domain = NULL;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(conn, priv->host) < 0) {
goto failure;
}
unsigned char uuid_candidate[VIR_UUID_BUFLEN];
virDomainPtr domain = NULL;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(conn, priv->host) < 0) {
goto failure;
}
esxVI_ManagedObjectReference *task = NULL;
esxVI_TaskInfoState taskInfoState;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
esxVI_ManagedObjectReference *task = NULL;
esxVI_TaskInfoState taskInfoState;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
esxVI_String *propertyNameList = NULL;
esxVI_VirtualMachinePowerState powerState;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
esxVI_String *propertyNameList = NULL;
esxVI_VirtualMachinePowerState powerState;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
esxVI_ManagedObjectReference *task = NULL;
esxVI_TaskInfoState taskInfoState;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
esxVI_DynamicProperty *dynamicProperty = NULL;
unsigned long memoryMB = 0;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
esxVI_ManagedObjectReference *task = NULL;
esxVI_TaskInfoState taskInfoState;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
esxVI_ManagedObjectReference *task = NULL;
esxVI_TaskInfoState taskInfoState;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
esxVI_PerfMetricIntSeries *perfMetricIntSeries = NULL;
esxVI_Long *value = NULL;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
esxVI_ManagedObjectReference *task = NULL;
esxVI_TaskInfoState taskInfoState;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (nvcpus < 1) {
ESX_ERROR(domain->conn, VIR_ERR_INVALID_ARG,
"Requested number of virtual CPUs must al least be 1");
esxVI_ObjectContent *hostSystem = NULL;
esxVI_DynamicProperty *dynamicProperty = NULL;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (priv->maxVcpus > 0) {
return priv->maxVcpus;
}
virDomainDefPtr def = NULL;
char *xml = NULL;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- return NULL;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
unsigned int flags ATTRIBUTE_UNUSED)
{
esxPrivate *priv = (esxPrivate *)conn->privateData;
- esxVI_Context *ctx = NULL;
- esxVI_APIVersion apiVersion = esxVI_APIVersion_Unknown;
virDomainDefPtr def = NULL;
char *xml = NULL;
return NULL;
}
- if (! priv->phantom) {
- ctx = priv->host;
- apiVersion = priv->host->apiVersion;
- }
-
- def = esxVMX_ParseConfig(conn, ctx, nativeConfig, "?", "?", apiVersion);
+ def = esxVMX_ParseConfig(conn, priv->host, nativeConfig, "?", "?",
+ priv->host->apiVersion);
if (def != NULL) {
xml = virDomainDefFormat(conn, def, VIR_DOMAIN_XML_INACTIVE);
virDomainDefPtr def = NULL;
char *vmx = NULL;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- return NULL;
- }
-
if (STRNEQ(nativeFormat, "vmware-vmx")) {
ESX_ERROR(conn, VIR_ERR_INVALID_ARG,
"Unsupported config format '%s'", nativeFormat);
esxVI_VirtualMachinePowerState powerState;
int count = 0;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (names == NULL || maxnames < 0) {
goto failure;
}
{
esxPrivate *priv = (esxPrivate *)conn->privateData;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- return -1;
- }
-
if (esxVI_EnsureSession(conn, priv->host) < 0) {
return -1;
}
esxVI_ManagedObjectReference *task = NULL;
esxVI_TaskInfoState taskInfoState;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
esxVI_TaskInfoState taskInfoState;
virDomainPtr domain = NULL;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(conn, priv->host) < 0) {
goto failure;
}
esxVI_String *propertyNameList = NULL;
esxVI_VirtualMachinePowerState powerState;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
unsigned int mask = 0;
int i = 0;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (*nparams < 3) {
ESX_ERROR(domain->conn, VIR_ERR_INVALID_ARG,
"Parameter array must have space for 3 items");
esxVI_TaskInfoState taskInfoState;
int i;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(domain->conn, priv->host) < 0) {
goto failure;
}
esxVI_ManagedObjectReference *task = NULL;
esxVI_TaskInfoState taskInfoState;
- if (priv->phantom) {
- ESX_ERROR(domain->conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (priv->vCenter == NULL) {
ESX_ERROR(domain->conn, VIR_ERR_INVALID_ARG,
"Migration not possible without a vCenter");
esxVI_DynamicProperty *dynamicProperty = NULL;
esxVI_ResourcePoolResourceUsage *resourcePoolResourceUsage = NULL;
- if (priv->phantom) {
- ESX_ERROR(conn, VIR_ERR_OPERATION_INVALID,
- "Not possible with a phantom connection");
- goto failure;
- }
-
if (esxVI_EnsureSession(conn, priv->host) < 0) {
goto failure;
}