VMware Communities
robadawb
Contributor
Contributor

Remove a Mapped Raw LUN from a running VM

I'm not sure if this can be done but I wanted to confirm and/or get an opinion on the matter. Before attempting to remove the LUN from the VM I removed the SCSI device from the guest OS and confirmed that it was no longer there.

echo 1 > /sys/bus/scsi/drivers/sd/<SCSI-ID>/delete

After that I right-clicked on the VM, selected Edit Settings, selected the correct LUN, and clicked Remove. After this task completed the VM became unresponsive. I was unable to ping it and the virtual console was frozen. The VM was still listed as Powered On in vSphere and from the ESX host that it was running on. To my knowlege there was nothing to indicate a problem in the Guest OS logs nor the VMware logs. Below are some lines from the VM vmware.log file.

Jun 10 10:53:21.448: vmx| TOOLS received request in VMX to set option 'synctime' -> '1'
Jun 10 10:53:21.451: vmx| VMXVmdb_LoadRawConfig: Loading raw config
Jun 10 10:53:21.968: vmx| Vix: [104346 vmxCommands.c:1929]: VMAutomation_HotPlugBeginBatch. Requested by connection (0).
Jun 10 10:53:22.047: vmx| Vix: [104346 vmxCommands.c:1861]: VMAutomation_HotRemoveDevice
Jun 10 10:53:22.048: vmx| VMAutomation: Hot remove device. asyncCommand=ABF1760, type=50, idx=14
Jun 10 10:53:22.048: vcpu-0| LSI:Rescan requested for scsi2...
Jun 10 10:53:22.049: vcpu-0| Destroying virtual dev for scsi2:14 vscsi=14162
Jun 10 10:53:22.050: vcpu-0| scsi2:14: numIOs = 0 numMergedIOs = 0 numSplitIOs = 0 ( 0.0%)
Jun  10 10:53:22.052: vcpu-0| DISKLIB-VMFS  :  "/vmfs/volumes/4d66869f-b9e84f89-8722-0015177d0d37/Sangw5/Sangw5_43-rdmp.vmdk"  : closed.
Jun 10 10:53:22.077: vcpu-0| VMXVmdb_LoadRawConfig: Loading raw config
Jun  10 10:53:22.099: vcpu-0| Vix: [109542 vmxCommands.c:1580]:  VMAutomation: Hot plug completed. err=0, vmdbErr=0,  asyncCommand=ABF1760, OpCode=139
Jun 10 10:53:22.411: vmx| Vix: [104346 vmxCommands.c:2011]: VMAutomation_HotPlugCommitBatch: commiting the HotPlug Batch.
Jun  10 10:53:22.412: vmx| Vix: [104346 vmxCommands.c:1580]: VMAutomation:  Hot plug completed. err=0, vmdbErr=0, asyncCommand=AD1C9E8, OpCode=159
Jun 10 10:53:30.998: vmx| GuestRpcSendTimedOut: message to toolbox timed out.
Jun 10 10:53:46.000: vmx| GuestRpcSendTimedOut: message to toolbox timed out.
Jun 10 10:53:46.000: vmx| GuestRpc: app toolbox's second ping timeout; assuming app is down
Jun 10 10:53:58.596: vmx| Vix: [104346 vmxCommands.c:314]: VMAutomation_Reset
Jun 10 10:53:58.597: vmx| Vix: [104346 vmxCommands.c:378]: VMAutomation_Reset. Trying hard reset

Like I said, I'm not sure if this can be done while the VM is powered on. However, if somone has succesfully accomplished this or can point me to some documentation that can explain the processs I would greatly appreciate a reply.

Cheers,

Rob


----Bulletin ID----- -----Installed----- ------------Summary-------------
BCD-bna-2.3.0.2-00000 2011-02-11T12:54:02 bna: net driver for VMware ESX  
BCD-bfa-2.3.0.2-00000 2011-02-11T12:54:18 bfa: scsi driver for VMware ESX 
ESX400-Update03       2011-05-19T10:30:20 VMware ESX 4.0 Complete Update 3


vSphere Client 4.0.0

Build 385281


vCenter Server 4.0.0

Build 208111

Guest OS

SLES 10 SP1 i586

Tags (4)
0 Kudos
1 Reply
robadawb
Contributor
Contributor

I created a new VM and was able to add and remove LUNs from the VM without any impact to the guest OS. So, this not necessarily a problem with VMware but rather the guest OS, or perhaps a communication error between the guest OS and the hypervisor.

0 Kudos