Virtual Machine Troubleshooting

The virtual machine troubleshooting ways address common issues that you may experience while utilizing your virtual machines.

Error Message when Administrator Trying to Migrate Virtual Machine with USB Devices Attached

When you connect numerous USB devices from an ESXi host to a virtual machine and one or more devices are not enabled for vMotion, migration using vMotion is prevented and a perplexing error message appears.

Problem

Before starting a migration process, the Migrate Virtual Machine wizard performs a compatibility check. The compatibility check fails if unsupported USB devices are discovered, and an error message similar to this appears: The currently connected device ‘USB 1’ is using an inaccessible backing ‘path:1/7/1’.

Cause

To pass vMotion compatibility checks, you must enable vMotion for all USB devices connected to the virtual machine from a host. Migration will fail if one or more devices are not enabled for vMotion.

Solution

Before uninstalling the devices, be sure they aren’t in the middle of exchanging data.

Re-add and enable vMotion for each USB device that is affected.

Cannot Copy Data From an ESXi Host to a USB Device that is Connected to the Host

A USB device can be connected to an ESXi host and data copied from the host to the device. For example, after the host loses network access, you might want to collect the VM-support bundle from it. You must first turn off the USB arbitrator in order to complete this procedure.

Problem

The USB device displays under lsusb when the USB arbitrator is used for USB passthrough from an ESXi host to a virtual machine, but it does not mount successfully.

Cause

This issue arises because the virtual machine is assigned to the nonbootable USB device by default. Despite the fact that lsusb can see the device, it does not appear on the host’s file system.

Solution

1 Stop the usbarbitrator service by typing /etc/init.d/usbarbitrator stop in the terminal.

2 Disconnect and reconnect the USB device physically.

/vmfs/devices/disks/mpx.vmhbaXX:C0:T0:L0 is the default device location.

3 Restart the usbarbitrator service after reconnecting the device: /etc/init.d/ usbarbitrator start

4 Restart hostd and any running virtual machines to regain access to the virtual machine’s pass through devices.

Reconnect the USB devices to the virtual machine.

Recover Orphaned Virtual Machines

Virtual machines appear with orphaned appended to their names on vcenter.

Problem

In rare instances, virtual machines on an ESXi host managed by vCenter Server may become orphaned. The vCenter Server database contains such virtual machines, but the ESXi host no longer recognizes them.

Cause

If a host failover fails, or the virtual machine is unregistered directly on the host, the virtual machine becomes orphaned. If this happens, transfer the orphaned virtual machine to a different host in the data center where the virtual machine files are kept.

Solution

Determine where the virtual machine configuration (.vmx) file is stored in the datastore –

a. Click the Datastores tab after selecting the virtual machine in the vSphere Web Client inventory.

The datastore or datastores containing the virtual machine files are presented.

b. If there are many datastores visible, pick each one and use the file browser button to find the.vmx file.

c. Double-check the.vmx file’s location.

In the vSphere Web Client, go back to the virtual machine, right-click it, and choose All Virtual Infrastructure Actions > Remove from Inventory.

To confirm the virtual machine’s removal, select Yes.

vCenter Server should be used to re-register the virtual machine.

a. Select Register VM from the context menu of the datastore where the virtual machine file is stored.

b. Click OK after browsing to the.vmx file.

c. Click Next after selecting the virtual machine’s location.

d. Click Next after selecting the host on which the virtual machine will run.

e. Click the Finish button.

Virtual Machine Does Not Power On After Cloning or Deploying from any Templates

After you complete the clone or deploy from template workflow in the vSphere Web Client, virtual machines do not power on.

Problem

When you clone a virtual machine or deploy a virtual machine from a template, you might not be able to turn it on right away.

Cause

When virtual machine disks are created, the swap file capacity is not allocated.

Solution

Reduce the size of the swap file that the virtual machine requires. Increase the virtual machine memory reserve to accomplish this.

Select Edit Settings from the virtual machine’s right-click menu.

Click Memory after selecting Virtual Hardware.

To increase the amount of memory allotted to the virtual machine, use the Reservation drop-down option.

Click the OK button.

You can also enhance the amount of space available for the swap file by removing additional virtual machine disks from the datastore where the swap file is stored.

In the vSphere Web Client object navigator, go to the datastore.

Go to the VMs tab.

Select Migrate from the right-click menu for each virtual machine you want to move.

Change storage only is selected.

Follow the Migrate Virtual Machine wizard’s instructions.

Change the swap file location to a datastore with enough space to improve the amount of space available for the swap file.

In the vSphere Web Client object navigator, go to the host.

Select the Configure tab from the drop-down menu.

Select Swap file location under Virtual Machines.

Select Edit.

Select Use a specific datastore and choose one from the drop-down menu.

Click OK.

Leave a Comment

Your email address will not be published.