Browse Author

Alex

Expand local Xenserver Storage

Scenario:

The customer has Dell servers with PERC Raid controller. The volume can be expanded at the Raid controller level, so adding a few disks to the same volume is possible. Xenserver however is not expanding the local storage repository automatically. This is what I am simulating in the Lab environment to find a solution. In a lab it is also very convenient to be able to revert to a snapshot. I First installed Xenserver 7.1U1 on a 80GB disk and then expanded the disk to 100GB.

My test lab:

  1. VMware Workstation 12
  2. Xenserver 7.1U1 installed in VM
  3. During Xenserver setup: Enabled thin provisioning (Optimized storage for Xendesktop)

Storage size after install:

After installation I expanded the virtual disk of this VM (where Xenserver is running in) with 20GB. I tried some suggestions like CTX120865, but this is not working on Xenserver 7.1

 

Solution:

[root@XS71 ~]# pvscan
PV /dev/sda3 VG XSLocalEXT-88dff2e2-f06c-c590-4ba8-c8e11a046c86 lvm2 [38.48 GiB / 0 free]
Total: 1 [38.48 GiB] / in use: 1 [38.48 GiB] / in no VG: 0 [0 ]

[root@XS71 ~]# gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.6

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 209715200 sectors, 100.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2116DE1D-4BE4-480F-93FA-D90347718D1E
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 209715166
Partitions will be aligned on 2048-sector boundaries
Total free space is 41945054 sectors (20.0 GiB)

Number Start (sector) End (sector) Size Code Name
1 46139392 83888127 18.0 GiB 0700
2 8390656 46139391 18.0 GiB 0700
3 87033856 167772126 38.5 GiB 8E00
4 83888128 84936703 512.0 MiB EF02
5 2048 8390655 4.0 GiB 0700
6 84936704 87033855 1024.0 MiB 8200

Command (? for help): d
Partition number (1-6): 3

Command (? for help): n
Partition number (3-128, default 3): 3
First sector (34-209715166, default = 87033856) or {+-}size{KMGTP}: 87033856
Last sector (87033856-209715166, default = 209715166) or {+-}size{KMGTP}:
Current type is ‘Linux filesystem’
Hex code or GUID (L to show codes, Enter = 8300): 8E00
Changed type of partition to ‘Linux LVM’

Command (? for help): p
Disk /dev/sda: 209715200 sectors, 100.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2116DE1D-4BE4-480F-93FA-D90347718D1E
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 209715166
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number Start (sector) End (sector) Size Code Name
1 46139392 83888127 18.0 GiB 0700
2 8390656 46139391 18.0 GiB 0700
3 87033856 209715166 58.5 GiB 8E00 Linux LVM
4 83888128 84936703 512.0 MiB EF02
5 2048 8390655 4.0 GiB 0700
6 84936704 87033855 1024.0 MiB 8200

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sda.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.

[root@XS71 ~]# reboot

[root@XS71 ~]# pvresize /dev/sda3 –config global{metadata_read_only=0}
Physical volume “/dev/sda3” changed
1 physical volume(s) resized / 0 physical volume(s) not resized
[root@XS71 ~]# pvscan
PV /dev/sda3 VG XSLocalEXT-88dff2e2-f06c-c590-4ba8-c8e11a046c86 lvm2 [58.48 GiB / 20.00 GiB free]
Total: 1 [58.48 GiB] / in use: 1 [58.48 GiB] / in no VG: 0 [0 ]

 

 

If you did not used the “optimized for VDI” option during Xenserver install, you can skip to the last command (xe sr-scan).

 

 

[root@XS71 ~]# lvdisplay
— Logical volume —
LV Path /dev/XSLocalEXT-88dff2e2-f06c-c590-4ba8-c8e11a046c86/88dff2e2-f06c-c590-4ba8-c8e11a046c86
LV Name 88dff2e2-f06c-c590-4ba8-c8e11a046c86
VG Name XSLocalEXT-88dff2e2-f06c-c590-4ba8-c8e11a046c86
LV UUID D7VyUL-a6oB-b7bJ-S2AA-4wg4-40TC-JdcOuS
LV Write Access read/write
LV Creation host, time XS71, 2017-11-02 11:39:30 +0100
LV Status available
# open 1
LV Size 38.48 GiB
Current LE 9852
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:0

