Deployment of XenServer virtual machine using command line.
Requirements
Privileged access to XenServer's command line as well as configured ISO image storage containing an ISO image of the Linux distribution you wish to install.
Difficulty
MODERATE
Instructions
Deploy VM template and gather information
In this guide we will be creating a new Ubuntu Linux based virtual machine. However, the below procedure will fit any decent Linux distribution as along as it is supported by XenServer, meaning that the template for the Linux distribution you would like to install is part of the XenServer's repertoire. Let's first search XenServer's database for a template name.
The Virtual Machine creation using template provisioner may spawn unnamed VDI disks. Usually, the VID description states Created by template provisioner at most. Example:
Since there are multiple available versions of WINE, there are different ways to install it as well. Of course, each distribution also packages and ships WINE differently, and most only ship one or two versions of it. Thankfully, there are third party repositories available, and, when all else fails, WINE can be compiled from source. Unless you’re running Gentoo, source should probably be the last resort, since it’s obviously harder to maintain, but it can work in cases where you want a custom WINE build that isn’t packaged for your distro.
The ability to monitor the temperatures of key components is important, whether you’re gaming, overclocking, or doing something more businesslike and running a critical server. Linux includes modules in the kernel that allow it to access onboard sensors within components. Though, that alone is not enough.
There is a program that does work in conjunction with those modules to display the readings of those sensors in the userspace. That program is lm_sensors. Lm_sensors allows users to get a readout of sensor readings in the command line and interfaces with several graphical front ends that make displaying temperatures in real time automatic and easy.
InstallationLm_sensors is in nearly every distro’s repositories. In most cases, installation is as simple as a single command. Since it lm_sensors is a daemon, it will need to be started in all distributions, but the Debian based ones, which start it automatically.
Here we assume that you have already created VM's device to link to desired ISO image you wish to boot from. The objective is to instruct XenServer's host virtual machine to boot from ISO CD/DVD image instead of default VDI disk. Failure to do so may result in following error message:
The bootloader returned an error
msg: Unable to find partition containing kernel
Suppose that we have included a new item to our Xenserver's storage repository such as the newly downloaded ISO images. XenServer would not list this item immediately and thus this requires a manual action to include this new item into XenServer's storage repository list. The objective is to rescan XenServer's storage repository thus make all new items available for use.
Requirements
Administrative Local or Remote command line access to XenServer is required to complete this task.
One of the main concerns for people making the switch to Linux is how to run the programs that they’ve become accustomed to on other operating systems, mainly Windows. For most, there are one or two programs of games that aren’t available on Linux, and that puts a major hold on adopting Linux full time. Thankfully, WINE can help to solve this problem.
WINE is a piece of software for Unix-like systems, including Linux, OSX, and the BSDs, that allows you to run native Windows applications. WINE stands for, WINE Is Not an Emulator. That’s because it isn’t. WINE isn’t a full Windows install or some kind of VM. It is a compatibility layer that essentially translates Windows binaries. This extends to graphics libraries like DirectX 9, which is converted to OpenGL. WINE allows Linux users to run many popular Windows applications and games at similar performance to if they were running on Windows itself.
A configured domain name service ( DNS ) server such as Bind may store previously resolved domain names to a local cache. By default the cached records will be stored for 7 days. The cache can be reused for future domain name resolutions. First, let's see how we can view all cached domain name resolutions:
# rndc dumpdb -cache
The above command will dump bind's cache into /var/cache/bind/named_dump.db. In case you cannot locate this file after you have executed the above command then check your server's configuration files to reveal the location of cache dump file. To view cached dns records simply cat or grep the resulting dump file. For example:
# grep gnu.org /var/named/data/cache_dump.db
gnu.org. 86358 NS ns1.gnu.org.
86358 NS ns2.gnu.org.
86358 NS ns3.gnu.org.
ns1.gnu.org. 86358 A 208.118.235.164
ns2.gnu.org. 86358 A 87.98.253.102
ns3.gnu.org. 86358 A 46.43.37.70
Let's assume that that you are playing with iptables and wish to remove rules which are no longer valid, required or incorrect. One way of accomplishing this task would be to save all rules using iptables-save command, open the output file, remove all rules and use iptables-restore to apply new rules. Another and perhaps easier way is to list all available rules along with rule line numbers. For example:
The Linux Cron time-based scheduler by default does not execute jobs with shorter intervals than 1 minute. This config will show you a simple trick how to use Cron time-based scheduler to execute jobs using seconds interval. Let's start with basics. The following cron job will be executed every minute:
* * * * * date >> /tmp/cron_test
The above job will be executed every minute and insert a current time into a file /tmp/cron_test. Now, that is easy! But what if we want to execute the same job every 30 seconds? To do that, we use cron to schedule two exactly same jobs but we postpone the execution of the second jobs using sleep command for 30 seconds. For example:
* * * * * date >> /tmp/cron_test
* * * * * sleep 30; date >> /tmp/cron_test