Home » usb

Tag: usb

WD MyCloud External USB Drive showing 0Kb

Problem.

A Client had an network attached WD MyCloud 3TB Drive and had attempted to attach an external 3TB disk (re-purposed with an external JMicron Hard drive caddy)

Regardless of formatting it as NTFS, exFAT  -the JMicron controller was being recognised but the 3TB Disk partition swasnt

Solution.

Attach the disk to windows and ensure an EFI partition has not been created.

If an EFI partition exists, remove it using diskpart from an elevated command prompt.

(use command: delete partition override as the EFI partition will be marked as protected)

This is what worked for us in this instance and hope it helps others.

Citrix Receiver 4.2 BSOD

Problem: Citrix Receiver 4.2 BSOD (and 4.1)

During the installation of the new Citrix Receiver 4.2 (and 4.1), laptops, desktops and VMs were all blue screening at about 70% through the installation process.

Citrix Receiver 4.2 Install BSOD

 

STOP: 0x000000CA

And on restart we received

Problem signature:
Problem Event Name: BlueScreen
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 2057

Additional information about the problem:
BCCode: ca
BCP1: 0000000000000002
BCP2: FFFFFA8003A96060
BCP3: 0000000000000000
BCP4: 0000000000000000
OS Version: 6_1_7601
Service Pack: 1_0
Product: 256_1

 

If you have already installed it and BSOD’ed your machine you MUST select F8 and choose ‘Last Known Good Configuration’ on reboot otherwise its likely the machine will then be bricked.

Workaround

Disable any USB device scanning or blocking software

Uninstall or disable the Landesk agents

Solution

This is more than likely related to the citrixusb driver installation so disable any USB driver or device blocking software.

In our instance (and after much troubleshooting) turns out it was a conflict with the Landesk (blocking USB device insert / install) 9.5 SP2 (“C:\Program Files (x86)\LANDesk\Shared Files\residentAgent.exe” version = 9.0.3.45)

Upgrade Landesk agents to 9.6 SP1

(“C:\Program Files (x86)\LANDesk\Shared Files\residentAgent.exe” version will = 9.60.0.225)

XenServer Mount USB from HOST

Situation: USB Drive attached to the XenServer host, need to mount directly into a VM for removable usb drive access.

Solution: Download the usbmount.bat from http://support.citrix.com/article/CTX118198

Edit the file with your xenserver details  and your vm and usb uuid’s.

HOW DO I FIND MY XENSERVER VM UUID?

bring up a console session on the XenServer and run

xe vm-list

HOW DO I FIND MY XENSERVER USB UUID?

the citrix provided command for listing Removable storage didn’t return any results in my setup.

xe sr-list name-label=Removable Storage

So under the XenServer Console > Click the Removable storage node in the console > Right click and copy the UUID Displayed

 

RUNNING THE SCRIPT

Edit the below script with your details

then run

usbmount.bat ATTACH

or

usbmount DETACH

—————————————————————————————–START SCRIPT —————————————————————————————————-

@ECHO OFF
setlocal
REM Attach a USB flash device to a specified VM on XenServer 4.x

REM ————- EDIT THE OPTIONS BELOW TO SUIT YOUR ENVIRONMENT ————-

REM XenServer Credentials
SET XE_USERNAME=root
SET XE_PASSWORD=CHANGEME
SET XE_SERVER=xxx.xxx.xxx.xxx

REM Removable Storage Repository UUID
SET REMOVABLE_SR_UUID=CHANGEME

REM UUID of the VM you wish to attach the USB storage to
SET VM_UUID=CHANGEME

REM Device name/order on the VM (e.g. hdb, hdc, hdd…)
set DEVICE_NAME=hdb

REM —————————————————————————

REM XenCenter Path
SET XE_CENTER_PATH=C:program filescitrixXenCenter

REM XE Binary and Baseline Parameters
SET XE_EXEC=”%XE_CENTER_PATH%xe.exe” -s %XE_SERVER% -u %XE_USERNAME% -pw %XE_PASSWORD%

REM Temporary working file
SET TEMP_FILE=%TEMP%/xs-usbmount.tmp

REM ———— DO NOT EDIT BEYOND THIS LINE —————-

IF “%1″==”ATTACH” GOTO ATTACH_STORAGE
IF “%1″==”DETACH” GOTO DETACH_STORAGE

REM No parameters
echo Usage USBMOUNT.BAT ^<ATTACH ^| DETACH^>
GOTO END

:DETACH_STORAGE
%XE_EXEC% vdi-list sr-uuid=%REMOVABLE_SR_UUID% params=vbd-uuids –minimal > %TEMP_FILE%
SET /P VBD_UUIDS= < %TEMP_FILE%

IF “%VBD_UUIDS%”==”” GOTO NOT_BOUND
%XE_EXEC% vbd-unplug uuid=%VBD_UUIDS%
%XE_EXEC% vbd-destroy uuid=%VBD_UUIDS%
echo.Storage Detached

GOTO END

:ATTACH_STORAGE

REM See if the storage is already bound to a VBD
%XE_EXEC% vdi-list sr-uuid=%REMOVABLE_SR_UUID% params=vbd-uuids –minimal > %TEMP_FILE%
SET /P VBD_UUIDS= < %TEMP_FILE%

IF NOT “%VBD_UUIDS%”==”” GOTO ALREADY_BOUND

%XE_EXEC% vdi-list sr-uuid=%REMOVABLE_SR_UUID% params=uuid –minimal > %TEMP_FILE%
SET /P VDI_UUID= < %TEMP_FILE%

%XE_EXEC% vbd-create vm-uuid=%VM_UUID% device=%DEVICE_NAME% vdi-uuid=%VDI_UUID% –minimal > %TEMP_FILE%
SET /P VBD_UUID= < %TEMP_FILE%

%XE_EXEC% vbd-plug uuid=%VBD_UUID%

echo.VBD UUID attached as: %VBD_UUID%
GOTO END

:ALREADY_BOUND
echo.Removable storage already attached to a VM – aborting.
GOTO END

:NOT_BOUND
echo.Storage device not bound to any VMs – aborting.
GOTO END

:END
endlocal