Fragged!
Posts Tagged Citrix XenServer
Adding iSCSI storage repositories to XenServer
Posted by Simon Larsen in IT on August 4, 2009
When adding an iSCSI Storage Repository (SR) to Citrix Xenserver, remember the following checkpoints:
- Use a dedicated interface for storage traffic.
This is done by right-clicking on a host in the XenCenter GUI, and selecting “Mangement Interfaces…”.
Create a new interface, giving it a good name such as “iSCSI LAN 10.x.x.x”.
Set the IP address of the new interface.
Do this for all XenServer hosts that require access to the iSCSI shared storage.
Remember that all hosts should have access to the same iSCSI LAN(s). - Give each XenServer host a meaningfull iSCSI IQN (name).
This is done on the General tab on each XenServer host.
Click Properties, and then change the iSCSI IQN.
This will help you in identifying each host when allowing their access on the SAN. - Map volumes to all XenServer hosts.
On your preferred iSCSI SAN, create a volume and map it to all XenServer Hosts.
Remember to map to the same LUN # for each XenServer Host. So if using LUN # 10 for Volume_1, use this for all of your hosts, as identified by their iSCSI IQN’s.
Remember to map all XenServer hosts to every volume you intend to use for “agile” VM’s at pool level. - Create the new SR on a pool level.
Right click your pool in the XenCenter GIU, and select New Storage Repository…
Select iSCSI. Enter a good descriptive name. Enter the IP address of the SAN controller that has ownership of the vdisk in question.
Click Discover IQNs. Make sure that the correct controller (which has ownership of the vdisk) is selected.
Click Discover LUNs, and select your desired LUN.
Click Finish.
Once you start populating your SR with Virtual Disks, make sure you give them all a name, and a description. This is very helpfull if you have to re-build your XenServer farm.
Re-arrange Network Interface Cards in XenServer
Posted by Simon Larsen in IT on August 4, 2009
While adding multiple Network Interface Cards (NICs) to a XenServer host, I needed to re-arrange them so their logical naming (eth0, eth1, eth2 etc…) matched that of their physical order.
Here’s a quick guide how to do that.
- Before adding your NICs to your XenServer host, note the MAC addresses of each port. You might also want to put this on a label, and affix it to the bracket itself, so you can determine the MAC of the NIC by looking at the rear of the server.
- Add your NICs to your XenServer host. Note where you position each card, so you know which MAC goes where.
- Boot XenServer.
- From the shell (Hit Alt+F3 after boot has finished), type in:
xe pif-scan host-uuid=<tab-complete your hosts UUID> - This will scan for new NICs, and enumerate them as Physical Interfaces (PIFs).
- Determine the order and UUIDs of the new PIFs, by running:
xe pif-list - This will return the uuid, device (which is actually device-name) and other info about each PIF. Check whether the device (-name) fits what you had planned. Eg. if it says eth2, and that’s what you wanted, just leave it. If you wanted it to be eth1, continue.
- Remove the PIF from XenServer, by running:
xe pif-forget uuid=<UUID of PIF you want to remove> - Add the PIF again, by running:
xe pif-introduce host-uuid=<UUID of your host> mac=<the MAC you noted earlier, seperate octets with :> device=eth<x> - For example:
xe pif-introduce host-uuid=8c5bcb04-184b-4523-b870-5d3a5804ca67 mac=00:19:5b:5a:2d:a6 device=eth3 - After this, your new PIF might show up with unknown device and vendor. While merely cosmetic, a reboot of your XenServer host should fix this.
I was able to use D-Link DGE-528T cards, using the above, even though they aren’t officially supported on XenServer. Well… 2 out of 3 cards worked when placed in a single XenServer host. All 3 cards were detected, and named using the above method. 1 of the cards was unable to recieve an IP for the management interface, using DHCP.
This was tested on XenServer 5.0 update 3.
Thanks to tiris blog for pointing me in the right direction on this.
Installing and running XenServer on a USB device
Posted by Simon Larsen in IT on May 31, 2009
Applies to:
Citrix XenServer 4.1, 5.0, 5.5 beta, possibly newer builds as well
Problem:
Installing and running Citrix XenServer directly from a USB- or flash-drive.
This article was posted by Chris Wolf on VirtualizationReview.com.
I thought I’d keep a copy here, and supplement it with my own discoveries. The article was written for XenServer 4.1, but I find it works just as well on 5.0 and even 5.5 beta.
Remember that the USB device must be 16GB or more. 16GB flash drives work fine, just don’t try and run VM’s from them (performance).
By Chris Wolf - 05/09/2008
With a few tweaks, you can run XenServer from an external USB drive.I often get asked about running hypervisors from portable storage devices and in this column, I’d like to talk about a method for installing and running XenServer 4.1 from a portable USB hard drive. This is useful if you are testing multiple hypervisor solutions and do not want to multi-boot the hypervisors on local server storage. Since XenServer Express Edition is free, you can evaluate the product for as long as you like and eventually upgrade the license if you want to unlock the product’s enterprise-class features.
Of course, the physical host server is going to need to meet XenServer 4.1′s system requirements. Servers with support for hardware-assisted virtualization (one of XenServer’s hardware requirements) should also support USB device boot. Many USB flash drives offer enough storage space for a XenServer installation (16GB is required per the official requirements). Note that the actual software installation will only consume about 2GB. However, keep in mind that USB flash drives perform considerably slower than traditional hard disks. So if performance is a consideration, I highly recommend using a 2.5″ external USB drive. In preparation for this article, I used a Seagate external USB 2.0 40 GB hard disk.
While not required, I disabled all internal hard disks in the test server’s BIOS so that the XenServer installation would only see the external USB drive. This prevents accidentally installing XenServer on an internal server hard disk. Read the rest of this entry »
Making a tape drive available to a guest via iSCSI
Posted by Simon Larsen in IT on May 30, 2009
Applies to:
Citrix XenServer 4.1, 5.0, 5.5 (beta)
Problem:
Making a tape-device located in the XenServer host available to a guest Virtual Machine.
This article has been taken from WLUG.org.nz/XenNotes, I just want to keep a copy here for my own convenience.
A BIG thanks to the guys at WLUG for figuring this out and making it easy to understand for mere mortals like me.
This is specifically for Citrix XenServer, although the principles will of course work in other Xen implementations.
I recently had a scenario where I was replacing two Windows servers with XenServer guests. This was fine, but we needed a way to backup to the existing SCSI DDS4 DAT drive. After failing to make PCI passthrough work, I settled on the much nicer method of providing the tape drive via an iSCSI target on the XenServer Host (Dom0). Here is how I achieved this.
Note 1: This is totally unsupported by Citrix.
Note 2: I’ve used the XenServer terminology “host” instead of Dom0, as this applies to the Citrix commercial implementation of Xen. It will probably work fine on OSS Xen, but you can just install the normal kernel dev packages and ignore the DDK stuff.
Note 3: This is for XenServer 4.1.0, but the principles are the same for previous versions. Just ensure you understand each step rather than following blindly.
Note 4: You’ll need to enable yum repositories. Do this by editing /etc/yum.repos.d/CentOS-Base.repo, and set “enabled=1” for the Base, Updates and Addons repositories. You should also do this on the DDK VM.
- Download the Xen 4.1 DDK (Driver Development Kit) from citrix.com
- The DDK is an ISO containing a VM with a development environment. Import it to your Xen host, and start it. Read the rest of this entry »