
VMware, Inc. 363
Chapter 16 Connecting Devices
Avoiding Concurrent Access on Linux Hosts
TheSCSIgenericdriversetsupamappingforeachSCSIdevicein/dev.Eachentry
startswithsg(fortheSCSIgenericdriver)followedbyanumber.Forexample,
/dev/sg0isthefirstgenericSCSIdevice.EachentrycorrespondstoaSCSIdevicein
theorderspecifiedin/proc/scsi/scsi,fromthelow
estdeviceIDonthelowest
adaptertothehighestdeviceIDonthelowestadapter,andsoontothehighestdevice
IDonthehighestadapter.
SomeLinuxdevicessuchastapedrives,diskdrives,andCD‐ROMdrivesalreadyhave
adesignated/deventry(st,sd,andsr,respectiv
ely).WhentheSCSIgenericdriveris
installed,Linuxidentifiesthesedeviceswithcorrespondingsgentriesin/devin
additiontotheirtraditionalentries.Workstationensuresthatmultipleprogramsare
notusingthesame/dev/sgentryatthesametimebutcannotalwaysensurethat
multipleprogramsarenotus
ingthe/dev/
sgentryandthetraditional/deventryat
thesametime.WhenyouspecifywhichSCSIdevicetouseinavirtualmachine,donot
specify/dev/st0or/dev/sr0.
Add a Generic SCSI Device to a Virtual Machine
TomapvirtualSCSIdevicesonavirtualmachinetophysicalgenericSCSIdeviceson
thehost,youmustaddagenericSCSIdevicetothevirtualmachine.
Beforeyoubegin,makesureyouhavethefollowingrequiredpermissions:
OnWindowshosts,toaccesshostSCSIdevicesasgenericSCSIdevices,youmust
runWorkstationasauserwithadministratoraccess.
OnLinuxhosts,genericSCSIrequiresversion2.1.36orhigheroftheSCSIGeneric
(sg.o)driver,whichcomeswithkernel2.2.14andhigher.Also,youmustbe
loggedonasauserwhohaspermissionstousethedevice(thatis,readandwrite
permissions).
To add a generic SCSI device to a virtual machine
1 Selectthevirtualmachine.
2 ChooseVM>Settings.
3O
ntheHardwaretab,clic
kAddtostarttheAddHardwarewizard.
4OntheHardwareTypepage,selectGenericSCSIDeviceandclickNext.
CAUTIONDonotattempttousethesamegenericSCSIdeviceinbothhostandguest.
Thiscancauseunexpectedbehaviorandmightcauselossorcorruptionofdata.
Kommentare zu diesen Handbüchern