drvesx.html.in 24.3 KB
Newer Older
1 2 3 4 5 6
<html><body>
    <h1>VMware ESX hypervisor driver</h1>
    <ul id="toc"></ul>
    <p>
        The libvirt VMware ESX driver can manage VMware ESX/ESXi 3.5/4.0 and
        VMware GSX 2.0, also called VMware Server 2.0, and possibly later
7 8
        versions. <span class="since">Since 0.8.3</span> the driver can also
        connect to a VMware vCenter 2.5/4.0 (VPX).
9 10 11 12 13
    </p>


    <h2><a name="prereq">Deployment pre-requisites</a></h2>
    <p>
14
        None. Any out-of-the-box installation of VPX/ESX(i)/GSX should work. No
15 16 17 18
        preparations are required on the server side, no libvirtd must be
        installed on the ESX server. The driver uses version 2.5 of the remote,
        SOAP based
        <a href="http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/">
19
        VMware Virtual Infrastructure API</a> (VI API) to communicate with the
20 21
        ESX server, like the VMware Virtual Infrastructure Client (VI client)
        does. Since version 4.0 this API is called
22 23 24 25 26 27 28 29 30
        <a href="http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/">
        VMware vSphere API</a>.
    </p>

    <h2><a name="uri">Connections to the VMware ESX driver</a></h2>
    <p>
        Some example remote connection URIs for the driver are:
    </p>
<pre>
31 32 33 34 35
vpx://example-vcenter.com              (VPX over HTTPS)
esx://example-esx.com                  (ESX over HTTPS)
gsx://example-gsx.com                  (GSX over HTTPS)
esx://example-esx.com/?transport=http  (ESX over HTTP)
esx://example-esx.com/?no_verify=1     (ESX over HTTPS, but doesn't verify the server's SSL certificate)
36
</pre>
37 38 39 40 41 42 43
    <p>
        <strong>Note</strong>: In contrast to other drivers, the ESX driver is
        a client-side-only driver. It connects to the ESX server using HTTP(S).
        Therefore, the <a href="remote.html">remote transport mechanism</a>
        provided by the remote driver and libvirtd will not work, and you
        cannot use URIs like <code>esx+ssh://example.com</code>.
    </p>
44 45 46 47


    <h3><a name="uriformat">URI Format</a></h3>
    <p>
48
        URIs have this general form (<code>[...]</code> marks an optional part).
49 50 51 52 53 54
    </p>
<pre>
type://[username@]hostname[:port]/[?extraparameters]
</pre>
    <p>
        The <code>type://</code> is either <code>esx://</code> or
55 56 57 58 59
        <code>gsx://</code> or <code>vpx://</code> <span class="since">since 0.8.3</span>.
        The driver selects the default port depending on the <code>type://</code>.
        For <code>esx://</code> and <code>vpx://</code> the default HTTPS port
        is 443, for <code>gsx://</code> it is 8333.
        If the port parameter is given, it overrides the default port.
60 61 62 63 64 65
    </p>


    <h4>Extra parameters</h4>
    <p>
        Extra parameters can be added to a URI as part of the query string
66 67 68 69 70 71 72 73 74
        (the part following <code>?</code>). A single parameter is formed by a
        <code>name=value</code> pair. Multiple parameters are separated by
        <code>&amp;</code>.
    </p>
<pre>
?<span style="color: #E50000">no_verify=1</span>&amp;<span style="color: #00B200">auto_answer=1</span>&amp;<span style="color: #0000E5">proxy=socks://example-proxy.com:23456</span>
</pre>
    <p>
        The driver understands the extra parameters shown below.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
    </p>
    <table class="top_table">
        <tr>
            <th>Name</th>
            <th>Values</th>
            <th>Meaning</th>
        </tr>
        <tr>
            <td>
                <code>transport</code>
            </td>
            <td>
                <code>http</code> or <code>https</code>
            </td>
            <td>
90 91 92
                Overrides the default HTTPS transport. For <code>esx://</code>
                and <code>vpx://</code> the default HTTP port is 80, for
                <code>gsx://</code> it is 8222.
93 94 95 96 97 98 99
            </td>
        </tr>
        <tr>
            <td>
                <code>vcenter</code>
            </td>
            <td>
100
                Hostname of a VMware vCenter or <code>*</code>
101 102 103
            </td>
            <td>
                In order to perform a migration the driver needs to know the
104 105
                VMware vCenter for the ESX server. If set to <code>*</code>,
                the driver connects to the vCenter known to the ESX server.
