Difference between revisions of "XAPI Command Line Interface"

From Xen
m (moved Command Line Interface to XCP Command Line Interface: Confusion with Xen)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!-- MoinMoin name: Command_Line_Interface -->
 
<!-- Comment: -->
 
 
<!-- WikiMedia name: Command Line Interface -->
 
<!-- WikiMedia name: Command Line Interface -->
<!-- Page revision: 00000004 -->
 
<!-- Original date: Sat Oct 8 16:50:56 2011 (1318092656000000) -->
 
   
  +
== XAPI Command Line Interface ==
__NOTOC__
 
<!-- ## Please edit system and help pages ONLY in the moinmaster wiki! For more -->
 
<!-- ## information, please see [[MoinMaster]]:[[MoinPagesEditorGroup]]. -->
 
<!-- ##master-page:[[Category:Template]] -->
 
<!-- ##master-date:Unknown-Date -->
 
<!-- #format wiki -->
 
<!-- #language en -->
 
== XCP Command Line Interface ==
 
   
 
=== XE Basics ===
 
=== XE Basics ===
   
The xapi toolstack includes a powerful command-line interface (“xe”) which talks to both hosts and Resource Pools over https, invoking XenAPI operations over XMLRPC. Commands may be issued both from within domain zero (xe is on the $PATH by default) and from remote hosts. For users of the bash shell extensive tab completion is available, greatly increasing usability. Please refer to the “Xen Cloud Platform Administrator Guide”, chapter 8 on page 123 for more information and details on each of the xe commands.
+
The XAPI toolstack includes a powerful command-line interface "xe" which talks to both hosts and Resource Pools over https, invoking XenAPI operations over XMLRPC. Commands may be issued both from within domain zero (xe is on the $PATH by default) and from remote hosts. For users of the bash shell extensive tab completion is available, greatly increasing usability. Please refer to the "Xen Cloud Platform Administrator Guide", chapter 8 on page 123 for more information and details on each of the xe commands.
   
 
For installing the 'xe' CLI on another Linux box, see [[XCP Install CLI]]
 
For installing the 'xe' CLI on another Linux box, see [[XCP Install CLI]]
Line 23: Line 12:
 
When run from domain zero:
 
When run from domain zero:
   
xe <command-name> <argument=value>*
+
<pre>xe <command-name> <argument=value>*</pre>
   
 
When run from another host:
 
When run from another host:
   
xe –s <host> -u <username> -pw <password> <command-name> <argument=value>*
+
<pre>xe -s <host> -u <username> -pw <password> <command-name> <argument=value>*</pre>
   
Note:
+
'''Note:'''
   
With any command, hitting the “Tab” key on a keyboard will list out any options available for a particular command as well as complete command syntax. Values containing spaces should be enclosed with double-quotes.
+
* With any command, hitting the "Tab" key on a keyboard will list out any options available for a particular command as well as complete command syntax. Values containing spaces should be enclosed with double-quotes.
   
 
==== Common Commands ====
 
==== Common Commands ====
Line 37: Line 26:
 
'''List CD/ISO'''
 
'''List CD/ISO'''
   
<!-- #xe cd-list -->
+
<pre> #xe cd-list </pre>
   
 
'''Power on VM'''
 
'''Power on VM'''
   
<!-- #xe vm-start vm=<target VM name> -->
+
<pre> #xe vm-start vm=<target VM name> </pre>
   
 
'''Mount an ISO'''
 
'''Mount an ISO'''
   
<!-- # xe vm-cd-insert cd-name=<name of ISO or CD> vm=<target VM name> -->
+
<pre> #xe vm-cd-insert cd-name=<name of ISO or CD> vm=<target VM name> </pre>
   
 
'''Show list of VMs on host'''
 
'''Show list of VMs on host'''
   
<!-- #xe vm-list -->
+
<pre> #xe vm-list </pre>
   
 
'''List SRs'''
 
