Jump to content


Photo

Easiset way to understand Console Commands

Started by Alastair MacFarlane , 13 September 2017 - 03:37 PM
9 replies to this topic

Best Answer Marc O'Neill , 13 September 2017 - 03:43 PM

The XAPI toolstack for controllering XenServer is not a standard Linux package so you wont find much reading about it outside of XenServer.

 

Generally the commands follow the below structure which can be tab completed,

 

xe <class>-<action> <identifier> <parameter>

 

Class being the object to look at. sr (storage repository), vm, vif, pif etc.

Action being things like list, set, delete, remove

Identifier being the UUID of the object to work on

 

The toolstack is pretty user firendly and if you want to tinker with it in a way where you cant break anything you should install a XenServer as a VM to test with on your XenServer environment.  You can delete or destroy this as you wish (bear in mind you can only run linux VMs on nested XenServer VMs)

 

Also the XenServer admin guide has a good section in the back (10 A) which listed the commands and their actions. https://docs.citrix.com/content/dam/docs/en-us/xenserver/7-1/downloads/xenserver-7-1-administrators-guide.pdf

 

/Marc

Alastair MacFarlane Members

Alastair MacFarlane
  • 52 posts

Posted 13 September 2017 - 03:37 PM

Dear All,

 

I am nervous every time I access the CLI as I don't understand the commands or dom0 structure.

 

I work for a small company using 3 Xenservers. What would the group advise is the best way to gain confidence when I don't have a test environment? Is it Linux training or read a good book (any recommendations?) I am willing to put the effort in but I just don't know in which direction.

 

Thanks again for any suggestions..

 

Alastair



Marc O'Neill Citrix Employees

Marc O'Neill
  • 269 posts

Posted 13 September 2017 - 03:43 PM

The XAPI toolstack for controllering XenServer is not a standard Linux package so you wont find much reading about it outside of XenServer.

 

Generally the commands follow the below structure which can be tab completed,

 

xe <class>-<action> <identifier> <parameter>

 

Class being the object to look at. sr (storage repository), vm, vif, pif etc.

Action being things like list, set, delete, remove

Identifier being the UUID of the object to work on

 

The toolstack is pretty user firendly and if you want to tinker with it in a way where you cant break anything you should install a XenServer as a VM to test with on your XenServer environment.  You can delete or destroy this as you wish (bear in mind you can only run linux VMs on nested XenServer VMs)

 

Also the XenServer admin guide has a good section in the back (10 A) which listed the commands and their actions. https://docs.citrix.com/content/dam/docs/en-us/xenserver/7-1/downloads/xenserver-7-1-administrators-guide.pdf

 

/Marc


Best Answer

Tobias Kreidl CTP Member

Tobias Kreidl
  • 18,737 posts

Posted 13 September 2017 - 06:28 PM

A test environment can be as simple as installing a virtual machine utility, like free VirtiualBox or similar, and creating a small virtual machine within an existing laptop or desktop; some of my test servers have only 8 GB of memory! :D You really don't need much in terms of resources for a test environment, and believe me, we all make mistakes and this is the best way to get yourself familiar with the CLI with low risk. Some of our old servers are 8+ years old, so practically anything that's lying around that has reasonably standard HW will probably work. Be creative in how you look for resources; a production environment makes for a bad testing ground, and you really do have inexpensive alternatives to setting up test environments! :)

 

-=Tobias



Alan Lantz Members

Alan Lantz
  • 7,300 posts

Posted 13 September 2017 - 06:56 PM

You must have a test system, testing on a production environment not advised at all. you should be able to find examples of safe xe commands to run in the admin guide as well as browsing Google. As mentioned XenServer is specific and while most commands from Xen will work, stay strictly with XenServer until you are comfortable. xe help and xe help --all can give you examples.  Commands that contain the works list and get you are pretty safe with. commands that contain words like disable, destroy and remove I would steer clear of and save for a test system.

 

--Alan--



Alastair MacFarlane Members

Alastair MacFarlane
  • 52 posts

Posted 14 September 2017 - 08:38 AM

Thanks Marc, Tobias and Alan,

 

I will look into the possibility of a full test environment (using up an old server), but you are all pretty much in agreement that there is no formal 'course' that would help me with this.

 

Thanks again.

 

 

Alastair



Alan Lantz Members

Alan Lantz
  • 7,300 posts

Posted 14 September 2017 - 01:30 PM

Citrix offers training, but looking all I see is overseas courses. It would be best/cheaper to contact a 3rd party for XenServer training if you are interested in that route. 

 

--Alan--



Alastair MacFarlane Members

Alastair MacFarlane
  • 52 posts

Posted 14 September 2017 - 01:39 PM

Alan,

 

I noticed that as well. I will check out 3rd party UK courses. Thanks for taking the time to reply.

 

Alastair



Tobias Kreidl CTP Member

Tobias Kreidl
  • 18,737 posts

Posted 14 September 2017 - 03:33 PM

There was a Citrix CXS-300 series for XenServer training that was active for awhile; I have no idea why this isn't on-going.

 

-=Tobias



Alan Lantz Members

Alan Lantz
  • 7,300 posts

Posted 14 September 2017 - 04:04 PM

Search YouTube for Ctirix XenServer Tutorial, you'll find some stuff there as well. When using CLI I would say 80% of the commands will work across any version of XenServer. 

 

--Alan--



Tobias Kreidl CTP Member
  • #10

Tobias Kreidl
  • 18,737 posts

Posted 14 September 2017 - 06:35 PM

Consider the book https://www.amazon.com/XenServer-Administration-Handbook-Successful-Deployments-ebook/dp/B01DV6SRTU/ref=dp_kinw_strp_1 for a good introduction to XenServer, in general.

 

-=Tobias