Blog

How to Implementing VMs on Xen Server?

Step 1: Create a virtual machine

Create a Virtual Machine

Step 2: After creating a VM Power on the VM, press OK.

After creating a Vm Power on the Vm, press OK

Step 3: Welcome screen will appear XenServer click on OK.

Welcome Screen Will Appear XenServer Click on OK

Step 4: In next “Accept EULA” and press enter.

In Next “Accept EULA” And Press Enter

Step 5: On Virtual Machine storage just click on OK.

On Virtual Machine Storage Just Click on OK

Step 6: Select local media and click on OK.

Select Local media and Click on OK

Step 7: Choose “NO” for supplementary packs.

Choose “NO” for Supplementary Packs

Step 8: Skip verification and click on OK.

Skip Verification and Click on OK

Step 9: Enter the password as (“admin@123”) and click on OK.

Enter the Password as (“admin@123”) and Click on OK

Step 10: Choose “DHCP” and click on OK.

Choose “DHCP” and Click on OK

Step 11: In the host name select manually specify (“XenServer-Valia”) and click on Ok.

In the Host name Select Manually Specify (“XenServer-Valia”) and Click on Ok

Step 12: In Time Zone select “Asia” and click on OK.

In Time Zone Select “Asia” and click on OK

Step 13: Select city as “Calcutta” and click on Ok.

Select City as “Calcutta” and Click on Ok

Step 14: In system time select “manual time entry” and click on OK.

In System Time Select “Manual time entry” and Click on OK

Step 15: It will ask for an installation for XenServer click on It.

It will ask for an installation for XenServer Click on It (2)
It will ask for an installation for XenServer Click on It

Step 16: Set the date and time and click on ok.

Set the DATE and TIME and click on

Step 17: After installation, it will open the Citrix XenServer.

After installation, It will Open the Citrix XenServer

Step 18: Note down the IP address of the XenServer.

Note down the IP address of the XenServer

Step 19: Go to Start -> Control panel -> Network and Sharing Center -> Change Advanced Sharing Setting.

Go to Start -_ Control panel -_ Network and Sharing Center -_Change Advanced Sharing Setting

Step 20: Both in public and private turn on network discovery, turn on file and printer sharing, and select use user account and password to connect to another computer, but in public turn off password protect sharing and click on save changes.

Step 21: Go to Citrix folder -> share with -> specific people, and share that folder with everyone

Go to Citrix folder -_ share with -_ specific people, and share that folder with everyone

Step 22: Open the Citrix XenServer.

Open the Citrix XenServer

Step 23: Click on add server it will ask the server name to provide the IP address (192.168.159.162) and password as (“admin@13”) and click on ADD.

Click on Add Server It will ask the Server Name to provide the IP address (192.168.159.162) and password as (“admin@13”) and click on ADD

Step 24: After connecting to server click on “new storage”, select “window file sharing (CIFS) and click on next.

After Connecting to Server Click on “New Storage”, Select “Window File Sharing (CIFS) and Click on Next

Step 25: Give some name to storage and click on next.

In location give __192.168.159.162_Citrix then Click on Finish

Step 26: In location give \\192.168.159.162\Citrix then click on finish.

Now we have new storage in which we have all the (. ISO) files required for the installation of VMs. So let’s create a new virtual machine, and for that click on New VM

Step 27: Now we have new storage in which we have all the (. ISO) files required for the installation of VMs. So let’s create a new virtual machine, and for that click on new VM.

Now we have new storage in which we have all the (. ISO) files required for the installation of VMs. So let’s create a new virtual machine, and for that click on New VM

Step 28: In the template field, select the name of the virtual machine you want to install. Then in the name field provide the name of the virtual machine of your choice. In the Installation Media field selects the ISO image of the VM from the storage repository we created earlier.

Step 29: On home server just click on next.

On Home Server just Click on Next

Step 30: Provide CPU & Memory details.

Provide CPU & Memory details

Step 31: Provide the storage for VM.

Provide the Storage for VM

Step 32: Keep the networking field as default and then click on create new.

Keep the networking field as default and then click on Create New

Step 33: Once created it will automatically power on.

Once created it will automatically power on

Conclusion

In conclusion, implementing VMS on XenServer can be a straightforward process by following a series of steps. By creating a virtual machine, configuring settings, establishing network connections, and utilizing storage repositories, you can effectively set up your XenServer environment.