'''List SRs'''
   
<!-- # xe sr-list -->
+
<pre> #xe sr-list </pre>
   
 
'''Delete/Destroy VM on host'''
 
'''Delete/Destroy VM on host'''
   
<!-- # xe vm-destroy uuid=<UUID of target VM> -->
+
<pre> #xe vm-destroy uuid=<UUID of target VM> </pre>
   
 
'''Create Storage Repository'''
 
'''Create Storage Repository'''
   
<!-- #xe sr-create name-label=<name> physical-size=<size> type=<type> content-type=<content_type> device-config:<config_name>=<value> [host-uuid=<Xen Cloud Platform host UUID>] [shared=<true | false>] -->
+
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word"> #xe sr-create name-label=<name> physical-size=<size> type=<type> content-type=<content_type> device-config:<config_name>=<value> [host-uuid=<Xen Cloud Platform host UUID>] [shared=<true | false>] </pre>
   
 
'''Destroy Storage Repository'''
 
'''Destroy Storage Repository'''
   
<!-- #xe sr-destroy uuid=<sr_uuid> -->
+
<pre> #xe sr-destroy uuid=<sr_uuid> </pre>
   
 
==== Common Host (Xen Cloud Platform host) Commands ====
 
==== Common Host (Xen Cloud Platform host) Commands ====
Line 71: Line 60:
 
'''List Host in Pool'''
 
'''List Host in Pool'''
   
<!-- #xe host-list -->
+
<pre> #xe host-list </pre>
   
 
'''Enable a Xen Cloud Platform Host'''
 
'''Enable a Xen Cloud Platform Host'''
   
<!-- #xe host-enable [<host-selector>=<host_selector_value>...] -->
+
<pre> #xe host-enable [<host-selector>=<host_selector_value>...] </pre>
   
 
'''Reboot a Xen Cloud Platform Host'''
 
'''Reboot a Xen Cloud Platform Host'''
   
<!-- #xe host-reboot [<host-selector>=<host_selector_value>...] -->
+
<pre> #xe host-reboot [<host-selector>=<host_selector_value>...] </pre>
   
 
'''Shutdown a Xen Cloud Platform Host'''
 
'''Shutdown a Xen Cloud Platform Host'''
   
<!-- #xe host-shutdown [<host-selector>=<host_selector_value>...] -->
+
<pre> #xe host-shutdown [<host-selector>=<host_selector_value>...] </pre>
   
 
=== Virtual Machine Examples ===
 
=== Virtual Machine Examples ===
Line 93: Line 82:
   
 
==== Debian Lenny 5.0 Example ====
 
