Playing with XenServer in my testlab (basically as a VM in VMware Workstation hah!) I ran into trouble while creating a Machine Catalog via Citrix Desktop Studio. I forget the exact message but it was about lack of resources. I could see that in the create catalog process it was creating a snapshot and making a copy VM, powering it on and off successfully, and then it was failing. I kept an eye on my storage during this and saw that indeed it was exceeding the allocated space. I had thought it would do thin provisioning but in retrospect I realize XenServer never asked me about thick or thin when I added my iSCSI storage. Hmm.
Well turns out that for iSCSI XenServer has only thick provisioning. You get thin provisioning only if you are using the ext3 filesystem or NFS. Since iSCSI uses LVM, bummer!
Here’s a forum post on how to identify if your SR is thick or not.
Regarding thin provisioning – it is only for locally attached storage (which can use ext3) or NFS. Block attached storage is thick.
Before I realized all this I had spent some Googling on how to create a thin provisioned SR (Storage Repository). I felt that maybe it’s a GUI restriction and I can workaround by using the CLI. Turns out I was wrong. Here’s an article that explains SRs in XenServer anyway. It’s a good read. Here’s an article just on enabling thin provisioning for ext3 SRs via the CLI.
While on the topic of storage, this is something I wanted to blog about earlier but never got around to. When using SMB/ CIFS shares, XenServer only supports NTLMv1. Here’s instructions on using NTLMv2.
smbclient is a good tool to test SMB connects from a XenServer. Example:
[root@xs7-02 /]# smbclient -L //10.10.1.12/Files -U rockylabs\rakhesh -m SMB3
Enter rockylabsrakhesh's password:
session setup failed: NT_STATUS_LOGON_FAILURE
That seems to work, but I get a logon failure. This is because I didn’t put the username in quotes.
[root@xs7-02 /]# smbclient -L //10.10.1.12/Files -U 'rockylabs\rakhesh' -m SMB3
Enter rockylabs\rakhesh's password:
Domain=[ROCKYLABS] OS= Server=
Sharename Type Comment
--------- ---- -------
ADMIN$ Disk Remote Admin
C$ Disk Default share
D$ Disk Default share
IPC$ IPC Remote IPC
I have no idea what the three commands below except that they are to do with mounting an SMB/ CIFS share on a XenServer permanently. I had noted these commands as part of my would be blog post, but it’s been a while now and I forget. Sometime when I get around to doing SMB3 or NTLMv2 with XenServer again I hope to refer to these again and better explain. I don’t want to spend too much time on XenServers now and get sidetracked …
xe sr-create name-label=data02_ISO_Store type=ISO shared=true device-config:location=//data02.rockylabs.zero/Files device-config:username='rockylabs\xssmb' device-config:password='Password1' device-config:options='-t cifs'
xe-mount-iso-sr //data02.rockylabs.zero/Files -o username=xssmb,password=Password1,domain=rockylabs,vers=3
# I don't think this command really works - not sure
xe-mount-iso-sr //data02.rockylabs.zero/Files -o username=xssmb,password=Password1,domain=rockylabs,sec=ntlmv2
After issue the above commands I think the shared folder is mounted only on one host in the pool. But right clicking on it and doing a repair will get it mounted on all hosts in the pool.
XenServer 7.0 and above support SMB for VM disk storage too. Prior versions support SMB only for ISO storage.