This tutorial by Ideastack provides a comprehensive guide to help you get started with XenServer VPS hosting, XenServer hosting, or Xen hosting. By leveraging the power and flexibility of XenServer, you can create and manage virtual machines efficiently.

Frequently Asked Questions

Q1. What is XenServer VPS hosting?

XenServer is a powerful virtualization platform that allows you to create and manage virtual machines (VMs). It provides a robust infrastructure for Xen server hosting, enabling efficient resource utilization and enhanced security.

Q2. How do I connect to a XenServer?

To connect to a XenServer, open the Citrix XenServer interface and click on “Add Server.” Provide the server’s IP address and password, and then click “Add.” This allows you to establish a connection and manage your XenServer environment.

Q3. Can I install VMs using ISO images on Xen Server?

Yes, you can install VMs on XenServer using ISO images. After creating a storage repository and adding ISO images to it, you can create a new virtual machine, specify the ISO image as the installation media, and proceed with the VM creation process.

How to create VM manually through command line

Step1: Create raw file (There are two partitioning types LVM and Raw)

# qemu-IMG create -f raw v1008. raw 30G

Step2: Convert the image file to raw format

# qemu-img convert -f raw -O raw /var/virtualizor/kvm/centos-7.1-x86_64. img /home/v1008.raw

Step3: Assign a password for the VM

# virt-sysprep -a /home/v1008.raw –root-password password:india123

Step4: Go to qemu XML location

 #cd /etc/libvirt/qemu/

Step5: Copy the Old XML file with a new one

# cp v1001.xml v1008.xml

Step6: Edit the XML file

# vi v1008.xml

1
2

Step7: Login virtual shell

NOTE: (virsh for KVM server / vzctl for Openvz server/pct for Proxmox server)

# virsh

Step8: Start the VM

# Create /etc/libvirt/qemu/v1008.xml

Step9: Now take VNC access via VNC viewer and assign an IP address

Take the server IP, port, and password from a qemu XML file as shown in the Image. (Require for VNC Viewer)

3

Step10: Now You can take ssh of the newly created VM

Step11: For listing all created VMs

# virsh (Go to virsh)
# list (For listing)
# shutdown vid or #destroy vid (To turn off the VM)

Conclusion

Still confused how to create VM manually through command line? Contact Ideastack now!

Frequently Asked Questions

Q1. What is a VM called?

A virtual machine (VM) is essentially a digital replica of a physical computer. It is equipped with software that enables it to execute programs and operating systems, store data, connect to networks, and perform other computing tasks. However, like any computer system, a virtual machine requires regular maintenance such as updates and system monitoring to ensure optimal performance.

Q2. What are two main components of a VM?

A virtual machine (VM) comprises two main components: the host VM and the guest VM. The host VM is hosted on a remote cloud server and operates in a similar way to the guest VM. However, it is accessed differently from the guest VM.

Q3. What is a VM language?

Virtual machines are software programs that utilize a sophisticated two-step compilation process to translate an intermediate language into machine code. By doing so, VMs eliminate the need for hardware-specific compilers for individual programming languages, enabling multiple languages to be compiled into machine code.

How to create account in WHM panel or C Panel

Log in to Webhost Manager (WHM) using root as Username and Server Password at IP: 2086.

WHM

In the Home section, click Account Functions then click on Create a New Account.

WHM 2

The next step will be by clicking to Create New Account fill all the details like Domain, Username, Password, and the Email ID.

Create Reseller Account in WHM Panel

For creating the Reseller Account go on the Reseller Setting & click on the Make the account a reseller.

Conclusion

Still confused how to create account in WHM panel or cPanel? contact Ideastack now!

Frequently Asked Questions

Q1. What is WHM in cPanel?

The WebHost Manager (WHM) grants administrative authority to manage dedicated servers or VPS. Its functions encompass managing customer accounts, as well as serving as a reseller control panel.

Q2. What is the difference between cPanel and WHM?

Resellers use WHM as a control panel to oversee all the hosting accounts in their reseller plans. On the other hand, cPanel is the control panel utilized by end-users working with a reseller or hosting provider. Customers rely on cPanel to manage their individual hosting accounts.

Q3. What is the function of WHM?

