Saturday, July 31, 2010

My Citrix Certification Road Map

Today I have completed my first ever Citrix certification .

image

Ultimately I want to achieve “  Citrix Certified Enterprise Engineer (CCEE)  for Virtualization

image

 

Now to reach here I have to finish followings

image

Friday, July 30, 2010

Adjusting Dom0 Memory Settings on XenServer5.5

• The “dom0_mem=2940M” change gives more memory to dom0 which means that it can better handle large numbers of VMs. After changing this setting and rebooting, you then need to instruct dom0 to consume all of the memory allocated to it.

• On XenServer 5.5, including updates 1 and 2, the following sequence of commands can be used to achieve this:

. /etc/xensource-inventory

staticmax=`xe vm-param-get uuid=$CONTROL_DOMAIN_UUID param-name=memory-static-max`

echo staticmax=$staticmax

xe vm-param-set uuid=$CONTROL_DOMAIN_UUID memory-dynamic-max=$staticmax

xe vm-memory-target-set uuid=$CONTROL_DOMAIN_UUID target=$staticmax

You can confirm it worked by examining the contents of /proc/xen/balloon. The sum of 'Current allocation', 'Low-mem balloon' and 'High-mem balloon' should be equal to (or be pretty close to) the value you specified in /boot/extlinux.conf. (Usually the latter two of these parameters are zero.)

You only need to execute those commands once. The values you set for the dom0 memory target are saved in the xapi database which persists across reboots.


• There are some (rare) circumstances in which XenServer adjusts the memory target automatically (adds more memory to the host), but these should not affect you because you have set the target as high as static-max.

This means that if you want to go back to the old behavior, with a standard-sized dom0, you must reverse your changes – rebooting does not revert your configuration. If you undo the edits to /boot/extlinux.conf and reboot, executing the same commands should have the effect of causing dom0 to revert to 752 MiB.


Caution! The default value for the “dom0_mem” parameter is 752 MB. There is a historic reason for this value. It may be that on some machines going above this value causes poor performance.


Source :CTX124259

Step by Step guide for configuring EMC CLARiiON CX4 on XenServer

Today Citrix has released white paper which describe every possible way of configuring EMC Clariion on XenServer.

Thursday, July 29, 2010

How to install Xen tool on Linux VM

After installing linux vm follow these steps to install Xen tool
image

Increase a VM memory though supported memory on Xen host is different

I want to configure VM for 48 GB though it support 32GB on a Xen Server host. Can I do it?
Yeah you can but it is unsupported feature. In order to do it
run following command on host
Xe vm-param-set memory-static-max=48GiB uuid=

Little about XenServer Architectural Components

image
image
image

Wednesday, July 28, 2010

Configure LACP etherchannel on Xen Server 5.5 with Cisco switch

