XenServer 6.1 Advanced Training Hand-on

advertisement
Advanced XenServer Training
Hands-on lab exercise guide
CCAT
Americas Field Services
Page 1
Table of Contents
Table of Contents .............................................................................................................................................. 2
Overview............................................................................................................................................................. 3
Prerequisites: Attaching to Your XenServer ................................................................................................. 7
Lab 1: XenServer Intro Lab ........................................................................................................................... 11
Lab 2: Storage Lab........................................................................................................................................... 20
Lab 3: Networking Lab................................................................................................................................... 47
Lab 4: Performance Monitoring and Troubleshooting Lab...................................................................... 60
Page 2
Overview
Hands-on Training Module
Objective

Provide hands-on experience with XenServer 6.0.x and 6.1
Prerequisites


Ability to use the vi text edit editor for editing files.
This lab requires the Citrix Receiver to be installed on your
laptop.
Audience

Americas Consulting Services
Lab Environment Details
The lab environment uses a single physical XenServer accessed across the internet. The XenServer runs
various virtual machines to create a complete lab environment on one XenServer:





A Windows Server 2008 R2 desktop for accessing the lab applications (Student Desktop)
Four virtual XenServers (vXS01 to vXS04)
Active Directory VM
NetApp Simulator VM
Distributed Virtual Switch VM
All VMs share a private 192 network with a router providing access to the internet. The system diagram of
the lab is shown below:
Page 3
Figure 1 Advanced XenServer Lab Environment
List of Virtual Machines Used
VM Name
Router (Hidden)
XAStudent (Hidden)
vXS-01
vXS-02
vXS-03
vXS-04
AD
DVS
NetApp-Sim
IP Address
192.168.10.1
192.168.10.10
192.168.10.21
192.168.10.22
192.168.10.23
192.168.10.24
192.168.10.11
192.168.10.30
192.168.10.123 (for
NetApp Console)
Description / OS
Lab Router / Vyatta
Landing desktop : DNS : IIS / Windows 2008 R2
Virtual XenServer / XenServer 6.0.2
Virtual XenServer / XenServer 6.0.2
Virtual XenServer / XenServer 6.0.2
Virtual XenServer / XenServer 6.0.2
Active Directory/DHCP
Distributed Virtual Switch VM
NetApp Simulator VM
Required Lab Credentials
The login credentials required to connect to the environment and complete the lab exercises.
Machine
XAStudent
vXS-01
Username
administrator
root
Password
Citrix123
Citrix123
Page 4
vXS-02
vXS-03
vXS-04
vXS-05
root
Citrix123
root
root
Citrix123
Citrix123
root
Citrix123
About the NetApp Filer Simulator VM
NetApp Simulator VM is been provided in this training to get hands on experience in shared storage
provisioning. NetApp simulator VM has been provisioned with the following storage:
Aggregate 0 with 256 MB
Aggregate 1 with 17.5 GB
Terminology used with NetApp:
Terminology
Description
Disks
Aggregate
Volume
LUN
Physical disks
Collection of disks
Logical segmentation of aggregates
“Virtual” disk presented by SAN to XenServer
The following diagram represents the logical view of the NetApp Simulator VM and LUNs that will be
created for the XenServer pool:
Lab Performance with Virtual XenServers
When running multiple servers on one XenServer, including four virtual XenServers, it must be expected
that some performance will be lost. Each of the virtual XenServers has 3GB of RAM with only one
virtual CPU assigned, so the performance and capabilities are substantially lower than what would be
Page 5
expected from physical XenServers. There is only one physical disk for all operations, so again
performance is unlikely to match that of one physical disk per server that would be present in physical
XenServers.
Running virtual XenServers on XenServer is an unsupported technique that is an option where multiple
XenServers are needed, but are not readily available. Lab environments and proof of concepts where
performance is not being measured are ideal candidates for Xen-on-Xen.
Virtual XenServers do not have Hardware Virtual Machine (HVM) capability (like a recent physical CPU
does), so they are only able to run paravirtualized operating systems such as Linux. Therefore they cannot
run windows operating systems at this time.
Each step of an exercise should complete without reporting any errors.
Ensure that your screen output appears exactly as it does in the lab guide. If
your output differs, ensure that you have not made any typos.
Do not proceed if there are any errors or warnings reported during any step.
Page 6
Prerequisites: Attaching to Your XenServer
Overview
In this exercise you will start the lab environment and use your student desktop to launch XenCenter and
attach it to your single physical XenServer and two virtual XenServers.
Step by step guidance
Estimated time to complete this lab: 10 minutes.
Step Action
1.
Launch your web browser and enter the portal address for your lab.
2.
On the website, enter:
The Session Code provided to you via an email
from your instructor
Your Business email address
Click “Get Started”.
Page 7
Step
3.
Action
The XenServer credentials on your welcome screen are the credentials for the XenServer
provided to you for your lab. You will use them in step 6.
Click on Start Lab to start your student desktop. This launches a shared hosted desktop to
the Student VM.
4.
Once connected, you should see the following.
This is your student desktop used to launch the various applications needed during the lab.
Page 8
Step
5.
Action
From your student desktop, launch Citrix XenCenter:
XenCenter is a graphical user interface capable of managing multiple XenServers:
To add your physical XenServer to XenCenter, click ADD a server.
6.
Enter your physical XenServer parameters:
IP Address:
Username:
Password:
XenServer IP address provided to you in step 3
Root
XenServer password provided to you in step 3
You can cut and paste the XenServer IP address and password for better accuracy.
Click on Add.
Page 9
Step
7.
Action
XenCenter will attach to your physical server (your server name will be different):
Summary
Key
Takeaways
The key takeaways for this exercise are:

