Showing posts with label XenServer. Show all posts
Showing posts with label XenServer. Show all posts

Friday, August 24, 2012

How To Restore DVD & Removable Drive


Restore the DVD drive:
# xe sr-create host-uuid= content-type=iso name-label=”DVD drives” type=udev device-config:location=/dev/xapi/cd

Restore removable storage:
# xe sr-create host-uuid= content-type=disk name-label=”Removable storage” type=udev device-config:location=/dev/xapi/block

Thursday, May 31, 2012

How-To Change Qlogic/Emulex HBA Connection Option in XenServer

How to set the connection option to Point-to-Point only?

For Emulex HBA - Edit /etc/modprobe.d/emulex and add:
options lpfc lpfc_topology=0x2
Complete guide to set the connection mode in Emulex HBA can be found at - http://support.citrix.com/article/CTX134088

Likewise Troubleshooting


Some likewise commands for troubleshooting.

# /opt/likewise/bin/lw-set-log-level verbose
# /opt/likewise/bin/domainjoin-cli query
# /opt/likewise/bin/lw-find-user-by-name "name@domain.com"
# /opt/likewise/bin/lw-get-current-domain
# /opt/likewise/bin/lw-get-dc-name name.domain.com
# /opt/likewise/bin/lw-get-dc-time name.domain.com
# clock
# /opt/likewise/bin/lw-get-metrics
# /opt/likewise/bin/lw-get-status.
# /opt/likewise/bin/lw-auth-user name@domain.com[ENTER]

Thursday, January 5, 2012

How to Identify if your iSCSI Storage Repository has Changed SCSI IDs

Useful if you encounter an issue repairing an SR with error code SR_BACKEND_FAILURE_19 no such devices.

http://support.citrix.com/article/CTX118641

Some Useful iSCSI Commands

To discover targets at a given IP address:
iscsiadm -m discovery --type sendtargets --portal

To login to the one of the targets found by the command above:
iscsiadm --mode node --targetname --portal --login

To view all active sessions and connections:
iscsiadm --mode session

XenServer - SR_BACKEND_FAILURE List of error codes and their description

A full list of all error codes and their description is available in the /opt/xensource/sm/XE_SR_ERRORCODES.xml file

Sunday, December 11, 2011

Cross Resource Pool VM Copy

xe host-call-plugin host-uuid= plugin=copy fn=get_vm args:remote_vm_uuid= args:local_sr_uuid= args:remote_host= args:remote_username=root args:remote_password=

parameters explained:

xe host-call-plugin - is the xe command to execute plugins
host-uuid= - is the UUID of the XenServer you want to import the VM to (the host on which the plugin is executed)
plugin=copy - is the /etc/xapi.d/plugins/ to use ... in this case: copy
fn=get_vm - the function of the plugin to call (each plugin can serve multiple purposes - the copy plugin for example has about 5 or so different purposes) … in this case: get_vm
args:remote_vm_uuid= - the UUID of the VM to copy/import
args:local_sr_uuid= - UUID of the SR the VM should be imported to
args:remote_host= - IP of the XenServer the VM is installed on
args:remote_username=root - you can figure that one out yourself ?
args:remote_password= - well, a password will be needed since the XenServer doesn’t know anything about the other resource pool

e.g.

XenServer-1 IP = 1.2.3.1
XenServer-1 Username / Password = root / password
XenServer-2 UUID = 8ad2e8cb-7447-463e-bf92-8301e0ba4562
Debian VM @ XenServer-1 - UUID = 33f82e4f-cc26-f0b9-7943-5239945aef61
Local SR @ XenServer-2 - UUID = 0d417f8a-c527-4b00-08ce-21a63a7238b6

The following command was executed from XenServer-2:
xe host-call-plugin host-uuid=8ad2e8cb-7447-463e-bf92-8301e0ba4562 plugin=copy fn=get_vm args:remote_vm_uuid=33f82e4f-cc26-f0b9-7943-5239945aef61 args:local_sr_uuid=0d417f8a-c527-4b00-08ce-21a63a7238b6 args:remote_host=1.2.3.1 args:remote_username=root args:remote_password=password

Once it's completed, you will see a Debian VM appear on XenServer-2.


The above should allow you to easily migrate/backup/copy VMs between completely separated resource pools (completely separated is not entirely true since both environments will obviously have to have network connectivity ?) without the need for manual export/import operations or complex LUN re-assignment steps.

Thanks to Stefan from Citrix for this nice tip :)