Citrix Xen Server – Changing the frequency of log rotation (for example to resolve a lack of disk space)

Credit to Steven Wright, because this article help me so much. If you have problem like me, please follow below procedure to resolve it :

Connect putty and logon into xen server host using root user.

Use “vi” (a text editor) to edit the /etc/logrotate.conf file

Changed the rotate value into what you want and set the log to compress (delete the #).

Press “I” for insert and press “x” to delete. Esc to return to command mode.

After finish, press “:wq” (w = Write and q= quit).


Troubleshooting windows 2008 r2 sysprep – A fatal error occurred while trying to sysprep the machine

Today I have a problem when I want to create new image using the existing image(old image) in citrix xen server.

When I run sysprep, I found an error message “A Fatal error occurred trying to sysprep the machine”

To solved this problem, I do a this workaround :

  • Change registry key HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus to 7

  • Change HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\SkipRearm to 1
  • And then Delete the folder Panther.

  • And then run sysprep again.

Source : (look at for Riffing answer)

XenServer XAPI Service Does Not Start

I just do copy paste  and do a little update from the source, because this article helping me a lot when my xen server had this problem.



The XenServer XAPI service does not start.


One reason the XAPI service does not start is because your root “/” directory is out of space.

A common scenario is that the XenServer is experiencing a lot of issues that are being logged in the /var/log log files.

In this example, the kern.log file had used up all the free space on the XenServer; the size grew to more than 1.5 gigabytes.

Note: Identify from the large file and entries what is being logged and investigate if it is an issue that needed addressing.


Use the steps below to identify the root “/” drive that is out of space.

  • Log on to your XenServer using the local terminal and run the following command: 

  • Notice that the root “/” file system is 62 percent used and 1502116 (1.5 gigabytes) available; it should never read 100 percent used.

  • Run the following command to change to the /var/log directory: 
    cd /var/log

    You will see the log files if you run the ls command.

  • Run the following command to see the size of all the files in the current directory; narrow down your search by specifying one file, if needed:
    du –ksh *.*  
  • Or use this command ls -tahlS | more for simplify the file search
  • If you see an excessively large file, you can delete the file using the following command 
    rm <filename>.log

Note: All log files will be recreated if you remove the file and restart XenServer. If you choose to save the contents of a file, it is recommended to copy the file to a USB or network share prior to deleting the file.

  • Restart the XenServer to recreate the log file and it restarts XAPI automatically.

More Information

You can use the [du –ksh *.*] and [ls -tahlS | more] command starting from the root “/” directory to identify if there is a file that is consuming a lot of space on your XenServer.


CTX128316 – XenServer XAPI Service Does Not Start – Citrix Knowledge Center.

How to attach USB flash disk or USB external storage into VM in Xen Server 5.6 FP 1

This step gonna tell you how to attach the USB storage into VM in Xen Server 5.6 FP 1

First Step – Find the host where the VM placed, and then plug the USB storage into the host.

Second Step – open Xen Centre and then do as the following picture.

Now the USB can be accessed from your VM

To remove the USB storage do the following

After that you can safely remove your USB Storage J