==== Debian Lenny 5.0 Example ====
  +
{{Warning|This example needs fixing as a) Lenny is not supported any more and b) the ftp path is wrong. See [http://lists.xen.org/archives/html/xen-api/2012-06/msg00115.html]. The following appears to work for Squeeze: <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word">
  +
#xe vm-install template=Debian\ Squeeze\ 6.0\ \(32-bit\) new-name-label=myVM
  +
#xe vm-param-set uuid=f4eb1c90-104d-2799-4dcb-460bda88d7f0 other-config:install-repository=http://ftp.debian.org/debian/
  +
#xe vif-create network-uuid=f7a15534-ec1d-ca62-013c-38df645fa706 vm-uuid=f4eb1c90-104d-2799-4dcb-460bda88d7f0 device=0
  +
#xe vm-start vm=myVM
  +
#xl console myVM]</pre>}}
  +
* Download the lenny.xva from http://www.xen.org/files/XenCloud/Software/lenny.xva, saving to location where running the xe command line, either in domain zero or some other host.
   
  +
* Import lenny.xva to your Xen Cloud Platform host:
# Download the lenny.xva from http://www.xen.org/files/XenCloud/Software/lenny.xva, saving to location where running the xe command line, either in domain zero or some other host.
 
  +
{{Indent|content=<pre>#xe vm-import filename=lenny.xva</pre>|width=20px}}
# Import lenny.xva to your Xen Cloud Platform host:
 
#* '''a)''' # xe vm-import filename=lenny.xva
 
# Create a VM based on the Lenny template:
 
#* '''a)''' # xe vm-install template=Debian\ Lenny\ 5.0 new-name-label=<name of VM>
 
   
  +
* Create a VM based on the Lenny template:
b. Note the UUID output.
 
  +
{{Indent|content=<pre>#xe vm-install template=Debian\ Lenny\ 5.0 new-name-label=<name of VM></pre>|width=20px}}
  +
{{Indent|content=Note the UUID output.<br/><br/>|width=20px}}
   
# Set other-config to point to your Debian repository:
+
* Set other-config to point to your Debian repository:
#* '''a)''' # xe vm-param-set uuid=<uuid of new VM> other-config:install-repository=http://ftp.debian.org/
+
{{Indent|content=<pre># xe vm-param-set uuid=<uuid of new VM> other-config:install-repository=http://ftp.debian.org/</pre>|width=20px}}
# Identify the target network interface.
 
#* '''a)''' #xe network-list
 
   
  +
* Identify the target network interface.
b. Note the uuid of xenbr desired for use (xenbr<N> corresponds to NIC<N>)
 
  +
{{Indent|content=<pre>#xe network-list</pre>|width=20px}}
  +
{{Indent|content=Note the uuid of xenbr desired for use (xenbr '''corresponds to NIC''')<br/><br/>|width=20px}}
   
# Add a VIF on an appropriate network:
+
* Add a VIF on an appropriate network:
#* '''a)''' #xe vif-create network-uuid=<network uuid from above> vm-uuid=<uuid of new VM> device=0
+
{{Indent|content=<pre>#xe vif-create network-uuid=<network uuid from above> vm-uuid=<uuid of new VM> device=0</pre>|width=20px}}
  +
{{Indent|content=Note the uuid output of the new VIF.<br/><br/>|width=20px}}
   
  +
* Start the VM, then go to its console and the Debian installer should be running and ready to install on the guest.
b. Note the uuid output of the new VIF.
 
  +
{{Indent|content=<pre># xe vm-start vm=<name of VM></pre>|width=20px}}
 
# Start the VM, then go to its console and the Debian installer should be running and ready to install on the guest.
 
#* '''a)''' # xe vm-start vm=<name of VM>
 
   
 
==== General VM Example ====
 
==== General VM Example ====
  +
* Create a VM based on a base template:
 
  +
{{Indent|content=<pre># xe vm-install template=<name of target template> new-name-label=<name of VM></pre>|width=20px}}
# Create a VM based on a base template:
 
  +
{{Indent|content=Note the UUID output.<br/><br/>|width=20px}}
#* '''a)''' # xe vm-install template=<name of target template> new-name-label=<name of VM>
 
  +
* Identify the target network interface.
 
  +
{{Indent|content=<pre>#xe network-list</pre>|width=20px}}
b. Note the UUID output.
 
  +
{{Indent|content=Note the uuid of xenbr desired for use<br/><br/>|width=20px}}
 
  +
* Add a VIF on an appropriate network (use xe network-list to find the list of networks):
# Identify the target network interface.
 
  +
{{Indent|content=<pre>#xe vif-create network-uuid=<network uuid from above> vm-uuid=<uuid of new VM> device=0</pre>|width=20px}}
#* '''a)''' #xe network-list
 
  +
{{Indent|content=Note the uuid output of the new VIF.<br/><br/>|width=20px}}
 
  +
* View the CD list attached the host
b. Note the uuid of xenbr desired for use
 
  +
{{Indent|content=<pre># xe cd-list</pre>|width=20px}}
 
  +
{{Indent|content=Note the name label<br/><br/>|width=20px}}
# Add a VIF on an appropriate network (use xe network-list to find the list of networks):
 
  +
* Add a new virtual CD to the selected VM
#* '''a)''' #xe vif-create network-uuid=<network uuid from above> vm-uuid=<uuid of new VM> device=0
 
  +
{{Indent|content=<pre># xe vm-cd-add cd-name=<CDRom name label> vm=<name of new VM> device=<integer not used></pre>|width=20px}}
 
  +
* Lists CDs attached to the specified VMs.
b. Note the uuid output of the new VIF.
 
  +
{{Indent|content=<pre>#xe vm-cd-list vm=<name of new VM></pre>|width=20px}}
 
  +
* Start the VM, then go to its console and the CD based OS installer should be running and ready to install on the guest.
# View the CD list attached the host
 
  +
{{Indent|content=<pre># xe vm-start uuid=<uuid of new VM></pre>|width=20px}}
#* '''a)''' # xe cd-list
 
 
b. Note the name label
 
 
# Add a new virtual CD to the selected VM
 
#* '''a)''' xe vm-cd-add cd-name=<CDRom name label> vm=<name of new VM> device=<integer not used>
 
# Lists CDs attached to the specified VMs.
 
#* '''a)''' #xe vm-cd-list vm=<name of new VM>
 
# Start the VM, then go to its console and the CD based OS installer should be running and ready to install on the guest.
 
#* '''a)''' # xe vm-start uuid=<uuid of new VM>
 
   
 
=== Developer XAPI Viewer (with Console) ===
 
=== Developer XAPI Viewer (with Console) ===
Line 157: Line 142:
   
 
# Open up a web browser.
 
# Open up a web browser.
#* '''a)''' Firefox 3.5.3 and Java 6 Update 15 (build 1.6.0_15-b03)
+
#* Firefox 3.5.3 and Java 6 Update 15 (build 1.6.0_15-b03)
  +
#* Chrome 3.0.195.27 and Java 6 Update 15 (build 1.6.0_15-b03)
 
b. Chrome 3.0.195.27 and Java 6 Update 15 (build 1.6.0_15-b03)
 
 
 
# Type the IP of your host into the URL bar and connect.
 
# Type the IP of your host into the URL bar and connect.
# Type in the user name and password of your XCP host connection.
+
# Type in the user name and password of your XAPI host connection.
 
# The list of XenAPI classes will appear.
 
# The list of XenAPI classes will appear.
# Click on the “Console” class and your list of running virtual machines will appear.
+
# Click on the "Console" class and your list of running virtual machines will appear.
 
# Click on the target virtual machine and virtual machine properties will appear.
 
# Click on the target virtual machine and virtual machine properties will appear.
# Click on “Start” to boot the virtual machine.
+
# Click on "Start" to boot the virtual machine.
   
 
==== Console Connections ====
 
==== Console Connections ====
   
 
# Open up a web browser.
 
# Open up a web browser.
#* '''a)''' Firefox 3.5.3 and Java 6 Update 15 (build 1.6.0_15-b03)
+
#* Firefox 3.5.3 and Java 6 Update 15 (build 1.6.0_15-b03)
  +
#* Chrome 3.0.195.27 and Java 6 Update 15 (build 1.6.0_15-b03)
 
b. Chrome 3.0.195.27 and Java 6 Update 15 (build 1.6.0_15-b03)
 
 
 
# Type the IP of your host into the URL bar and connect.
 
# Type the IP of your host into the URL bar and connect.
# Type in the user name and password of your XCP host connection.
+
# Type in the user name and password of your XAPI host connection.
 
# The list of XenAPI classes will appear.
 
# The list of XenAPI classes will appear.
# Click on the “Console” class and your list of running virtual machines will appear.
+
# Click on the "Console" class and your list of running virtual machines will appear.
 
# Click on the target virtual machine and the console windows will open (requires Java).
 
# Click on the target virtual machine and the console windows will open (requires Java).
# Click “Undock” to get a better console view of the virtual machine.
+
# Click "Undock" to get a better console view of the virtual machine.
   
 
==== Shutdown/Restart Options for a Virtual Machine ====
 
==== Shutdown/Restart Options for a Virtual Machine ====
   
 
# Open up a web browser.
 
# Open up a web browser.
#* '''a)''' Firefox 3.5.3 and Java 6 Update 15 (build 1.6.0_15-b03)
+
#* Firefox 3.5.3 and Java 6 Update 15 (build 1.6.0_15-b03)
  +
#* Chrome 3.0.195.27 and Java 6 Update 15 (build 1.6.0_15-b03)
 
b. Chrome 3.0.195.27 and Java 6 Update 15 (build 1.6.0_15-b03)
 
 
 
# Type the IP of your host into the URL bar and connect.
 
# Type the IP of your host into the URL bar and connect.
# Type in the user name and password of your XCP host connection.
+
# Type in the user name and password of your XAPI host connection.
 
# The list of XenAPI classes will appear.
 
# The list of XenAPI classes will appear.
# Click on the “Console” class and your list of running virtual machines will appear.
+
# Click on the "Console" class and your list of running virtual machines will appear.
 
# Click on the target virtual machine and virtual machine properties will appear.
 
# Click on the target virtual machine and virtual machine properties will appear.
 
# Click on any of the following options
 
# Click on any of the following options
#* '''a)''' '''clean_reboot''' to reboot the virtual machine properly leveraging the underlying operating system. This requires the VM to have the PV drivers/ guest tools installed.
+
#* '''clean_reboot''' to reboot the virtual machine properly leveraging the underlying operating system. This requires the VM to have the PV drivers/ guest tools installed.
  +
#* '''clean_shutdown''' to shutdown reboot the virtual machine properly leveraging the underlying operating system. This requires the VM to have the PV drivers/ guest tools installed.
 
b. '''clean_shutdown''' to shutdown reboot the virtual machine properly leveraging the underlying operating system. This requires the VM to have the PV drivers/ guest tools installed.
+
#* '''hard_reboot''' to force reboot the virtual machine.
  +
#* '''hard_shutdown''' to force shutdown reboot the virtual machine.
 
c. '''hard_reboot''' to force reboot the virtual machine.
 
 
d. '''hard_shutdown''' to force shutdown reboot the virtual machine.
 
   
 
=== Install the PV Drivers on a Windows Virtual Machine ===
 
=== Install the PV Drivers on a Windows Virtual Machine ===
   
# Log onto the host console (e.g. via ssh)
+
* Log onto the host console (e.g. via ssh)
# Run the following xe command:
+
* Run the following xe command:
#* '''a)''' # xe vm-cd-eject vm=<target VM name>
+
{{Indent|content=<pre># xe vm-cd-eject vm=<target VM name></pre>|width=20px}}
  +
{{Indent|content=<pre># xe vm-cd-insert cd-name=xs-tools.iso vm=<target VM name></pre>|width=20px}}
 
  +
{{Indent|content=NOTE: VM can be either off or booted.<br/><br/>|width=20px}}
b. # xe vm-cd-insert cd-name=xs-tools.iso vm=<target VM name>
 
  +
* Install the PV Drivers leveraging the console feature available in the XAPI Viewer tool.
 
c. NOTE: VM can be either off or booted.
 
 
# Install the PV Drivers leveraging the console feature available in the XAPI Viewer tool.
 
   
 
[[Category:XCP]]
 
[[Category:XCP]]
 
[[Category:Users]]
 
[[Category:Users]]
 
[[Category:Beginners]]
 
[[Category:Beginners]]
  +
[[Category:XAPI]]

Latest revision as of 20:50, 25 June 2014


XAPI Command Line Interface

XE Basics

The XAPI toolstack includes a powerful command-line interface "xe" which talks to both hosts and Resource Pools over https, invoking XenAPI operations over XMLRPC. Commands may be issued both from within domain zero (xe is on the $PATH by default) and from remote hosts. For users of the bash shell extensive tab completion is available, greatly increasing usability. Please refer to the "Xen Cloud Platform Administrator Guide", chapter 8 on page 123 for more information and details on each of the xe commands.

For installing the 'xe' CLI on another Linux box, see XCP Install CLI

Basic xe Syntax

When run from domain zero:

xe <command-name> <argument=value>*

When run from another host:

xe -s <host> -u <username> -pw <password> <command-name> <argument=value>*

Note:

  • With any command, hitting the "Tab" key on a keyboard will list out any options available for a particular command as well as complete command syntax. Values containing spaces should be enclosed with double-quotes.

Common Commands

List CD/ISO

 #xe cd-list 

Power on VM

 #xe vm-start vm=<target VM name> 

Mount an ISO

 #xe vm-cd-insert cd-name=<name of ISO or CD> vm=<target VM name> 

Show list of VMs on host

 #xe vm-list 

List SRs

 #xe sr-list 

Delete/Destroy VM on host

 #xe vm-destroy uuid=<UUID of target VM> 

Create Storage Repository

 #xe sr-create name-label=<name> physical-size=<size> type=<type> content-type=<content_type> device-config:<config_name>=<value> [host-uuid=<Xen Cloud Platform host UUID>] [shared=<true | false>] 

Destroy Storage Repository

 #xe sr-destroy uuid=<sr_uuid> 

Common Host (Xen Cloud Platform host) Commands

List Host in Pool

 #xe host-list 

Enable a Xen Cloud Platform Host

 #xe host-enable [<host-selector>=<host_selector_value>...] 

Reboot a Xen Cloud Platform Host

 #xe host-reboot [<host-selector>=<host_selector_value>...] 

Shutdown a Xen Cloud Platform Host

 #xe host-shutdown [<host-selector>=<host_selector_value>...] 

Virtual Machine Examples

This is a simple overview of a two easy was to get a Xen Cloud Platform host up and running with a virtual machine. Two examples will be provided:

  1. Debian Lenny 5.0 VM: Install and configure a Debian based VM using a network repository leveraging the xe command line interface.
  2. General VM: Install and configure a VM leveraging the local CDRom of the host and the xe commend line interface.

Debian Lenny 5.0 Example

Icon Ambox.png This example needs fixing as a) Lenny is not supported any more and b) the ftp path is wrong. See [1]. The following appears to work for Squeeze:
#xe vm-install template=Debian\ Squeeze\ 6.0\ \(32-bit\) new-name-label=myVM
#xe vm-param-set uuid=f4eb1c90-104d-2799-4dcb-460bda88d7f0 other-config:install-repository=http://ftp.debian.org/debian/
#xe vif-create network-uuid=f7a15534-ec1d-ca62-013c-38df645fa706 vm-uuid=f4eb1c90-104d-2799-4dcb-460bda88d7f0 device=0
#xe vm-start vm=myVM
#xl console myVM]
  • Import lenny.xva to your Xen Cloud Platform host:
#xe vm-import filename=lenny.xva
  • Create a VM based on the Lenny template:
#xe vm-install template=Debian\ Lenny\ 5.0 new-name-label=<name of VM>
Note the UUID output.

  • Set other-config to point to your Debian repository:
# xe vm-param-set uuid=<uuid of new VM> other-config:install-repository=http://ftp.debian.org/
  • Identify the target network interface.
#xe network-list
Note the uuid of xenbr desired for use (xenbr corresponds to NIC)

  • Add a VIF on an appropriate network:
#xe vif-create network-uuid=<network uuid from above>  vm-uuid=<uuid of new VM> device=0
Note the uuid output of the new VIF.

  • Start the VM, then go to its console and the Debian installer should be running and ready to install on the guest.
# xe vm-start vm=<name of VM>

General VM Example

  • Create a VM based on a base template:
# xe vm-install template=<name of target template> new-name-label=<name of  VM>
Note the UUID output.

  • Identify the target network interface.
#xe network-list
Note the uuid of xenbr desired for use

  • Add a VIF on an appropriate network (use xe network-list to find the list of networks):
#xe vif-create network-uuid=<network uuid from above>  vm-uuid=<uuid of new VM> device=0
Note the uuid output of the new VIF.

  • View the CD list attached the host
# xe cd-list
Note the name label

  • Add a new virtual CD to the selected VM
# xe vm-cd-add cd-name=<CDRom name label> vm=<name of new VM> device=<integer not used>
  • Lists CDs attached to the specified VMs.
#xe vm-cd-list vm=<name of new VM>
  • Start the VM, then go to its console and the CD based OS installer should be running and ready to install on the guest.
# xe vm-start uuid=<uuid of new VM>

Developer XAPI Viewer (with Console)

The Developer XAPI view tool is a simple way to view the various XAPI commands in a simple GUI, but also do things like:

  • Start a virtual machine
  • Connect to a virtual machine via a Java console
  • Shutdown a virtual machine

Start a Virtual Machine

  1. Open up a web browser.
    • Firefox 3.5.3 and Java 6 Update 15 (build 1.6.0_15-b03)
    • Chrome 3.0.195.27 and Java 6 Update 15 (build 1.6.0_15-b03)
  2. Type the IP of your host into the URL bar and connect.
  3. Type in the user name and password of your XAPI host connection.
  4. The list of XenAPI classes will appear.
  5. Click on the "Console" class and your list of running virtual machines will appear.
  6. Click on the target virtual machine and virtual machine properties will appear.
  7. Click on "Start" to boot the virtual machine.

Console Connections

  1. Open up a web browser.
    • Firefox 3.5.3 and Java 6 Update 15 (build 1.6.0_15-b03)
    • Chrome 3.0.195.27 and Java 6 Update 15 (build 1.6.0_15-b03)
  2. Type the IP of your host into the URL bar and connect.
  3. Type in the user name and password of your XAPI host connection.
  4. The list of XenAPI classes will appear.
  5. Click on the "Console" class and your list of running virtual machines will appear.
  6. Click on the target virtual machine and the console windows will open (requires Java).
  7. Click "Undock" to get a better console view of the virtual machine.

Shutdown/Restart Options for a Virtual Machine

  1. Open up a web browser.
    • Firefox 3.5.3 and Java 6 Update 15 (build 1.6.0_15-b03)
    • Chrome 3.0.195.27 and Java 6 Update 15 (build 1.6.0_15-b03)
  2. Type the IP of your host into the URL bar and connect.
  3. Type in the user name and password of your XAPI host connection.
  4. The list of XenAPI classes will appear.
  5. Click on the "Console" class and your list of running virtual machines will appear.
  6. Click on the target virtual machine and virtual machine properties will appear.
  7. Click on any of the following options
    • clean_reboot to reboot the virtual machine properly leveraging the underlying operating system. This requires the VM to have the PV drivers/ guest tools installed.
    • clean_shutdown to shutdown reboot the virtual machine properly leveraging the underlying operating system. This requires the VM to have the PV drivers/ guest tools installed.
    • hard_reboot to force reboot the virtual machine.
    • hard_shutdown to force shutdown reboot the virtual machine.

Install the PV Drivers on a Windows Virtual Machine

  • Log onto the host console (e.g. via ssh)
  • Run the following xe command:
# xe vm-cd-eject vm=<target VM name>
# xe vm-cd-insert cd-name=xs-tools.iso vm=<target VM name>
NOTE: VM can be either off or booted.

  • Install the PV Drivers leveraging the console feature available in the XAPI Viewer tool.