Chinaunix首页 | 论坛 | 博客
  • 博客访问: 680398
  • 博文数量: 291
  • 博客积分: 10025
  • 博客等级: 上将
  • 技术积分: 2400
  • 用 户 组: 普通用户
  • 注册时间: 2004-12-04 12:04
文章分类

全部博文(291)

文章存档

2008年(102)

2007年(112)

2006年(75)

2004年(2)

我的朋友

分类:

2006-11-08 15:34:36

although ESX can’t map USB device to virtual machine, it can recognize USB device directly attached to it. the only limitation is your partition on USB device must be FAT32. so we can use a big capacity USB acting as a backup target to backup template, export virtual machine etc.

below is a example:

1)     attach USB device to ESX

2)     use fdisk –l to verify USB is recognized by ESX

# fdisk –l

......

Disk /dev/sdf: 40.0 GB, 40007761920 bytes

255 heads, 63 sectors/track, 4864 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot    Start       End    Blocks   Id  System

/dev/sdf1             1      2483  19944666    c  Win95 FAT32 (LBA)

/dev/sdf2          2484      4863  19117350    f  Win95 Ext'd (LBA)

/dev/sdf5          2484      4863  19117318+   b  Win95 FAT32

……

3)     use dmesg to double check

dmesg |grep sdf

VMWARE: Device that would have been attached as scsi disk sdf at scsi0, channel 0, id 2, lun 0

VMWARE: Device that would have been attached as scsi disk sdf at scsi0, channel 0, id 2, lun 0

VMWARE SCSI Id: Supported VPD pages for sdf : 0x20 0x0

VMWARE SCSI Id: Could not get disk id for sdf

:VMWARE: Unique Device attached as scsi disk sdf at scsi2, channel 0, id 0, lun 0

Attached scsi disk sdf at scsi2, channel 0, id 0, lun 0

SCSI device sdf: 78140160 512-byte hdwr sectors (38154 MB)

 sdf: sdf1 sdf2 < sdf5 >

4)     mount USB disk

mount /dev/sdf1 /mnt/usb1

mount /dev/sdf5 /mnt/usb2

if your file name have Chinese character, please use below command:

mount -o codepage=936,iocharset=gb2312 -t vfat /dev/sdf5 /mnt/usb2

[root@BI-ESX2 root]# ls -l /mnt/usb1

总用量 3864496

drwxr-xr-x    4 root     root        16384  6 22 10:51 docs

drwxr-xr-x    2 root     root        16384 10 18 11:22 ghost

-rwxr-xr-x    1 root     root     3956889600 11  6 17:57 kelu.iso

drwxr-xr-x    2 root     root        16384  8 31 23:05 mp3

drwxr-xr-x    5 root     root        16384 10 18 15:25 office

drwxr-xr-x    6 root     root        16384  6 22 11:23 Recycled

drwxr-xr-x    8 root     root        16384  6 22 10:20 System Volume Inform

on

drwxr-xr-x    5 root     root        16384  6 22 10:52 wangyue

drwxr-xr-x    3 root     root        16384  6 22 10:52 其它

drwxr-xr-x    3 root     root        16384  6 22 10:51 各种文件

drwxr-xr-x    2 root     root        16384  6 22 10:52 名单

drwxr-xr-x    8 root     root        16384  6 22 10:52 对内公文

drwxr-xr-x    2 root     root        16384  6 22 11:22 彩票广告

drwxr-xr-x    3 root     root        16384  6 22 10:52 我接收到的文件

drwxr-xr-x    7 root     root        16384  6 22 11:22 新建文件夹

drwxr-xr-x    3 root     root        16384  6 22 11:22 模拟与练习

drwxr-xr-x    2 root     root        16384  6 22 13:49 游戏

drwxr-xr-x   24 root     root        16384  7 27 11:48 照片

drwxr-xr-x    2 root     root        16384  6 22 13:49 礼品

drwxr-xr-x    2 root     root        16384  6 22 10:52 考勤

drwxr-xr-x    2 root     root        16384  6 22 13:48 通讯

drwxr-xr-x    6 root     root        16384  6 22 10:52 项目经理

 

阅读(1074) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~