You are on page 1of 2

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>...]


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>
xe vm-cd-eject vm=<target VM name>
# xe vm-cd-insert cd-name=xs-tools.iso vm=<target VM name>

You might also like