From 49e261d14eb45a58ba7e551d32e463d1aa7e5699 Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Sun, 22 Nov 2009 21:00:15 +0100 Subject: [PATCH] esx: Extend documentation about 'vcenter' and add some about 'auto_answer' --- docs/drvesx.html.in | 52 +++++++++++++++++++++++++++++++++++++++------ src/esx/README | 8 +++---- 2 files changed, 49 insertions(+), 11 deletions(-) diff --git a/docs/drvesx.html.in b/docs/drvesx.html.in index 362659c55f..b7909ff1e3 100644 --- a/docs/drvesx.html.in +++ b/docs/drvesx.html.in @@ -15,7 +15,7 @@ installed on the ESX server. The driver uses version 2.5 of the remote, SOAP based - VMware Virtual Infrastructure API to communicate with the + VMware Virtual Infrastructure API (VI API) to communicate with the ESX server, like the VMware Virtual Infrastructure Client does. Since version 4.0 this API is called @@ -78,11 +78,12 @@ type://[username@]hostname[:port]/[?extraparameters] vcenter - Hostname of a VMware vCenter + Hostname of a VMware vCenter or * In order to perform a migration the driver needs to know the - VMware vCenter for the ESX server. + VMware vCenter for the ESX server. If set to *, + the driver connects to the vCenter known to the ESX server. @@ -97,6 +98,20 @@ type://[username@]hostname[:port]/[?extraparameters] SSL certificate. The default value it 0. + + + auto_answer + + + 0 or 1 + + + If set to 1, the driver answers all + questions with the default answer. + If set to 0, questions are reported as errors. The default + value it 0. + + @@ -120,6 +135,25 @@ type://[username@]hostname[:port]/[?extraparameters]

+

Questions blocking tasks

+

+ Some methods of the VI API start tasks, for example + PowerOnVM_Task(). Such tasks may be blocked by questions + if the ESX server detects an issue with the domain that requires user + interaction. The ESX driver cannot prompt the user to answer a + question, libvirt doesn't have an API for something like this. +

+

+ The VI API provides the AnswerVM() method to + programmatically answer a questions. So the driver has two options + how to handle such a situation: either answer the questions with the + default answer or report the question as an error and cancel the + blocked task if possible. The + auto_answer query parameter + controls the answering behavior. +

+ +

Specialties in the domain XML config

There are several specialties in the domain XML config for ESX domains. @@ -404,8 +438,12 @@ ethernet0.address = "00:50:56:25:48:C7"

Migration

A migration cannot be initiated on an ESX server directly, a VMware - vCenter is necessary for this. The vCenter hostname has to be passed - to the driver via the vcenter query parameter. + vCenter is necessary for this. The vcenter query + parameter must be set either to the hostname or IP address of the + vCenter managing the ESX server or to *. Setting it + to * causes the driver to connect to the vCenter known to + the ESX server. If the ESX server is not managed by a vCenter an error + is reported.

 esx://example.com/?vcenter=example-vcenter.com
@@ -413,11 +451,11 @@ esx://example.com/?vcenter=example-vcenter.com
     

Here an example how to migrate the domain Fedora11 from ESX server example-src.com to ESX server - example-dst.com involving vCenter + example-dst.com implicitly involving vCenter example-vcenter.com using virsh.

-$ virsh -c esx://example-src.com/?vcenter=example-vcenter.com migrate Fedora11 esx://example-dst.com/?vcenter=example-vcenter.com
+$ virsh -c esx://example-src.com/?vcenter=* migrate Fedora11 esx://example-dst.com/?vcenter=*
 Enter username for example-src.com [root]:
 Enter root password for example-src.com:
 Enter username for example-vcenter.com [administrator]:
diff --git a/src/esx/README b/src/esx/README
index 36190547c7..51e49e3950 100644
--- a/src/esx/README
+++ b/src/esx/README
@@ -18,8 +18,8 @@ Automatic question handling
 What is a question in the ESX context?
 --------------------------------------
 
-The VI API contains calls that start tasks, for example PowerOnVM_Task(). Such
-tasks may be blocked by a question if the ESX host detects an issue with the
+The VI API contains methods that start tasks, for example PowerOnVM_Task(). Such
+tasks may be blocked by questions if the ESX host detects an issue with the
 virtual machine that requires user interaction.
 
 An example: If a virtual machine has a serial port that is realized via a file,
@@ -29,8 +29,8 @@ Until this question is answered the power-on task is blocked and the virtual
 machine won't get powered on.
 
 The ESX driver cannot prompt the user to answer a question, libvirt doesn't
-have an API for something like this. The VI API provides a AnswerVM() method to
-programmatically answer such questions. A question comes together with a list
+have an API for something like this. The VI API provides the AnswerVM() method
+to programmatically answer such questions. A question comes together with a list
 of possible answers. One of this answers is marked as the default one. For all
 questions I've seen so far the default answer is always a non-destructive one.