106
                This paramater in useful when connecting to an ESX server only.
107 108 109 110 111 112 113 114 115 116 117 118 119 120
            </td>
        </tr>
        <tr>
            <td>
                <code>no_verify</code>
            </td>
            <td>
                <code>0</code> or <code>1</code>
            </td>
            <td>
                If set to 1, this disables libcurl client checks of the server's
                SSL certificate. The default value it 0.
            </td>
        </tr>
121 122 123 124 125 126 127 128 129 130 131
        <tr>
            <td>
                <code>auto_answer</code>
            </td>
            <td>
                <code>0</code> or <code>1</code>
            </td>
            <td>
                If set to 1, the driver answers all
                <a href="#questions">questions</a> with the default answer.
                If set to 0, questions are reported as errors. The default
M
Matthias Bolte 已提交
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
                value it 0. <span class="since">Since 0.7.5</span>.
            </td>
        </tr>
        <tr>
            <td>
                <code>proxy</code>
            </td>
            <td>
                <code>[type://]hostname[:port]</code>
            </td>
            <td>
                Allows to specify a proxy for HTTP and HTTPS communication.
                <span class="since">Since 0.8.2</span>.
                The optional <code>type</code> part may be one of:
                <code>http</code>, <code>socks</code>, <code>socks4</code>,
                <code>socks4a</code> or <code>socks5</code>. The default is
                <code>http</code> and <code>socks</code> is synonymous for
                <code>socks5</code>. The optional <code>port</code> allows to
                override the default port 1080.
151 152
            </td>
        </tr>
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
    </table>


    <h3><a name="auth">Authentication</a></h3>
    <p>
        In order to perform any useful operation the driver needs to log into
        the ESX server. Therefore, only <code>virConnectOpenAuth</code> can be
        used to connect to an ESX server, <code>virConnectOpen</code> and
        <code>virConnectOpenReadOnly</code> don't work.
        To log into an ESX server or vCenter the driver will request
        credentials using the callback passed to the
        <code>virConnectOpenAuth</code> function. The driver passes the
        hostname as challenge parameter to the callback. This enables the
        callback to distinguish between requests for ESX server and vCenter.
    </p>
    <p>
        <strong>Note</strong>: During the ongoing driver development, testing
        is done using an unrestricted <code>root</code> account. Problems may
        occur if you use a restricted account. Detailed testing with restricted
        accounts has not been done yet.
    </p>


176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
    <h2><a name="questions">Questions blocking tasks</a></h2>
    <p>
        Some methods of the VI API start tasks, for example
        <code>PowerOnVM_Task()</code>. 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.
    </p>
    <p>
        The VI API provides the <code>AnswerVM()</code> 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
        <a href="#uriformat"><code>auto_answer</code></a> query parameter
        controls the answering behavior.
    </p>


195 196 197 198 199
    <h2><a name="xmlspecial">Specialties in the domain XML config</a></h2>
    <p>
        There are several specialties in the domain XML config for ESX domains.
    </p>

200
    <h3><a name="restrictions">Restrictions</h3>
201 202 203 204 205 206 207 208 209 210 211 212 213
    <p>
        There are some restrictions for some values of the domain XML config.
        The driver will complain if this restrictions are violated.
    </p>
    <ul>
        <li>
            Memory size has to be a multiple of 4096
        </li>
        <li>
            Number of virtual CPU has to be 1 or a multiple of 2
        </li>
        <li>
            Valid MAC address prefixes are <code>00:0c:29</code> and
214 215
            <code>00:50:56</code>. <span class="since">Since 0.7.6</span>
            arbitrary <a href="#macaddresses">MAC addresses</a> are supported.
216 217 218 219
        </li>
    </ul>


220
    <h3><a name="datastore">Datastore references</h3>
221 222 223 224 225 226 227 228 229 230 231 232
    <p>
        Storage is managed in datastores. VMware uses a special path format to
        reference files in a datastore. Basically, the datastore name is put
        into squared braces in front of the path.
    </p>
<pre>
[datastore] directory/filename
</pre>
    <p>
        To define a new domain the driver converts the domain XML into a
        VMware VMX file and uploads it to a datastore known to the ESX server.
        Because multiple datastores may be known to an ESX server the driver
233
        needs to decide to which datastore the VMX file should be uploaded.
234 235 236 237 238
        The driver deduces this information from the path of the source of the
        first file-based harddisk listed in the domain XML.
    </p>


239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
    <h3><a name="macaddresses">MAC addresses</h3>
    <p>
        VMware has registered two MAC address prefixes for domains:
        <code>00:0c:29</code> and <code>00:50:56</code>. These prefixes are
        split into ranges for different purposes.
    </p>
    <table class="top_table">
        <tr>
            <th>Range</th>
            <th>Purpose</th>
        </tr>
        <tr>
            <td>
                <code>00:0c:29:00:00:00</code> - <code>00:0c:29:ff:ff:ff</code>
            </td>
            <td>
                An ESX server autogenerates MAC addresses from this range if
                the VMX file doesn't contain a MAC address when trying to start
                a domain.
            </td>
        </tr>
        <tr>
            <td>
                <code>00:50:56:00:00:00</code> - <code>00:50:56:3f:ff:ff</code>
            </td>
            <td>
                MAC addresses from this range can by manually assigned by the
                user in the VI client.
            </td>
        </tr>
        <tr>
            <td>
                <code>00:50:56:80:00:00</code> - <code>00:50:56:bf:ff:ff</code>
            </td>
            <td>
                A VI client autogenerates MAC addresses from this range for
                newly defined domains.
            </td>
        </tr>
    </table>
    <p>
        The VMX files generated by the ESX driver always contain a MAC address,
        because libvirt generates a random one if an interface element in the
        domain XML file lacks a MAC address.
        <span class="since">Since 0.7.6</span> the ESX driver sets the prefix
        for generated MAC addresses to <code>00:0c:29</code>. Before 0.7.6
        the <code>00:50:56</code> prefix was used. Sometimes this resulted in
        the generation of out-of-range MAC address that were rejected by the
        ESX server.
    </p>
    <p>
        Also <span class="since">since 0.7.6</span> every MAC address outside
        this ranges can be used. For such MAC addresses the ESX server-side
        check is disabled in the VMX file to stop the ESX server from rejecting
        out-of-predefined-range MAC addresses.
    </p>
<pre>
ethernet0.checkMACAddress = "false"
</pre>


    <h3><a name="hardware">Available hardware</h3>
301 302 303 304 305 306 307
    <p>
        VMware ESX supports different models of SCSI controllers and network
        cards.
    </p>

    <h4>SCSI controller models</h4>
    <dl>
308 309 310 311 312 313 314 315 316
        <dt><code>auto</code></dt>
        <dd>
            This isn't a actual controller model. If specified the ESX driver
            tries to detect the SCSI controller model referenced in the
            <code>.vmdk</code> file and use it. Autodetection fails when a
            SCSI controller has multiple disks attached and the SCSI controller
            models referenced in the <code>.vmdk</code> files are inconsistent.
            <span class="since">Since 0.8.3</span>
        </dd>
317 318 319 320 321 322 323 324
        <dt><code>buslogic</code></dt>
        <dd>
            BusLogic SCSI controller for older guests.
        </dd>
        <dt><code>lsilogic</code></dt>
        <dd>
            LSI Logic SCSI controller for recent guests.
        </dd>
325 326
        <dt><code>lsisas1068</code></dt>
        <dd>
327 328 329 330 331 332 333
            LSI Logic SAS 1068 controller. <span class="since">Since 0.8.0</span>
        </dd>
        <dt><code>vmpvscsi</code></dt>
        <dd>
            Special VMware Paravirtual SCSI controller, requires VMware tools inside
            the guest. See <a href="http://kb.vmware.com/kb/1010398">VMware KB1010398</a>
            for details. <span class="since">Since 0.8.3</span>
334
        </dd>
335 336 337 338
    </dl>
    <p>
        Here a domain XML snippet:
    </p>
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353
<pre>
    ...
    &lt;disk type='file' device='disk'&gt;
      &lt;source file='[local-storage] Fedora11/Fedora11.vmdk'/&gt;
      &lt;target dev='sda' bus='scsi'/&gt;
      &lt;address type='drive' controller='0' bus='0' unit='0'/&gt;
    &lt;/disk&gt;
    &lt;controller type='scsi' index='0' model='<strong>lsilogic</strong>'/&gt;
    ...
</pre>
    <p>
        The controller element is supported <span class="since">since 0.8.2</span>.
        Prior to this <code>&lt;driver name='lsilogic'/&gt;</code> was abused to
        specify the SCSI controller model. This attribute usage is deprecated now.
    </p>
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370
<pre>
    ...
    &lt;disk type='file' device='disk'&gt;
      &lt;driver name='<strong>lsilogic</strong>'/&gt;
      &lt;source file='[local-storage] Fedora11/Fedora11.vmdk'/&gt;
      &lt;target dev='sda' bus='scsi'/&gt;
    &lt;/disk&gt;
    ...
</pre>


    <h4>Network card models</h4>
    <dl>
        <dt><code>vlance</code></dt>
        <dd>
            AMD PCnet32 network card for older guests.
        </dd>
371
        <dt><code>vmxnet</code>, <code>vmxnet2</code>, <code>vmxnet3</code></dt>
372 373
        <dd>
            Special VMware VMXnet network card, requires VMware tools inside
374 375
            the guest. See <a href="http://kb.vmware.com/kb/1001805">VMware KB1001805</a>
            for details.
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438
        </dd>
        <dt><code>e1000</code></dt>
        <dd>
            Intel E1000 network card for recent guests.
        </dd>
    </dl>
    <p>
        Here a domain XML snippet:
    </p>
<pre>
    ...
    &lt;interface type='bridge'&gt;
      &lt;mac address='00:50:56:25:48:c7'/&gt;
      &lt;source bridge='VM Network'/&gt;
      &lt;model type='<strong>e1000</strong>'/&gt;
    &lt;/interface&gt;
    ...
</pre>


    <h2><a name="importexport">Import and export of domain XML configs</a></h2>
    <p>
        The ESX driver currently supports a native config format known as
        <code>vmware-vmx</code> to handle VMware VMX configs.
    </p>


    <h3><a name="xmlimport">Converting from VMware VMX config to domain XML config</a></h3>
    <p>
        The <code>virsh domxml-from-native</code> provides a way to convert an
        existing VMware VMX config into a domain XML config that can then be
        used by libvirt.
    </p>
<pre>
$ cat &gt; demo.vmx &lt;&lt; EOF
#!/usr/bin/vmware
config.version = "8"
virtualHW.version = "4"
floppy0.present = "false"
nvram = "Fedora11.nvram"
deploymentPlatform = "windows"
virtualHW.productCompatibility = "hosted"
tools.upgrade.policy = "useGlobal"
powerType.powerOff = "default"
powerType.powerOn = "default"
powerType.suspend = "default"
powerType.reset = "default"
displayName = "Fedora11"
extendedConfigFile = "Fedora11.vmxf"
scsi0.present = "true"
scsi0.sharedBus = "none"
scsi0.virtualDev = "lsilogic"
memsize = "1024"
scsi0:0.present = "true"
scsi0:0.fileName = "/vmfs/volumes/498076b2-02796c1a-ef5b-000ae484a6a3/Fedora11/Fedora11.vmdk"
scsi0:0.deviceType = "scsi-hardDisk"
ide0:0.present = "true"
ide0:0.clientDevice = "true"
ide0:0.deviceType = "cdrom-raw"
ide0:0.startConnected = "false"
ethernet0.present = "true"
ethernet0.networkName = "VM Network"
ethernet0.addressType = "vpx"
439
ethernet0.generatedAddress = "00:50:56:91:48:c7"
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481
chipset.onlineStandby = "false"
guestOSAltName = "Red Hat Enterprise Linux 5 (32-Bit)"
guestOS = "rhel5"
uuid.bios = "50 11 5e 16 9b dc 49 d7-f1 71 53 c4 d7 f9 17 10"
snapshot.action = "keep"
sched.cpu.min = "0"
sched.cpu.units = "mhz"
sched.cpu.shares = "normal"
sched.mem.minsize = "0"
sched.mem.shares = "normal"
toolScripts.afterPowerOn = "true"
toolScripts.afterResume = "true"
toolScripts.beforeSuspend = "true"
toolScripts.beforePowerOff = "true"
scsi0:0.redo = ""
tools.syncTime = "false"
uuid.location = "56 4d b5 06 a2 bd fb eb-ae 86 f7 d8 49 27 d0 c4"
sched.cpu.max = "unlimited"
sched.swap.derivedName = "/vmfs/volumes/498076b2-02796c1a-ef5b-000ae484a6a3/Fedora11/Fedora11-7de040d8.vswp"
tools.remindInstall = "TRUE"
EOF

$ virsh -c esx://example.com domxml-from-native vmware-vmx demo.vmx
Enter username for example.com [root]:
Enter root password for example.com:
&lt;domain type='vmware'&gt;
  &lt;name&gt;Fedora11&lt;/name&gt;
  &lt;uuid&gt;50115e16-9bdc-49d7-f171-53c4d7f91710&lt;/uuid&gt;
  &lt;memory&gt;1048576&lt;/memory&gt;
  &lt;currentMemory&gt;1048576&lt;/currentMemory&gt;
  &lt;vcpu&gt;1&lt;/vcpu&gt;
  &lt;os&gt;
    &lt;type arch='i686'&gt;hvm&lt;/type&gt;
  &lt;/os&gt;
  &lt;clock offset='utc'/&gt;
  &lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;
  &lt;on_reboot&gt;restart&lt;/on_reboot&gt;
  &lt;on_crash&gt;destroy&lt;/on_crash&gt;
  &lt;devices&gt;
    &lt;disk type='file' device='disk'&gt;
      &lt;source file='[local-storage] Fedora11/Fedora11.vmdk'/&gt;
      &lt;target dev='sda' bus='scsi'/&gt;
482
      &lt;address type='drive' controller='0' bus='0' unit='0'/&gt;
483
    &lt;/disk&gt;
484
    &lt;controller type='scsi' index='0' model='lsilogic'/&gt;
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513
    &lt;interface type='bridge'&gt;
      &lt;mac address='00:50:56:91:48:c7'/&gt;
      &lt;source bridge='VM Network'/&gt;
    &lt;/interface&gt;
  &lt;/devices&gt;
&lt;/domain&gt;
</pre>


    <h3><a name="xmlexport">Converting from domain XML config to VMware VMX config</a></h3>
    <p>
      The <code>virsh domxml-to-native</code> provides a way to convert a
      domain XML config into a VMware VMX config.
    </p>
<pre>
$ cat &gt; demo.xml &lt;&lt; EOF
&lt;domain type='vmware'&gt;
  &lt;name&gt;Fedora11&lt;/name&gt;
  &lt;uuid&gt;50115e16-9bdc-49d7-f171-53c4d7f91710&lt;/uuid&gt;
  &lt;memory&gt;1048576&lt;/memory&gt;
  &lt;currentMemory&gt;1048576&lt;/currentMemory&gt;
  &lt;vcpu&gt;1&lt;/vcpu&gt;
  &lt;os&gt;
    &lt;type arch='x86_64'&gt;hvm&lt;/type&gt;
  &lt;/os&gt;
  &lt;devices&gt;
    &lt;disk type='file' device='disk'&gt;
      &lt;source file='[local-storage] Fedora11/Fedora11.vmdk'/&gt;
      &lt;target dev='sda' bus='scsi'/&gt;
514
      &lt;address type='drive' controller='0' bus='0' unit='0'/&gt;
515
    &lt;/disk&gt;
516
    &lt;controller type='scsi' index='0' model='lsilogic'/&gt;
517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564
    &lt;interface type='bridge'&gt;
      &lt;mac address='00:50:56:25:48:c7'/&gt;
      &lt;source bridge='VM Network'/&gt;
    &lt;/interface&gt;
  &lt;/devices&gt;
&lt;/domain&gt;
EOF

$ virsh -c esx://example.com domxml-to-native vmware-vmx demo.xml
Enter username for example.com [root]:
Enter root password for example.com:
config.version = "8"
virtualHW.version = "4"
guestOS = "other-64"
uuid.bios = "50 11 5e 16 9b dc 49 d7-f1 71 53 c4 d7 f9 17 10"
displayName = "Fedora11"
memsize = "1024"
numvcpus = "1"
scsi0.present = "true"
scsi0.virtualDev = "lsilogic"
scsi0:0.present = "true"
scsi0:0.deviceType = "scsi-hardDisk"
scsi0:0.fileName = "/vmfs/volumes/local-storage/Fedora11/Fedora11.vmdk"
ethernet0.present = "true"
ethernet0.networkName = "VM Network"
ethernet0.connectionType = "bridged"
ethernet0.addressType = "static"
ethernet0.address = "00:50:56:25:48:C7"
</pre>


    <h2><a name="xmlconfig">Example domain XML configs</a></h2>

    <h3>Fedora11 on x86_64</h3>
<pre>
&lt;domain type='vmware'&gt;
  &lt;name&gt;Fedora11&lt;/name&gt;
  &lt;uuid&gt;50115e16-9bdc-49d7-f171-53c4d7f91710&lt;/uuid&gt;
  &lt;memory&gt;1048576&lt;/memory&gt;
  &lt;currentMemory&gt;1048576&lt;/currentMemory&gt;
  &lt;vcpu&gt;1&lt;/vcpu&gt;
  &lt;os&gt;
    &lt;type arch='x86_64'&gt;hvm&lt;/type&gt;
  &lt;/os&gt;
  &lt;devices&gt;
    &lt;disk type='file' device='disk'&gt;
      &lt;source file='[local-storage] Fedora11/Fedora11.vmdk'/&gt;
      &lt;target dev='sda' bus='scsi'/&gt;
565
      &lt;address type='drive' controller='0' bus='0' unit='0'/&gt;
566
    &lt;/disk&gt;
567
    &lt;controller type='scsi' index='0'/&gt;
568 569 570 571 572 573 574 575 576 577 578 579
    &lt;interface type='bridge'&gt;
      &lt;mac address='00:50:56:25:48:c7'/&gt;
      &lt;source bridge='VM Network'/&gt;
    &lt;/interface&gt;
  &lt;/devices&gt;
&lt;/domain&gt;
</pre>


    <h2><a name="migration">Migration</a></h2>
    <p>
        A migration cannot be initiated on an ESX server directly, a VMware
580 581 582 583 584 585
        vCenter is necessary for this. The <code>vcenter</code> query
        parameter must be set either to the hostname or IP address of the
        vCenter managing the ESX server or to <code>*</code>. Setting it
        to <code>*</code> 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.
586 587 588 589 590 591 592
    </p>
<pre>
esx://example.com/?vcenter=example-vcenter.com
</pre>
    <p>
        Here an example how to migrate the domain <code>Fedora11</code> from
        ESX server <code>example-src.com</code> to ESX server
593
        <code>example-dst.com</code> implicitly involving vCenter
594 595 596
        <code>example-vcenter.com</code> using <code>virsh</code>.
    </p>
<pre>
597
$ virsh -c esx://example-src.com/?vcenter=* migrate Fedora11 esx://example-dst.com/?vcenter=*
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672
Enter username for example-src.com [root]:
Enter root password for example-src.com:
Enter username for example-vcenter.com [administrator]:
Enter administrator password for example-vcenter.com:
Enter username for example-dst.com [root]:
Enter root password for example-dst.com:
Enter username for example-vcenter.com [administrator]:
Enter administrator password for example-vcenter.com:
</pre>


    <h2><a name="scheduler">Scheduler configuration</a></h2>
    <p>
        The driver exposes the ESX CPU scheduler. The parameters listed below
        are available to control the scheduler.
    </p>
    <dl>
        <dt><code>reservation</code></dt>
        <dd>
            The amount of CPU resource in MHz that is guaranteed to be
            available to the domain. Valid values are 0 and greater.
        </dd>
        <dt><code>limit</code></dt>
        <dd>
            The CPU utilization of the domain will be
            limited to this value in MHz, even if more CPU resources are
            available. If the limit is set to -1, the CPU utilization of the
            domain is unlimited. If the limit is not set to -1, it must be
            greater than or equal to the reservation.
        </dd>
        <dt><code>shares</code></dt>
        <dd>
            Shares are used to determine relative CPU
            allocation between domains. In general, a domain with more shares
            gets proportionally more of the CPU resource. Valid values are 0
            and greater. The special values -1, -2 and -3 represent the
            predefined shares level <code>low</code>, <code>normal</code> and
            <code>high</code>.
        </dd>
    </dl>


    <h2><a name="tools">VMware tools</a></h2>
    <p>
        Some actions require installed VMware tools. If the VMware tools are
        not installed in the guest and one of the actions below is to be
        performed the ESX server raises an error and the driver reports it.
    </p>
    <ul>
        <li>
            <code>virDomainReboot</code>
        </li>
        <li>
            <code>virDomainShutdown</code>
        </li>
    </ul>


    <h2><a name="links">Links</a></h2>
    <ul>
        <li>
            <a href="http://www.vmware.com/support/developer/vc-sdk/">
                VMware vSphere Web Services SDK Documentation
            </a>
        </li>
        <li>
            <a href="http://www.vmware.com/pdf/esx3_memory.pdf">
                The Role of Memory in VMware ESX Server 3
            </a>
        </li>
        <li>
            <a href="http://www.sanbarrow.com/vmx.html">
                VMware VMX config parameters
            </a>
        </li>
673 674 675 676 677
        <li>
            <a href="http://www.vmware.com/pdf/vsp_4_pvscsi_perf.pdf">
                VMware ESX 4.0 PVSCSI Storage Performance
            </a>
        </li>
678 679
    </ul>
</body></html>