[root@XS71 ~]# lvresize /dev/XSLocalEXT-88dff2e2-f06c-c590-4ba8-c8e11a046c86/88dff2e2-f06c-c590-4ba8-c8e11a046c86 -l +100%FREE –config global{metadata_read_only=0}
Size of logical volume XSLocalEXT-88dff2e2-f06c-c590-4ba8-c8e11a046c86/88dff2e2-f06c-c590-4ba8-c8e11a046c86 changed from 38.48 GiB (9852 extents) to 58.48 GiB (14972 extents).
Logical volume 88dff2e2-f06c-c590-4ba8-c8e11a046c86 successfully resized.
[root@XS71 ~]# lvdisplay
— Logical volume —
LV Path /dev/XSLocalEXT-88dff2e2-f06c-c590-4ba8-c8e11a046c86/88dff2e2-f06c-c590-4ba8-c8e11a046c86
LV Name 88dff2e2-f06c-c590-4ba8-c8e11a046c86
VG Name XSLocalEXT-88dff2e2-f06c-c590-4ba8-c8e11a046c86
LV UUID D7VyUL-a6oB-b7bJ-S2AA-4wg4-40TC-JdcOuS
LV Write Access read/write
LV Creation host, time XS71, 2017-11-02 11:39:30 +0100
LV Status available
# open 1
LV Size 58.48 GiB
Current LE 14972
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:0

[root@XS71 ~]# resize2fs /dev/XSLocalEXT-88dff2e2-f06c-c590-4ba8-c8e11a046c86/88dff2e2-f06c-c590-4ba8-c8e11a046c86
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/XSLocalEXT-88dff2e2-f06c-c590-4ba8-c8e11a046c86/88dff2e2-f06c-c590-4ba8-c8e11a046c86 is mounted on /run/sr-mount/88dff2e2-f06c-c590-4ba8-c8e11a046c86 ; on-line resizing required
old_desc_blocks = 3, new_desc_blocks = 4
The filesystem on /dev/XSLocalEXT-88dff2e2-f06c-c590-4ba8-c8e11a046c86/88dff2e2-f06c-c590-4ba8-c8e11a046c86 is now 15331328 blocks long.

[root@XS71 ~]# xe sr-scan uuid=88dff2e2-f06c-c590-4ba8-c8e11a046c86

Result:

 

Thanks to René for his help with this puzzle.

Storefront upgrade failed

When upgrading a Storefront server version 3.0.4000 to 3.12 (former LTSR to new LTSR), i ran into an error:

The solution in this case was setting all the Citrix services to manual:

After running the upgrade wizard, all the services are set back to automatic.

Brokerservice using Port 89 ?

I noticed that after installing Xendesktop Delivery Controller v 7.15 ,Port 89 is registered in the Windows Firewall. The rule named: Citrix Broker Service (TCP-In), contains all the ports that brokerservice.exe is using. However Port 89 is not used by the brokerservice. When running the command brokerservice.exe /configurefirewall with no additional parameters, the firewall rule is corrected to the actual used ports.

Nvidia M10 and Xenserver

When trying to install Xenserver 7.1 on a Dell R730 equipped with Nvidia Tesla M10 graphic cards, i ran into trouble using the vGPU profiles. The GRID manager software was downloaded from Nvidia.com and the supplemental pack in the zip file installed via Xencenter. The graphic card was recognized and visible in Xencenter, however there where no vGPU profiles visible.

 

Solution: Do not use the nvidia zip file with the word “Kepler” in it. Instead go to NVIDIA Enterprise

Create an account and request evaluation GRID licenses. Then you can access the downloads for the Tesla based Nvidia cards.

 

Note that you cannot remove the GRID Manager supplemental pack from your Xenserver, so if you already installed the wrong one you have to reinstall Xenserver.

 

 

 

PVS Xendesktop wizard

Today I was using the Xendesktop setup wizard in PVS to create VDI desktops in a XenServer pool with only local storage. The wizard is creating the vm’s on one server instead of distributing them over all servers in the pool. This is no problem if you are deploying a couple of XenApp VM’s, then you can simply move them one-by-one to other Xenservers in the pool. However, it is a different story if the task is to deploy 500+ Xendesktop VM’s.

I noticed  that the VM’s where placed on the used template “Home server”. Changing the “home server” setting, changed on which Xenserver the VM’s were placed by the wizard.

I found a workaround in adding a SR to the Pool allowing the template to be set to “don’t assign this vm a home server”. After this change in the template settings the XDSW creates the VM’s across all Xenservers.

The new and only shared SR has no function, so this seems to be a flaw in Xenserver or the XDSW.

Used versions:

  • PVS 7.9
  • XenDesktop 7.6.4000
  • Xenserver 7.1