The WebHost Manager (WHM) is an administrative control tool enabling the management of the back-end of multiple cPanel accounts. It provides the ability to manage individual accounts while simultaneously establishing server-side limits.

How SAR command work in LINUX VPS

SAR stands for System Activity Report, as its name suggests command is used to collect, report & save CPU, Memory, and I/O usage in Unix an operating system. The SAR command produces the reports on the fly and can also save the reports in the log files as well.

This article explains how to install and configure the sysstat package (which contains the SAR utility) and explains how to monitor the following Linux VPS performance statistics using SAR.

How to install SAR in LINUX?

1. Install Sysstat Package

First, make sure the latest version of SAR is available on your system. Install it using any one of the following methods depending on your distribution.

1

Note: Make sure to pass the option –enable-install-cron. This does the following automatically for you. If you don’t configure sysstat with this option, you have to do this ugly job yourself manually.

Creates /etc/rc.d/init.d/sysstat

2

2. Once installed, verify the SAR version using “SAR -V”

Finally, make sure SAR works. For example, the following gives the system CPU statistics 3 times (with 1 second interval).

3
4

3. Collect the SAR statistics using cron job – sa1 and sa2

/usr/local/lib/sa/sa1

This runs every 10 minutes and collects SAR data for historical reference.

If you want to collect SAR statistics every 5 minutes, change */10 to */5 in the above /etc/cron.d/sysstat file.

This writes the data to /var/log/sa/saXX file. XX is the day of the month. saXX file is a binary file. You cannot view its content by opening it in a text editor.

5

/usr/local/lib/sa/sa2

This runs close to midnight (at 23:53) to create the daily summary report of the SAR data.

5

sa2 creates /var/log/sa/sarXX file (Note that this is different than the saXX file that is created by sa1). This sarXX file created by sa2 is an ASCII file that you can view in a text editor.

4. Linux 2.6.32-431.e16 – Linux kernel version of the system.

01/18/2017 – The date when the SAR data was collected.

_x86_64_ – The system architecture.

(2 CPU) – Number of CPUs available on this system. On multi-core systems, this indicates the total number of cores.

1.

CPU Usage of ALL CPUs (SAR -u)

6

This gives the cumulative real-time CPU usage of all CPUs. “1 5” reports for every 1 second a total of 5 times. Most likely you’ll focus on the last field “%idle” to see the CPU load.

2.

CPU Usage of Individual CPU or Core (SAR -P)

7

If you have 4 Cores on the machine and would like to see what the individual cores are doing, do the following.

3.

Memory Free and Used (SAR -r)

8

This reports the memory statistics. “1 5” reports for every 1 second a total of 5 times. Most likely you’ll focus on “kbmemfree” and “kbmemused” for free and used memory.

Following are a few variations:

4.

Swap Space Used (SAR -S)

This reports the swap statistics. “1 5” reports for every 1 second a total of 5 times. If the “kbswpused” and “%swpused” are at 0, then your system is not swapping.

Following are a few variations:

5.

Overall I/O Activities (SAR -b)

9

This reports I/O statistics. “1 5” reports for every 1 second a total of 5 times.

The following fields are displays in the example below:

tps –

Transactions per second (this includes both read and write).

rtps –

Read transactions per second.

wtps –

Write transactions per second.

bread/s –

Bytes read per second.

bwrtn/s

Bytes written per second.

Following are a few variations:

6.

Individual Block Device I/O Activities (SAR -d)

To identify the activities by the individual block devices (i.e a specific mount point, LUN, or partition), use “SAR -d”

10

Following are a few variations:

7.

Report network statistics (SAR -n)

This reports various network statistics. For example, the number of packets received (transmitted) through the network card, statistics of packet failure, etc., “1 5” reports for every 1 second a total of 5 times.

KEYWORD can be one of the following:

DEV –

Displays network devices vital statistics for eth0, eth1, etc.

EDEV –

Display network device failure statistics.

NFS –

Displays NFS client activities.

NFSD –

Displays NFS server activities.

SOCK –

Displays sockets in use for IPv4.

IP –

Displays IPv4 network traffic.

EIP –

Displays IPv4 network errors.

ICMP –

Displays ICMPv4 network traffic.

ICMP –

Displays ICMPv4 network errors.

This reports the total number of processes created per second, and the total number of context switches per second. “1 5” reports for every 1 second a total of 5 times.

