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

Wednesday, 8 August 2012

XenServer Fast Clone v Full Copy

This is interesting article highlight a potential pitfall if regularly updating your VM base image with fast Clones.

The Fast Clone process simply creates a linked clone of the machine.
A Full Copy will create a new full fat copy of the image.

Fast clones create a linked image back to the master. If you keep updating and then distributing the master image in this manner you incur a performance overhead from having so many links.

Read this article for more information
http://www.danieletosatto.com/2012/05/04/creating-vms-from-templates-in-xenserver-creates-a-fast-clone/

Sunday, 26 February 2012

XenServer Backup MetaData

Backing up the VMs from XenServer is only one part of catering for DR on XenServer. 
The Virtual disks can be backed up within the XenCentre console but the metadata that links the Virtual disks
with the machine information also needs to be backed up. 


This is performed at the CLI


xe vm-export metadata=true --multiple filename=VMEXPORT


This will store the Metadata backup on the path the command is run from.
Then use a tool like WINSCP to grab the files from the Xenserver host and store somewhere securely.

Friday, 3 February 2012

XenServer XAPI Service Does Not Start

After a power cut i have had a long drama with my XenServer box.
Hindsight being what it is i probably need not have incurred such a long downtime.

The short story is my Log files had filled up, and the method to clean these up at the bottom of this post The Long story is :

After the powercut my XenServer failed to boot with the message XAPI service will not start. Press F8 to retry.
The retry fails to restart the XAPI.

I assumed the powercut had meant a bad write to my harddrive and so re-installed XenServer onto the
same harddisk. My box had 2 hard disks with the 2nd disk being the storage repository for the VM's.

After the re-install i manually had to add the 2nd hard disk as a storage repository using the 2nd part of this citrix article http://support.citrix.com/article/CTX120962

This added the 2nd hard disk as additional storage repository, so i could see all my VM disks but had no VM's attatched to them.

as per the document i created new VM's with no disk attatched. Then after it booted, i edited its config and atttched the VMs from my 2nd hard disk. Its pure guess work as to which disk is which machine but after a while had most of my machines up and running.

BUT

the server then died. I rebooted and XAPI SERVICE ERROR AGAIN

I thought now that my XenServer primary hard disk must be damaged from the power failure.

I install a new hard disk and re-install XenServer 5.6 Sp1 again.

I again manually attach my 2nd disk as storage repository. Manually create VMs and attach to the disk images.

the server then died. I rebooted and XAPI SERVICE ERROR AGAIN

I now think , hmmmm

I now go back to google and find http://support.citrix.com/article/CTX128316

Error Log Full up - Method to delete
Basically my error logs have filled up and killed the XAPI service. I just connected to my xenserver with WINSCP and deleted the 1.2GB logfile in \VAR\LOG. Restart the server and im back up and running.

I will now keep an eye on the log file to see if it grows , and work out what the errors are i guess,

Friday, 26 August 2011

XenServer - Remove Local Storage Repository


If you need to remove a local storage repository due to disk replacement/upgrade or failure then you need to perform the following CLI commands. This action cannot be done from the XenCentre Console as you might expect.


1. First, you have to determine the Storage-Repository-UUID:
xe sr-list
-> write down / take note of SR-UUID of the SR to delete

2. Find the corresponding Physical Block Device (PBD):
xe pbd-list sr-uuid=your-SR-uuid

-> write down / take note of PBD-UUID of the PBD to unplug and delete

3. Unplug the PBD:
xe pbd-unplug uuid=your-PBD-uuid

4. Delete PBD:
xe pbd-destroy uuid=your-PBD-uuid

5. Delete the association of your SR and the PBD:
xe sr-forget uuid=your-SR-uuid

Thursday, 25 August 2011

XenServer Add new Local Disk Storage

My Xenserver local disk corrupted and failed to boot.
I tried to re-install Xenserver on the device but it told me only a clean install was possible. 
I did not want to do this as i hoped i could recover some of the VM's from the disk.

I had a spare hard disk so i placed a 2nd hard drive in my XenServer. 

I then put a fresh install of Xenserver on that new hard disk. 

XenServer did not see the the older hard disk, so i mounted it with the following procedure which does not destroy any data on the disk.

This then let me see the VMs in the console though i had no VM information only the disks. Unfortunatly the VMs when mounted as a seperate drive on a working VM still did not work so i think the disk was corrupted.

I then replaced the hard drive with a brand new one and added from scratch with the following procedure
http://support.citrix.com/article/CTX121313