You have used the lab environment to attach your XenCenter to your
physical XenServer
NOTES
Page 10
Lab 1: XenServer Intro Lab
Overview
In this exercise you will create a XenServer pool and upgrade the XenServer servers to 6.1.
Step by step guidance
Estimated time to complete this lab: 20 minutes.
Step Action
1.
Connect to your lab environment and launch XenCenter.
You should see the following VMs:
 vXS01 through vXS04 – Virtual XenServers
 NetApp Simulator VM
 Citrix Distributed Virtual Switch VM
If you don’t see these VMs, please reach out to your instructor.
Page 11
2.
Right click on XenCenter and add vXS01, vXS02 and vXS03. Refer back to the Overview
section for credentials.
Create a XenServer pool and add the 3 XenServers – name the XenServer pool XenPool1
with vXS01 as the pool master.
Page 12
3.
Assign the following license server information to all the virtual XenServers:
License server: licenses.citrixvirtualclass.com
License Edition: Citrix XenServer Platinum Edition
4.
Leave vXS04 has standalone XenServer for now.
5.
Change the pool master’s default Dom0 memory to 1200 MB by following the CTX article:
http://support.citrix.com/article/CTX126531
Please Note: Please don’t set the Dom0 memory to 2940 MB as mentioned in the CTX
article. This will cause the XenServer VM to not power on. The XenServer VMs have a max
memory of 2500 MB.
Page 13
6.
Connect to the vXS02 via putty (shortcut should be available on student desktop) – or –
access XenServer through the console in XenCenter:
Run the following command: (without the #)
# xe host-list
# xe pool-designate-new-master host-uuid=<vXS02’s UUID from previous command>
This will disconnect the XenCenter connection. Login to the Resource Pool again, you
notice that vXS02 is now the pool master:
7.
Upgrade the current XenServer pool to XenServer 6.1. Start with the pool master VM,
attach the XenServer 6.1 CD ISO:
8.
Confirm that the boot order for vXS02 is – DVD Drive, Hard Disk, Network
Page 14
9.
Reboot vXS02 and follow installation instructions to upgrade to XenServer 6.1.
10.
Since the current setup is a Virtual Machine, the installation will warn that it doesn’t detect
Hardware Virtualization flags on the CPU. Click OK.
Page 15
11. CAfter the pool master is upgraded – you will be able to reconnect to the XenPool1:
h
Note: The Resource Pool stays intact with vXS02, vXS01 and vXS03 running different
versions of XenServer. This is only supported when the pool is being upgraded. It is not
recommended to run the XenServers with different versions. Discuss with instructor on
why this is the case?
Follow the above steps to upgrade vXS01, vXS03 and vXS04 to XenServer 6.1:
Execute a pool master failover to vXS01 using the commands in Step 6.
12.
Lets explore the XenServer console:
Connect to the pool master and click on “Console” tab:
Type: xsconsole
Page 16
13.
Select “Backup, Restore and Update”
Lets perform a backup of the VM Metadata:
Page 17
14.
Follow the wizard and backup the VM metadata on to Local Storage:
15.
Expand the vXS01 on the left pane of XenCenter and select Local Storage:
When working on XenServer build projects, it is critical to do pool Metadata backup.
The command line version is:
# xe-backup-metadata –u <SR-UUID>
By default – the pool metadata will store up-to 25 backups.
16.
Switch to the pool master’s console and eject the vXS03 from the pool:
Using the command: xe pool-eject host-uuid=
What are the precautions that you must take before ejecting a XenServer from the pool?
1. List the most critical one that comes to mind

Summary
Page 18
Key
Takeaways
The key takeaways for this exercise are discovering how to:

Create a XenServer pool and gracefully failover the pool master.

Increase Dom0 memory

Upgrade from XenServer 6.0.2 to XenServer 6.1

XenServer pool operations (pool metadata backup)

Prior to ejecting a XenServer , make sure to migrate all local SR based VMs
to other XenServers in the pool to avoid loss of data.
NOTES
Page 19
Lab 2: Storage Lab
Overview
In this exercise you will use commands learned in the module to explore storage related components:
 Create a local SR
 Import a Demo Virtual Appliance
 Use frequently used commands to understand the XenServer Storage components
 Create a Shared SR using NetApp Filer (Simulator) using Integrated Storagelink
 Execute Storage XenMotion
 (Advanced Lab) Learn about NetApp filer and present iSCSI LUN to XenServer pool
Step by step guidance
Estimated time to complete this lab: 1.5 hours
Step Action
Page 20
Step
1.
Action
Create a Local SR by adding a 30 GB virtual disk to vXS01:
And reboot vXS01.
Page 21
Step
2.
Action
After vXS01 reboots, Select the vXS01 under XenPool1 and select Storage:
You will be unable to see the 30 GB drive.
Follow steps provided in http://support.citrix.com/article/CTX121313 and add the Local
SR. Label this as “Local SR2”.
Page 22
Step
3.
Action
Import a Demo VM to this SR from the “Advanced XenServer Training” folder on the
Desktop of the machine that you are connected to via RDP.
Browse to “Virtual Appliances” and import XenServer-6.1-dlvm.xva to Local SR2 with
default settings:
Page 23
Step
4.
Action
Power on this VM after import.
Provide with root password of: Citrix123
Lab 2b: Attach a Shared SR using Integrated Storagelink
5.
The NetApp Filer’s administrative console can be accessed using a web browser (Firefox or
Internet Explorer) on the Student VM:
http://192.168.10.123/na_admin/
You will be prompted for username and password:
User: root
Password: citrix
Page 24
Step
6.
Action
Verify that you are able to see this console screen on the web browser:
Page 25
Step
7.
Action
If you don’t see the above screen on the web browser, the NetApp simulator engine is not
running.
Connect to the console of NetApp Simulator VM through XenCenter:
Page 26
Step
8.
Action
Login to the console
a. Username: root
b. Password: citrix
At the NetApp VM command prompt run this command
c. /sim/runsim.sh
Repeat Step 6 (above) and verify that you are able to access the NetApp filer console.
Page 27
Step
9.
Action
We are now going to use the Integrated Storagelink feature to present shared storage to Xen
Pool1.
Note: Integrated Storagelink is only available with XenServer versions 6.0 and above.
Select “XenPool1” and create a new shared SR using Integrated Storagelink
Select StorageLink technology:
Page 28
Step
10.
Action
Page 29
Step
11.
Action
Page 30
Step
12.
Action
Enter user credentials (root/citrix) and click “Discover”
Select aggr1, note down the different options (Raid types, Provisioning type, Provisioning
options and protocol supported) before you click on Finish.
Page 31
Step
13.
Action
Verify that you are able to see the shared SR on the XenServer pool:
Note that Integrated Storagelink manages the entire aggregate of disks.
Lab 2c: Storage XenMotion
14. Lets attempt to test Storage XenMotion.
a. Migrate the Demonstration VM from Local SR2 to the newly created NetApp SR
while the VM is running (this should fail).
b. Migrate the Demonstration VM from vXS01 to vXS02’s local SRs.
Lab 2d: Presenting Shared SR – the “hard way”
15. In the previous lab, you presented an entire aggregate to the XenServer using Integrated
Storagelink.
You are about to present a shared SR “the hard” way;
Here’s an outline of tasks to be performed in this lab:
1. Create a new volume using aggregate 1 – the size will be 10 GB
2. Within this volume, we will create a LUN with size 8 GB
3. Copy the iSCSI initiators for vXS01 and vXS02 and add to the newly created LUN
4. Use XenCenter to scan the LUN and present as shared SR to vXS01 and vXS02.
As a pre-requsite to this lab: please review the logical diagram and setup of the NetApp
simulator VM.
Page 32
Step
16.
Action
We are now going to first remove the newly presented shared SR from XenPool1:
Right Click on the NetApp SR:
And select Detach…
Once the SR is detached – the SR can be “removed” from the pool, right click again on the
SR and select “Forget”
Page 33
Step
17.
Action
Launch NetApp administrative console:
The NetApp Filer’s administrative console can be accessed using a web browser (Firefox or
Internet Explorer) on the Student VM:
http://192.168.10.123/na_admin/
You will be prompted for username and password:
User: root
Password: citrix
Page 34
Step
18.
Action
Select FileView:
Note: This is a slightly older version of the NetApp filer version. The current version of the
NetApp filer is: 8.3.x.
Volume Creation
Page 35
Step
19.
Action
First, create a volume. Click Volumes -> Add
Volume Name: vol1
Page 36
Step
20.
Action
Follow the wizard and create a small volume – 10 GB (with 5% snapshot reserve):
Page 37
Step Action
21. Follow the wizard and confirm that volume “vol1” is online by clicking Volume -> Manage
LUN Creation
22. Add a LUN by expanding LUN -> Add:
Path: /vol/vol1/XenServer
Lun Protocol Type: Xen
Description: XenServer
Size: 8
Units: GB
Space Reserved: Checked
Assigning LUN to iSCSI initiator group
Page 38
Step
23.
Action
After creating the LUN, click on LUNs -> Manage
Note: /vol/vol1/XenServer is not assigned to any XenServer.
Mapping the LUN to iSCSI initator groups
24. There are 2 options to creating iSCSI initiators in the NetApp console:
 Individually add each XenServer’s iSCSI IQN to NetApp
(Or)
 Create iSCSI initiator group and add the XenServer’s IQN in it
We will use the second option by manually adding the iSCSI initiators.
Page 39
Step
25.
Action
Lets first note down the iSCSI initiators for vXS01 and vXS02:
vXS01’s iSCSI initiator:
Page 40
Step
26.
Action
In the NetApp Console, Click on Initiator -> Add
Copy the iSCSI initiator from XenCenter
Page 41
Step
27.
Action
Lets now map the newly created iSCSI initiator group to the LUN:
Select LUNs -> Manage (Click on No Maps for 8 GB LUN)
Click “No Maps”:
Click “Add Groups to Map”
Assign LUN ID: 0 and click “Apply”
If the above wizard was successful, you will see the following:
Page 42
Step
28.
Action
Now – lets add the newly created LUN to XenServer pool:
Select “Software iSCSI” as the Virtual disk storage:
Page 43
Step
29.
Action
On the next screen, click on Discover IQN for the NetApp and Discover LUN.
Once the above information is populated, click on “Finish”.
You will be prompted to format the newly detected SR as LVM, select “Yes”:
Page 44
Step
30.
31.
Action
The wizard will prompt to format this LUN as a LVM SR, select “Yes”.
Now attempt to migrate the Demo VM to this shared LUN using Storage XenMotion.
If you are successful – you will see the VM not associated with any XenServer and can be
booted off either vXS01 or vXS02:
Lab 2: Exploring the PBD <-> SR <-> VDI <-> VBD linkage
32. SLet’s examine the SRs that we have created in command line :
t
(QUIZ TIME ):
1. Connect via putty or XenCenter console to XenPool1’s pool master.
2. List all the SRs created and provide the UUIDs
a. Local SR1
b. Local SR2
c. NetApp SR
3. Since we discussed this in the storage module, list the UUIDs of Demonstration
VM’s VBD, VDI, SR and PBD
Storage Path
VBD
VDI
SR
PBD
UUID
Page 45
Summary
Key
Takeaways
The key takeaways for this exercise are discovering:

How to create a local SR and shared LUN using iSL

How to import a Demo VM and able to migrate the virtual disks between
different SRs

That you cannot use Storage XenMotion to/from StorageLink

That StorageLink takes ownership of the entire aggregate (so annoying!)

If you completed the advanced lab:
1. You learned more about enterprise storage provisioning and how storage
is carved out to hypervisors.
2. You learned how to provision a LUN to Xenserver using native iSCSI
protocol
NOTES
Page 46
Lab 3: Networking Lab
Overview
In this exercise, you will learn to:
 Configure an LACP bond
 Create a distributed virtual switch
 Examine vifs, open vswitches and pifs (commands that will come in handy)
Step by step guidance
Estimated time to complete this lab: 20 minutes.
Step Action
1.
Make sure that vXS04 is powered on.
Connect to vXS04 via XenCenter by selecting -> Add:
Connect to this virtual XenServer by adding vXS04 to XenCenter:
2.
Click on the vXS04 Console tab. Hit <Enter> to logon to the console:
3.
Enter the commands:
xe bond-list
xe pif-list
Page 47
Step
4.
Action
Enter the following command to show all of the configured Open vSwitch datapaths:
ovs-dpctl show
The local port is identified as port 0.
Page 48
Step
5.
Action
Click on Create Bond…:
6.
Click on each of NIC1, NIC2 and NIC3 to select them. Choose the LACP with load
Page 49
Step
Action
balancing on IP and ports of source and destination bonding mode.
Click on Create.
7.
The bond is created (Note: Initially – the bond will appear as disconnected – XenCenter
“feature”. Switch between tabs (click on Networking and then click again on NICs tab to
refresh XenCenter)
8.
Click on the Console tab, hit <Enter> to login and then enter the following command:
xe bond-list
Notice a single bond is listed.
9.
To see the configuration of the bond enter the command:
xe bond-param-list uuid=<Tab>
A uuid is normally entered with the above command. Rather than typing the
long uuid of the bond (37b165ed-81c5-b944-e07b-863e9a668aa1 in the
example here) you can use <Tab> completion to enter the uuid for you.
Page 50
Step
10.
Action
To see the bond and LACP status enter the following command:
ovs-appctl bond/show bond0
Notice here, the bond mode is still “balance-tcp” and LACP has not been negotiated. This
is because LACP requires a physical switch to be also configured with LACP and we don’t
have that in the lab.
11.
To list more detailed LACP status, enter the command:
ovs-vsctl list port
Page 51
Step
12.
Action
To show the new vSwitch created for the bond (that VMs connect to) enter the command:
ovs-dpctl show
Lab 3b – Distributed virtual switch lab
13. Connect to the distributed virtual switch console (http://192.168.10.30/)
Page 52
Step
Action
Username: admin
Password: Citrix123
14.
Add Resource Pool – XenPool1 to the console
15.
Examine the metrics collected by this appliance
Page 53
Step
16.
Action
In XenCenter, select XenPool1, click on the “Network” tab to create a “Cross-Server
Private Network:
Page 54
Step
17.
18.
Action
Select Network 0 for Management network
Page 55
Step
19.
20.
Action
The output is as follows:
Switch back to the Distributed Virtual Switch console (web browser), select pool wide
network:
As you can see, the distributed virtual switch status is in “red”.
21.
Lets attempt to generate some traffic on this vSwitch:
Switch to XenCenter, select Demo VM that was imported in the previous lab and click on
“Networking” tab:
Page 56
Step
22.
Action
Change the Virtual Switch to - “Distributed Virtual Switch”.
Login to the demo VM:
Username: root
Password: Citrix123 (or if you have set it to a different password for root during import of
the xva)
Run the following command:
# ping –t localhost
This will generate a ping “flood”
23.
Switch back to the Distributed Virtual Switch console and look at the pool-wide network
for the newly created switch:
Page 57
Step
Action
As you can see, the ping “flood” is generating some traffic (it shouldn’t ) on the virtual
interface.
Stop the ping flood with a Ctrl+C on the VM console.
Lab 3c: Exploring the vif <-> network <-> pif <-> eth# linkage
24. Similar to the Storage lab, lets test our knowledge with the commandline options:
List the demo VMs interfaces within XenServer, list the vifs, pifs and physical interface
associated with it.
Summary
Key
Takeaways
The key takeaways for this exercise are:

Distributed virtual switch only works for “internal networks”

LACP is HERE!! Finally!!

Understand xe commands for vif, pif, ifconfig commands.
NOTES
Page 58
Page 59
Lab 4: Performance Monitoring and
Troubleshooting Lab
Overview
In this exercise you will learn the following:
 Common metrics to measure (XenCenter metrics, new performance counters in XenServer 6.1)
 New performance metrics in 6.1
 TAAS.CITRIX.COM – Upload Server Stats to Citrix Support
 Basic troubleshooting
o Pool Master troubleshooting
o Storage troubleshooting
o Network troubleshooting
In a nutshell, you will be applying all the “skills” learnt in the previous labs to troubleshoot and
resolve the issue(s).
Step by step guidance
Estimated time to complete this lab: 60 minutes.
Step Action
1. The XenServer Performance Monitoring ISO is already downloaded to the Student’s RDP
session Desktop within the Advanced XenServer Training/ISO folder
Page 60
Step Action
2. Use the WinSCP utility to connect to vXS01 and vXS02 (use the IP address) to copy over the
iso to the vXS01 and vXS02’s dom0.
Page 61
Step Action
3. Connect to the dom0 console of each Virtual XenServer (vXS01 and vXS02) to mount the
CD ISO with the following commands:
# mkdir /mnt/cdrom
# mount –ro loop XenServer-6.1-perf-monitoring.iso /mnt/cdrom
Run the following command:
# cd /mnt/cdrom
Follow the steps provided in http://support.citrix.com/article/CTX135033 to install the
performance management pack on vXS01 and vXS02.
Page 62
Step Action
4. Lets examine the new performance counters exposed with XenServer 6.1:
Connect to XenCenter and select XenPool1 -> Performance Tabs:
Select Actions -> New Graph: Select some typical performance monitors that you would
need to monitor for XenApp, XenDesktop and PVs deployments:
Page 63
Step Action
5. Select XenPool1.
Import the performance VM from the “Advanced XenServer Training\Virtual Appliances”
folder
Page 64
Step Action
6. Import the xva to Local SR of vXS01:
Make sure that the VM’s network is assigned to Network0:
Page 65
Step Action
7. After the VM powers on, connect to the Performance VM console in XenCenter:
Username: root
Password: Citrix123
IP address of Performance VM: 192.168.10.31
Access to the web console: http://192.168.10.31:8888
Page 66
Step Action
8. From the Performance VM’s console, run the following command:
./start.sh <Pool Master IP address of XenPool1>
And answer “y” when prompted to preparing for /dev/xvdc
Provide Dom0 password:
This should start the http server for this VM:
Page 67
Step Action
9. Connect to the Web console of performance VM: http://192.168.10.31:8888
10. Discussion point:
Discuss with the fellow teammates on some of the common performance metrics that you
needed to capture at customer sites:
Common questions that come up in projects are:
How many IOPs are used by my SAN?
What is the average latency seen in running XenApp and XenDesktop workloads?
How is my SAN performing (why are my VMs running slow)?
11. Run a small workload on the performance VM with reads, writes (sequential and random)
and measure performance on the web console & XenCenter.
12. Discuss results with the rest of the team.
Is this normal behavior?
What should I be investigating next once I collect this data?
How is this useful?
Lab 4b – TAAS.CITRIX.COM
Page 68
Step Action
13. Has everyone seen this popup?
Some background, Citrix support has several tools internally to analyze log files:
Citrix XenApp/XenDesktop – CDFTRACE
Citrix XenServer – Xenoscope
This is now available for all customers. You can upload server status reports from XenServer
and analyze log files.
Page 69
Step Action
14. Run Server Status report for the virtual XenServer pool – XenPool1:
Select the servers:
Page 70
Step Action
15. Login to https://taas.citrix.com using your citrite login and password:
And upload the log files to the site;
16. The parser will analyze the logs and provide a comprehensive report:
Lab 4c - Break/Fix Lab – (Advanced Lab)
Page 71
Step Action
17. Pre-requisites:
This section of the lab assumes the following:

Demo VM is powered on and running on the Virtual XenServer pool.
 Demo VM virtual storage will be on the NetApp SR2 (from the Storage lab)
If you didn’t attempt the Advanced lab (Lab 2), team with someone who has completed this
or take the time to complete the advanced lab first before proceeding further.
XenPool1 should have:
vXS01 and vXS02.
Page 72
Step Action
18. Copy the following bash scripts (no peeking at the scripts ) to the following XenServers
using winscp:
Copy phys.sh to – the physical XenServer hosting your lab.
Copy virt.sh to – the virtual Xenserver pool master XenServer.
Page 73
Step Action
19. Connect to pool master’s console for XenPool1 (vXS01 or vXS02) via XenCenter:
Run the following commands:
# chmod +x virt.sh
# virt.sh > /dev/null
This should disconnect the XenCenter to XenPool1.
Connect the physical XenServer’s console via XenCenter:
Run the following commands:
# chmod +x phys.sh
# phys.sh > /dev/null
20. Attempt to reconnect to the Virtual XenServer pool and power on Demo VM. Again – no
peeking at the script.
Discuss with the rest of the team on what could have happened.
21. Discussion point: What are the issues seen with the environment?
Pool Master down:
Unable to power on: Demo VM
How do you approach in fixing the issue?
Discuss other troubleshooting scenarios.
22.
Trainer’s notes:
The script(s) will do the following:
a. De-link the Demo VM’s vif
b. De-link the Demo VM’s pbd
c. It will – ifconfig eth0 down on Dom0 for pool master
d. Shutdown NetApp SIM VM.
Networking Debugging
23. Shutdown vXS04 VM.
Page 74
Step Action
And spin up a new VM from template (vXS04):
24. The templates are pre-installed with XenServer 6.0.2.
Attempt to connect to virtual XenServer vXS04 through XenCenter.
Why are you unable to connect to this XenServer?
Page 75
Step Action
Are you able to ping the management IP address 192.168.10.24?
25. Connect to XenServer’s console and examine Management interface.
You can see that eth0 doesn’t have the correct Dom0 IP address.
Attempt to assign IP address from the above console.
Note the error reported by the console.

Why did this not work?
26. Lets switch to the command line:
Page 76
Step Action
Type the following commands:
# ifconfig
(This lists all the active network interfaces)
# ifconfig –a
(this lists all the network interfaces)
Page 77
Step Action
As you can see, the NICs (Network Interface Cards) got re-ordered when we spun-up the
VMs from templates. The MAC addresses for eth0, eth1, eth2 and eth3 has changed.
Hence XenServer created new eth# instead of reassigning them to eth0, eth1, eth2 and eth3.
27. To fix the above issue, you will need to edit the following file:
/etc/udev/rules.d/60-net.rules
Run:
# nano /etc/udev/rules.d/60-net.rules (or vi)
Page 78
Step Action
You will note 4 lines “SUBSYSTEM==”net”
At the end of each line is the eth#:
Page 79
Step Action
Change the values: eth4 - to - eth0, eth5- to - eth1, eth6- to - eth2, eth7 - to - eth3
Save the file (Ctrl+x)
Reboot vXS04.
Upon reboot, attempt to connect to vXS04 via XenCenter console.
Summary
Key
Takeaways
The key takeaways for this exercise are:

New performance metrics available with XenServer 6.1.

Use performance VM to stress test environments.

TAAS.CITRIX.COM – use in IA’s

Break/fix labs – if the pool master goes down, how do you failover to
another server?

How do you recover from a storage failure?

How to recover from a NIC reordering?
NOTES
Page 80
Download