8.

Reports run queue and load average (SAR -q)

This reports the run queue size and loads an average of last 1 minute, 5 minutes, and 15 minutes. “1 5” reports for every 1 second a total of 5 times.

By using the SAR command we can find out the performance status of the server.

Conclusion

Still confused how SAR command work in LINUX VPS? Contact Ideastack now!

Frequently Asked Questions

Q1. What is sar command used for?

The sar command can be used to keep track of a variety of system resources on a Linux system, including CPU and memory usage, file system performance, I/O device consumption, network monitoring, disk usage, process and thread allocation, battery life, plug-and-play device performance, and more.

Q2. How does sar collect data?

Using SAR, gathering, and reporting resource data requires two steps. The first step is to collect test data and save it as a binary file. In the second step, extract the desired data into a text (.txt) report.

Q3. Where are sar files stored?

The term “sar” refers to “system activity report,” and it can be configured to automatically generate daily reports, display current performance, or deliver reports based on log files kept in the /var/log/sa (or /var/log/sysstat) folder on your system.

How to change process priority using Linux Nice and Renice

In a Linux system, there are hundreds of processes, that are continuously running different tasks. Linux Kernel does a fantastic job of mediating between these processes and allotting CPU to these processes.

Every running process in Linux has a priority assigned to it. We can change the process priority using nice and renice utility.

With the help of the Nice command in Linux, you can set process priority. If you give a process a higher priority, then Kernel will allocate more CPU time to that process.

The Nice command will launch a process with a user-defined scheduling priority. Renice command will modify the scheduling priority of a running process. Linux Kernel schedules the process and allocates CPU time accordingly for each of them.

The process scheduling priority range is from -20 to 19. We call this a nice value.

A nice value of -20 represents the highest priority, and a nice value of 19 represents the least priority for a process.

Follow the below process to increase the priority of any process:

1.

Login into your Linux system via user name and password, and enter the # top command.

Cheap Linux VPS 1

After hitting enter you will get output like the above screen, in that NI means Nice Value of a particular process.

2.

We can set the NI value of any process or command in 2 ways.

a)

In the output of the # top command, just enter ” r ”, and we get the screen like the one below:

By default when a program is launched in Linux, it gets launched with the priority of ‘0’. However, you can change the priority of your service yourself.

Cheap Linux VPS 2.a1

Simply just put the PID of any process or the PID of that process in which you want to increase the priority. Hit enter after putting PID.

Cheap Linux VPS 2.a2

It will ask for Renice value, see the above screen. put the value priority range from -20 to 19. We call this a nice value. A nice value of -20 represents the highest priority, and a nice value of 19 represents the least priority for a process.

After putting the renice value, the process priority will change according to the NI value.

Check the NI column after purring renice value of any process, see below screen.

Cheap Linux VPS 2.a3

In the above screen, the PID of kthreadd is 2 and its nice value has been changed to -10, which means now it has higher priority among then all processes, which is running under a Linux system.

We can also set the NI nice value of any process like httpd, java, MySQL, FTP, or sshd to make that service perform fast.

b)

We can set NI via another way, by using the simple below command.

After the top command, do the below step to increase the performance of any service, or process.

# nice -10 httpd

The above command will set the NI value of the httpd service to 10, which means it has lower priority among all the running processes under the Linux system.

# nice –10 httpd

The above command will set the NI value of the httpd service to -10, which means it has the highest priority, we can increase this value to -20, A nice value of -20 represents the highest priority.

Conclusion

Still, confused about how to change process priority using Linux nice and renice? Contact Ideastack now.

Frequently Asked Questions

Q1. What is nice in Linux?

Nice is a program that may be found on Unix and Unix-like operating systems like Linux. It corresponds straight to the same-named kernel call. Nice is used to call a utility or shell script with a specific CPU priority, allowing the process to receive more or less CPU time than other processes.

Q2. What is nice value?

The process’s priority is determined by the value. The process is considered to be “nicer” than other processes the higher the value, the lower the priority. On Linux workstations, the nice value by default is set to 0. The size of the process in memory is shown in the SZ field.

Q3. What is nice and renice in Linux?

The nice command sets the priority of a Linux process before it runs. It is not possible to change the priority after it has been established using the nice command. In this case, you can use the renice command. With the renice command, the priority of an active process can be modified.