The default bonding mode for Citrix XenServer 5.5 is 1, or active-backup (slb).  This mode only provides fault tolerance, since only one NIC in the bond is active at a time.  For more heavily utilized production systems, an active-active configuration is preferable.  The two bonding modes that provide full send/receive balancing across all NICs are 4 (802.3ad) and 6 (alb).  Mode 4 provides link aggregation according to the 802.3ad specification, and requires an etherchannel to be configured on the switch.
The following is an example of how to configure an LACP/802.3ad bond with XenServer 5.5 and a Cisco 3750 switch running IOS.  
First, configure your switchports for an LACP etherchannel.  Note: in this case, we are making the etherchannel/Bond a trunk port which will only allow VLANs 2 - 11.  We have two NICs from our XenServer that make up the bond0 interface, plugged int Gi1/0/1 and Gi2/0/1.
// Configure the EtherChannel first
interface Port-channel1
description Etherchannel Team for XenServer1
switchport trunk encapsulation dot1q
switchport trunk native vlan 2
switchport trunk allowed vlan 2-11
switchport mode trunk
spanning-tree portfast
spanning-tree bpduguard enable
!
// now configure the individual switchports
interface GigabitEthernet1/0/1
description XenServer1 - eth0
switchport trunk encapsulation dot1q
switchport trunk native vlan 2
switchport trunk allowed vlan 2-11
switchport mode trunk
speed 1000
duplex full
channel-protocol lacp
channel-group 2 mode active
!
interface GigabitEthernet2/0/1
description XenServer1 - eth1
switchport trunk encapsulation dot1q
switchport trunk native vlan 2
switchport trunk allowed vlan 2-11
switchport mode trunk
speed 1000
duplex full
channel-protocol lacp
channel-group 2 mode active
!
// now make sure things are configured properly:
show etherchannel 2 summary
// this should output something like the following:
...
Number of channel-groups in use: 4
Number of aggregators:           4
Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
2      Po2(SU)         LACP      Gi1/0/1(P) Gi2/0/1(P)
// Note, you may see the two nics in (I) instead of (P) until you configure and reboot your XenServer
Now, make the following changes to your XenServer host.
1. Create a Bonded interface from XenCenter.  Select your server, then the NICs tab and choose 'Create Bond'.  Add the PIFs you want
2.  The Citrix recommended option.  Run the following command on the XenServer host console.  Make sure to use the UUID of the Bonded interface.
    xe pif-param-set uuid= other-config:bond-mode=802.3ad
    (note: to find your PIF's uuid: xe pif-list host-uuid=<host uuid> )
    (note: to find your Host's uuid: xe host-list )
2a. Some of our users have reported problems getting the offical recommendation working, and suggested an alternate method:
On the XenServer host, edit the following file:
    /opt/xensource/libexec/interface-reconfigure

find the following line:
        "mode":   "balance-slb",
and replace it with
        "mode":   "802.3ad",
Then save and restart the XenServer.  This will change the default bonding method for all Xen bonds to "802.3ad".
3. To make sure things are working as expected, run (replace X with your bond number):
    cat /proc/net/bonding/bondX

    You should see something similar to this:
Ethernet Channel Bonding Driver: v3.1.2 (January 20, 2007)
Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 31000
Down Delay (ms): 200
802.3ad info
LACP rate: slow
Active Aggregator Info:
        Aggregator ID: 1
        Number of ports: 2
        Actor Key: 17
        Partner Key: 2
        Partner Mac Address: <Switch's etherchannel MAC address>
Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: <eth0's MAC address>
Aggregator ID: 1
Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: <eth1's MAC address>
Aggregator ID: 1


This document has been coppied "AS IT IS" from here

Getting vDisk properties via MCLI

C“Virtual disk status” information can be extracted from the systray of the vDisk .
image
This can also be extracted via MCLI command
C:\Program Files\Citrix\Provisioning Services>mcli get disk -p diskLocatorId=1f4
bc0f9-8d18-4cee-88e9-241684a958d3
Executing: Get DISK
Get succeeded. 1 record(s) returned.
Record #1
    class:
    imageType:
    diskSize: 10485760000
    writeCacheSize: 0
    autoUpdateEnabled: 0
    activationDateEnabled: 0
    adPasswordEnabled: 1
    haEnabled: 0
    printerManagementEnabled: 0
    writeCacheType: 1
    activeDate: 2010/05/03
    longDescription:
    serialNumber: 62cd53ea-5448-11df-8000-000000000000
    date: 04/30/2010  12:06:11
    author:
    title:
    company:
    internalName: c:\pvs\srv2k3templ
    originalFile: c:\pvs\srv2k3templ
    hardwareTarget:
    majorRelease: 1
    minorRelease: 0
    build: 1

Source: CTX121333

Tuesday, July 27, 2010

Nicbonding issue with XenServer 5.5 , when connected to resource pool

If a pool of servers is created, and NIC 0+1 is bonded with the management interface running on this bonded network. All configuration steps were done from XenCenter
Problem :A new XenServer is added to the pool, the NICs are un-bonded before adding it to the pool (but the same problem exists even if they are bonded).The new XenServer is added to the pool and it picks up the pool network configuration however the Bond0+1network shows as unknown rather than connected.
Below host GMHO-PXEN002 host has been added into resource pool and under “management interfaces” you can see it as “Network”
image
But for host GMHO-PXEN001 both the “Management Interfaces” are clearly visible with correct bond
image
At the pool level only three “Management Interfaces ” are visible.
image
I then checked the file under /proc/net/bonding on host 001 and found that there are two bond file as per two bond existence
image
I then checked the file under host 002 and found that only one file is there though there are two bonds
image
Resolution
Remove the Bond0+1 network from the pool (which obviously affects all servers) and create the bond 0+1 again. Now this bond shows as connected on all XenServers.
To cross check I checked the file under host 002 and found that there are two files now
image
At the host level also it is shown correctly
image

Saturday, July 24, 2010

Dell answer to HP Virtual Connect :SR-IOV

Dell has come up with solution partenring Citrix to virtualize I/O . They name this technology as SR-IOV (Single Root I/O Virtualization ).In this solution, instead of a hypervisor virtualizing an I/O device in the software and sharing that emulated virtual NIC with multiple VMs, a single I/O hardware itself is subdivided logically to appear as 128 virtual NICs. Each NIC is assigned independently and directly to a virtual machine to provide precise per-VM control for connection speed and quality of service.

In HP Virtual Connect , you basically control and divide LOM card on blade into 8 different nic and then it is presented to host . On host you create a virtual switch to share the nic.

Read the complete story here

Wednesday, July 14, 2010

Ports between Provisioning Server and VM hosted on Xen Server

When you have firewall between Provisioning Server and Virtual Desk in Xen Server host then following ports need to be opened.
Source Group
Destination Group
Protocol/Port
Description
Notes
Virtual Desktops
DHCP Servers
UDP:66, UDP:67
DHCP option for TFTP Service and Bootfile name

Virtual Desktops
TFTP Server
UDP:69
Trivial File Transfer

Virtual Desktops
PVS Servers
UDP:6910-6930
Provisioning Services Streaming Service

XenApp Servers
DHCP Servers
UDP:66, UDP:67
DHCP option for TFTP Service and Bootfile name

XenApp Servers
TFTP Server
UDP:69
Trivial File Transfer

XenApp Servers
Provisioning Server
UDP:6910-6930
Provisioning Services Streaming Service

PVS Servers
Domain Controllers
TCP:389
LDAP communication

PVS Servers
PVS Servers
UDP:6905-6909
Inter-server communication

PVS Servers
License Server
TCP:27000 and 7279
Handles check-in and check-out of Citrix licenses
Requires inter-data centre communications
PVS Servers
PVS Database Server
TCP:1433
Microsoft SQL Server

PVS Servers
XenServers
TCP:443
Communications with XenServer infrastructure
Required by XenDesktop Setup Wizard.  Management traffic is encrypted.
Management Console
PVS Servers
TCP:54321, 54322
SOAP

Monday, July 12, 2010

How to attach RDM on XenServer VM ?

On a Local Storage, iSCSI, or Fibre Channel SR please complete the following:
Retrieve the universal unique Id (UUID) of the SR via the “xe sr-list” command, which can be modified. “xe sr-list | more” will display a page at a time as opposed to the previous command which will scroll off in a long listing. Another option is to filter by type. In the following screenshot, I use the “type=lvm”. Other filters can be “type=lvmoiscsi” for iSCSI, “type=lvmohba” for Fibre Channel.
NewImage.jpg
Once we had gotten the UUID of the SR that we want to create a raw LVM virtual disk image (VDI) we need to use the following command where we use the parameter “sm-config:type=raw”:
xe vdi-create sm-config:type=raw sr-uuid=687a023b-0b20-5e5f-d1ef-3db777ce7ae4 name-label="My Raw LVM VDI" virtual-size=8GiB type=user We see that the command completes when we see a new UUID for the new VDI:556cf57b-8a1d-4211-8daf-6157956cac46
NewImage.jpg
Once complete, we can see that the new VDI has a different label than other VDIs. There will be “LV-<uuid of the VDI> as in the following “lvdisplay | more” command:
NewImage.jpg
Now we can attach this VDI to a new VM or an existing one if needed. Please be advised that when creating and using RAW logical volumes instead of VHD based logical volumes that all ability to take snapshots/clones of virtual disk images.
On the Storage Tab of the SR, you should see a new unformatted VDI:
NewImage.jpg
This can be added to an existing VM via the VMs storage tab, or a new VMs storage tab:

NewImage.jpg

HINT: When using the New VM wizard, please be sure to uncheck the do not start VM automatically on the last step.
NewImage.jpg

Port required between Xen Desktop setup Wizard and DDC

Port communication between Provisioning Sever 5.6 running on win2k3 and XenDesktop 4.0

 

 

SetupToolApplication.exe using the logged in user needs access to CitrixManagementServer.exe via 2514

svchost.exe using <NT AUTHORITY\NETWORK SERVICE> needs access to svchost.exe via 135 for Remote Procedure Call (RPC)

SetupToolApplication.exe using the logged in user needs access to dllhost.exe via <available port> for COM Surrogate

SetupToolApplication.exe using the logged in user needs access to CdsImaProxy.exe via 8000

 

 

Above ports are used when XenDesktop setup wizard is ran. If still it fail then use Firewall to track the packet drop for opening ports.



Sunday, July 11, 2010

XenConvert error during P2V: Failed to copy the registry. (0x00000BC5)

While P2Ving Windows 2003 EE Xen Convert were failing while converting registry and log says following
Stopping service MSDTC.
Stopped service MSDTC.
Stopping service WSearch.
Failed to open service WSearch. The specified service does not exist as an installed service. (0x00000424)
Stopping service winmgmt.
Stopped service winmgmt.
Converting volume \\?\Volume{40994a6a-4ac1-11de-9f6e-806e6f6e6963} as a system volume to \\?\Volume{93ec2182-8a5f-11df-a3ca-001d0972ae2e} ...
Using backup functions to copy files.
Converting NTFS boot sectors on volume \\?\Volume{93ec2182-8a5f-11df-a3ca-001d0972ae2e} ...
Converting registry...
Copying hive SECURITY...
Saving hive to \\?\Volume{93ec2182-8a5f-11df-a3ca-001d0972ae2e}\WINDOWS\system32\config\SECURITY...
Copying hive SOFTWARE...
Saving hive to \\?\Volume{93ec2182-8a5f-11df-a3ca-001d0972ae2e}\WINDOWS\system32\config\software...
Failed to save registry key to file \\?\Volume{93ec2182-8a5f-11df-a3ca-001d0972ae2e}\WINDOWS\system32\config\software. An I/O operation initiated by the registry failed unrecoverably. The registry could not read in, or write out, or flush, one of the files that contain the system's image of the registry. (0x000003F8)
Failed to copy hive SOFTWARE.
Restarting special services...
Volume to Volume stopped at Thursday, July 08, 2010 13:07:42
Physical to Disk stopped at Thursday, July 08, 2010 13:07:42
Dismounting VHD...
Physical to VHD stopped at Thursday, July 08, 2010 13:09:46
Physical to OVF Package stopped at Thursday, July 08, 2010 13:09:46
Physical to XenServer stopped at Thursday, July 08, 2010 13:09:46
Failed to copy the registry. Cannot create a file when that file already exists. (0x000000B7)

To give little background ,P2V was attempted over 100MB Ethernet speed. Once we start getting above error , I decided to do some googling around web and found posting into Citrix form and found that someone else also got that error .
As per posting registry file for software was around 66MB.

I decided to perform one more attempt on local drive instead of network drive. This time it was successful in conversion  but during OVF import it failed with some network related error

  


Source is F:\Xenconvert\GUREHDB02.ovf.
Destination is 10.152.43.50.
OVF to XenServer started at Friday, July 09, 2010 00:43:53
Validating OVF Package...
FWD: Warning:2010.7.9.0.43.54,209: Disk linkage [File to RASD] does not exist: GUREHDB02.pvp
OVF Package is valid.
Importing OVF Package...
FWD: Debug:2010.7.9.0.43.55,943: OVF.FindSystemIds completed, 1 found
FWD: Debug:2010.7.9.0.43.56,803: OVF.FindRasdByType completed, 1 found
FWD: Debug:2010.7.9.0.43.56,803: OVF.FindRasdByType completed, 1 found
FWD: Debug:2010.7.9.0.43.57,365: Import.Process: DefineSystem completed (GUREHDB02)
FWD: Debug:2010.7.9.0.43.57,412: Import.SetIfDeviceIsBootable: Using HostResource to find Disk
FWD: Debug:2010.7.9.0.43.57,584: Found file GUREHDB02.vhd using VhdStream
FWD: Debug:2010.7.9.0.43.57,740: Import.UploadRawVDI Enter
FWD: Debug:2010.7.9.0.43.57,740: Import.UpdoadRadVDI SRUUID: a779a980-adb7-8474-91ad-65dc9f7a4089
FWD: Debug:2010.7.9.0.43.57,740: Import.UpdoadRadVDI Label: GUREHDB02
FWD: Debug:2010.7.9.0.43.57,740: Import.UpdoadRadVDI Capacity: 26601324544
FWD: Debug:2010.7.9.0.43.59,693: Import.UploadRawVDI::VDI Created
FWD: Debug:2010.7.9.0.43.59,709: Connect To: 10.152.43.50:80
FWD: Debug:2010.7.9.0.43.59,725: Request: PUT /import_raw_vdi?session_id=OpaqueRef:33e1b06e-7526-3241-9070-7a7e2c60b526&task_id=OpaqueRef:f935cd8f-1604-4d99-822b-0771bc936273&vdi=OpaqueRef:4c0e5b86-4d82-460f-3d53-45d355331834 http:/1.0

FWD: Debug:2010.7.9.0.43.59,787: 200 OK
FWD: Error:2010.7.9.0.44.50,521: OVF.Tools.Http.SendData FAILED Unable to write data to the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
FWD: Error:2010.7.9.0.44.50,802: OVF.Tools.Http.Put: Exception: System.IO.IOException: Unable to write data to the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at XenOvfTransport.Http.SendData(Stream http, Stream filestream, String p2vUri, Int64 filesize)
at XenOvfTransport.Http.Put(Stream readstream, Uri serverUri, String p2vUri, NameValueCollection headers, Int64 offset, Int64 filesize, Boolean isChunked)
FWD: Error:2010.7.9.0.44.50,802: Import.UploadRawVDI Http.Put FAILED Unable to write data to the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
FWD: Error:2010.7.9.0.44.50,802: Import.RemoveVDI: Something went wrong deleting associated VDI
FWD: Error:2010.7.9.0.44.50,943: Import.RemoveVDI FAILED VDI_IN_USE, Auto delete failed, manual deletion of storage entry required.
FWD: Error:2010.7.9.0.44.50,943: Import.ImportFileProc::Exception VDI_IN_USE
FWD: Debug:2010.7.9.0.44.50,943: Import.ImportFileProc (worker thread) completed
FWD: Debug:2010.7.9.0.44.50,943: Import.AddResourceSettingData, recevied autoevent, continuing
FWD: Error:2010.7.9.0.44.50,943: Import.AddResourceSettingData, Failed on import, remove vm.
ImportFile failed
Failed to import the OVF Package.
OVF to XenServer stopped at Friday, July 09, 2010 00:44:51
Physical to XenServer stopped at Friday, July 09, 2010 00:44:51


This gives us enough reason to look at network side. We decided to use Arconis and copy the file over CISF share. During copy it failed with error “Path to Deep”.  Network team looked at error on Switch side and  also setting was done to 100MB while host side it was set to “AUTO”.

In general host side and switch side setting should be the same. Setting was changed and we reran XenConvert tool to import OVF and it was successful.





Friday, July 9, 2010

Streamed OS using PVS: Users unable to login to Domain

Physical machine were successfully streamed via Provisioning server 5.6 but while logging into domain it won’t allow. To make this work one setting need to be on PVS console on that vDisk file under store

clip_image002

Until you make this setting , use will not be able to login to domain.