Monday, 22 August 2011

XenServer Pool Monitoring Tool

The citrix blogs have a link on this article to a small util that allow you to monitor XenServer pools in a little app.

XenServer Monitoring Tool

Wednesday, 17 August 2011

Enabling thin provisioning on an existing XenServer


Enabling Thin Provisioning is an option during XenServer Installation. Thin Provisioned disks are a pre-requisite for using the new XenServer feature IntelliCache.

If you missed this option when creating the machine storage repository it is possible to enable the feature from the CLI afterwards. This will however destroy your Storage repository as the file format for Thin Provisioning is EXT3 as opposed to the standard LVM.

In some instances this method may still however be useful.

I got the command from the XenServer install guide CTX129387

localsr=`xe sr-list type=lvm host=<hostname> params=uuid --minimal`
echo localsr=$localsr
pbd=`xe pbd-list sr-uuid=$localsr params=uuid --minimal`
echo pbd=$pbd
xe pbd-unplug uuid=$pbd
xe pbd-destroy uuid=$pbd
xe sr-forget uuid=$localsr
sed -i "s/'lvm'/'ext'/" /etc/firstboot.d/data/default-storage.conf
rm -f /etc/firstboot.d/state/10-prepare-storage
rm -f /etc/firstboot.d/state/15-set-default-storage
service firstboot start
xe sr-list type=ext
To enable local caching, enter the following commands:
xe host-disable host=<hostname>
localsr=`xe sr-list type=ext host=<hostname> params=uuid --minimal`
xe host-enable-local-storage-caching host=<hostname> sr-uuid=$localsr
xe host-enable host=<hostname>

Thursday, 10 March 2011

NEWSID on Server 2008 R2

The sysinternals tool NEWSID.EXE is not supported in windows 2008 servers.
I ran it on my 2008 R2 server and it blue screened the box.

If you Clone Machines and experience some strange SID type issues you will need to run sysprep with the "Generalize" option ticked. This will remove all uniqueness from the server.

You should create your server template at this point to ensure all your virtual machines are created unique.

Thursday, 24 February 2011

Shuttle PC - XenServer 5.6 FP1 Lab Build

Ive built myself a new Shuttle PC for use as a Lab PC.
Ive installed XenServer 5.6 FP1 onto this box.

Shuttle SH55J2 (total cost around £500)

Intel i5 760 2.8GHz SKT1156
16GB DDR3 1333mhz RAM (novatech)
Seagate 750MB Hard Drive
D-Link DGE-530T NIC PCI

Monday, 18 October 2010

XenServer 5 1Y0-A09 Brain Dump

XenServer 5 Exam Preperation 1Y0-A09 - My Brain Dump

Supports 32 CPUs
Supports upto 4 Virtual CPU per VM
built on 64 Bit Architecture
16 GB Installation footprint
Where possible seperate management and storage Diskdrives
Where possible seperate management and storage Network traffic
CLI commands
What Performance Counters can you monitor from XenCentre

Tuesday, 11 May 2010

XenServer 5.5 on Shuttle XPC

I have upgraded my old Shuttle KPC45 PC for a new model.
The main limitation of my KPC45 shuttle was only 2GB of RAM could be installed.

New Server (cost £496)
Shuttle SG31G2 v2
Intel Core 2 Quad Q9400 2.66Ghz
4GB DDR2 800 RAM
Seagate 750gb SATA 16MB Cache
D-Link DGE-530T NIC PCI (taken from my old Shuttle)

I installed XenServer 5.5 Update 2 on the new box via bootable USB stick as per this handy
procedure
http://community.citrix.com/display/ocb/2010/01/17/Install+XenServer+from+USB+Drive

I had exported all my Virtual Machines in XenServer 4 as backups. I then imported these into the new build all OK (except very slow , but i think thats my Buffalo NAS thats slow)

So far I'm very happy with the new XenServer , I've now installed Server 2008 R2,Windows 7 , Ubunto 10 and Netscaler VPX all successfully.

Monday, 25 January 2010

XenServer Build from USB Stick

I saw this interesting post in the citrix blogs , a guide to installing XenServer via a bootable USB stick.

I used this method to build my New Xenserver 5.5 Update2 and the method works perfectly.



1. Download XenServer installer ISO
3. Format a USB stick as FAT
3. Run uNetBootIn and select the XenServer Installer OS.iso and point it at the USB Stick and press OK



Orginal Article was on here
http://community.citrix.com/display/ocb/2010/01/17/Install+XenServer+from+USB+Drive