Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 8

VM Failed

- vCenter Troubleshooting TIPS - How to find who deleted a VM


If we need to check who deleted a Virtual Machine from our vCenter.
Looking this task in logs can be painful and spend lot of time,
so the best way to check this is in the vCenter DB.

Just connect to vCenter DB(default DB should be VCDB and using SQL


Server Management Studio) and run a small query and you will have all the
information.

Query:
SELECT CREATE_TIME, USERNAME, VM_NAME, HOST_NAME, EVENT_TYPE FROM
VCDB.DBO.VPX_EVENT WHERE EVENT_TYPE = 'vim.event.VmRemovedEvent'
AND VM_NAME = 'VMNAME'

SELECT Create_Time, Username, VM_Name, Host_Name, Event_Type


FROM VCDB.VPX_Event
WHERE Create_Time BETWEEN '2018-09-01' AND '2018-10-31'
AND VM_Name = 'RECARCHSRV01'

NOTE: (Where the VMNAME is the name of your Virtual Machine that was
deleted.)

If you don't know the full name of the VM, you can just use
wildcards(AND VM_NAME LIKE 'VM%'). This will show all results from
all Virtual Machines that start with 'VM'.
You can use many different wildcards to look for the right result.
Please check Microsoft KBQ98434 how to use wildcards.

Using VPX_EVENT you can query lot of events/tasks that was performed on
VMs/Hosts.

Example:
vim.event.VmPoweredOffEvent - Virtual Machines that were
Poweroff(without using Guest Powerdown)

We can also use the same query using PowerShell Script o check events.

Example(VM created)
Get-VM -Name 'VMNAME' | Get-VIEvent -Types Info | Where
{$_.GetType().Name -eq "VmCreatedEvent"}
Select UserName, CreatedTime, FullFormattedMessage | FT -AutoSize

You can also list the last VMs deleted, or any other event(just change
the event id for the event you want to list).

You can consult all machine events and that can be used in the above
query/script VMware vSphere API Reference Documentation

- Change Adapter type

Backup the vmx file before editing as a precaution.

Example: changing first adapter

ethernet0.virtualDev = "e1000" change to ethernet0.virtualDev =


"vmxnet3"
If you have more than one adapter, you would see ethernet1, ethernet2,
and so on.
- Cannot power on HARPACS01.PSHRC.local on 10.1.7.8 in PSHRC.DC. The parent
virtual disk has been modified since the child was created.
The Content ID of the parent virtual disk does not match the
corresponding parent content ID in the child.
-> Failed to start the virtual machine.
-> Module Disk power on failed.
-> Cannot open the dsk '/vmfs/volume/5293c8ff-9c494db8-84d1-
40f2e94c22ba/HARPACS01.PSHRC.local_4-000002.vmdk' or one of
the snapshot disks it depoends on.
-> The parent virtual disk has been modified since the child was
created. The content ID of the parent disk does not match the
corresponding parent content ID in the child

CAUSE:
VM snapshot is deleted.
Consolidated when the VM Snapshot is not finish

Steps in checking;
1. Right click the VM that have an issue click EDIT SETTINGS.
A. Check all the hard drive connected if all have Provision Size.
If one of the disk is zero (ZERO). get the Disk Filename. Close the MENU.
B. Click the VM then go to Summary from the right menu up. Select
storage, right click then Browse DataStore,
Select the directory of the VM, then search the filename of
the Disk, check the size, if the size is good.. proceed in Solution.
If no zero open a ticket.

SOLUTION: (Two ways)


GUI MODE;
1. Download the file that have an issue and check the Content ID
of the first disk.
2. Edit the 2nd disk and input the CID of the 1st disk to
ParentCID of the 2nd disk.

Terminal/ Console.

1. Go to Host of the VM (ex. 10.1.7.10) Click Configuration then


from Services Select Properties.
A. Search for SSH, Select then click OPTIONS. Start the
service. Close
B. Open putty input the IP of the host, and supply the
credentials. usercdname: root/ password: P@ssw0rd
C. If successfull login, go to directory of the file.
a. [root@habladesrv16:~]cd /vmfs/volumes/5293c8ff-
9c494db8-84d1-40f2e94c22ba/HARPACS01.PSHRC.local/ (ENTER)
b. Inside the directory there is alot of file check
the file name that you listed then run;

- vmkstools -e (filename of the file that have


issue)_4-000002.vmdk (there will be a messages like this)

The parent content ID of the parent virtual disk does not


match the corresponding parent content ID in the child parent CID.
Parent link description
Name /vmfs/volume/5293c8ff-9c494db8-84d1-
40f2e94c22ba/HARPACS01.PSHRC.local/HARPACS01.PSHRC.local/
Create Type: vmfs
Capacity: 16106142736000
Contentent ID: 956983609
Parent Content ID: 4294967295
Child link description
Name /vmfs/volume/5293c8ff-9c494db8-84d1-
40f2e94c22ba/HARPACS01.PSHRC.local/HARPACS01.PSHRC.local/
Create Type: vmfsSparse
Capacity: 16106142736000
Contentent ID: 2969425962
Parent Content ID: 2241443480 <--- THIS IS THE ISSUE:
Disk chain is not consistent: The parent virtual disk has
been modified since the child was created.The content ID of the parent disk does
not match the corresponding parent content ID in the child
(18)

c. Test other disk if there is same issue. If no


issue proceed in check the content ID and Parent CID information by issuing
command;

grep -i CID (filename of the file that have


issue)_4-000002.vmdk (there will be a messages like this)
CID=de688dba

d. Edit the file that have an issue in Disk chain by


issuing the command;
vi (filename of the file that have issue)_4-
000002.vmdk (edit the line)

CID=de688dba
ParentCID=(content ID of the Parent Disk) ex.

Disk 01
CID=ab123ba
ParentCID=cd123dc

Disk 02
CID=ef123fc
ParentCID=ab123ba

-SAVE and Exit the file.

e. Run again to check for errors;


vmkstools -e (filename of the file that have
issue)_4-000002.vmdk (if no error messages)

f. Close putty, Create Snapshot, Consolidate Shapshot


then POWER-ON the VM if VM startup.

g. Go to Host. Configuration, Properties, SSH,


Options Stop the servies. then close.

EVENT 1000 (WARNING)

Got a response from VMware Tech Support: We have seen messages similar to
this caused by a tie in to the Unity module on the hosted hypervisor and
the lack of the Unity feature in vSphere. The developers are working on
changing the code in a future release As a workaround solution, follow the steps
below:
� Disable unity in the tools config file. The config file location and
the entry to be added are as follows: o
Tools config file location: � Windows XP and Windows Server
2000/2003:
C:\Documents and Settings\AllUsers\ApplicationData\VMware\VMware
Tools\tools.conf �Windows Vista, Windows 7, and Windows Server 2008:
C:\ProgramData\VMware\VMware Tools\tools.conf o Tools config file
content to be added: � [unity]
� pbrpc.enable = false Notes:
� If the config file doesn't exist, you should create one
� The Application Data/ProgramData folder is hidden
� You'll need to edit this file as Administrator (i.e.,
right-click "Start > All Programs > Accessories > Notepad" and select "Run as
administrator"

VMTOOLS WARNING-EVENT ID 1000: [WARNING][VMUSER:VMUSER] SOCKET FAILED TO CREATE


SOCKETM ERROR 10106

Solution:
When VM Tools warning message starts. you will see the windows event
log is full of VMTools warning message as shown below.

Vmtools error in w2k3-01

To work around this issue, disable VMware Tools logging to the Event
Log and general virtual machine logging to the vmware.log file for the virtual
machine.

Note: If you encounter issues with VMware Tools, the logging will need
to be enabled again for troubleshooting.

To disable VMware Tools application event logging:

Open the tools.conf file using a text editor. The tools.conf file is
located at:
Windows XP and Windows Server 2000/2003:C:\Documents and
Settings\All Users\Application Data\VMware\VMware Tools\ (in my case)
Windows Vista, Windows 7, and Windows Server
2008:C:\ProgramData\VMware\VMware Tools\
Linux:/etc/vmware-tools/tools.conf

Go to above mentioned path. i saw there is no file with name tools.conf


exists. if this is same with you. then create a file by yourself.

Vmtools error in w2k3-02

Create a file with name tools.conf and edit it with notepad or any
other editor as shown below.

Add this section to the tools.conf file:

[logging]
vmusr.level = error
vmsvc.level = error

Vmtools error in w2k3-03

Save and close the file.


Restart the VMTools service (Administrative Tools > Services).

Vmtools error in w2k3-04

Note: If there are users logged in to more than one session,


restarting the VMTools service may not be sufficient.
You may have to kill the vmtoolsd.exe process for all
instances.

Verify:
Now if you go to Event Logs of your VM. you will see there is no
more warning events for VM Tools.

HOW TO'S

//----- CLONE OR COPY VIRTUAL MACHINE IN VMWARE vSphere Hypervisor ESX/ESXi


4.x or ESXi 5.0 -----//
(https://www.experts-exchange.com/articles/9249/HOW-TO-Clone-or-Copy-a-
virtual-machine-in-VMware-vSphere-Hypervisor-ESX-ESXi-4-x-or-ESXi-5-0.html)

1. Connect to the VMware vSphere Hypervisor Server

Using the VMware vSphere Client, login and connect to the


ESX/ESXi server, using the IP address or hostname of the ESX/ESXi server,
Using the root username and password credentials. If you
have a VMware vSphere vCenter server, you could also specify
IP address or hostname of the vCenter server which manages
your ESX/ESXi servers.

- Using the VMware vSphere Client, login and connect to the


VMware ESX/ESXi server

2. Select and browse the datastore

Once connected to the server, the VMware vSphere Client


will display the following inventory of the VMware vSphere ESX/ESXi server.

Connected to VMware ESX/ESXi server


The datastore properties are shown on the right hand side

Datastore Properties
Select the datastore, if you've not rename the datastore,
the datastore default name is datastore1.

Right Click the datastore datastore1 and select Browse


datastore. All VMware virtual machine files are stored in the datastore.

Browse Datastore

3. Select the correct virtual machine folder

The Datastore Browser will open and show the contents of


the datastore. The virtual machines are stored in folders.

Datastore Browser - datastore contents


Double click the virtual machine folder you need to clone
or copy.

4. Create a destination virtual machine folder for the virtual


machine clone or copy

Select the root (/) of the datastore, and click the New
Folder icon to create a new destination folder for the new virtual machine clon or
copy..

Create folder
Enter a name for the folder name followed by OK.

Enter folder name


The folder will be created in the root of the datastore

Folder Created in root of the datastore

5. Select and Copy Virtual Machine files

Before you can CLONE/COPY the virtual machine files the


Virtual Machine needs to be POWERED-OFF.

Double click the virtual machine folder you need to


clone/copy.

VM Folder
Select ALL the files in the VM folder to be cloned/copied.

Select all the VM files


Once all the files have been selected, Right Click and
Select Copy.

Right Click and Select Copy


Select and open the folder created in Step 4.

Folder Created in root of the datastore the folder will be


empty

Empty Folder
Right click the empty folder space and Right Click and
Select Paste

Right click the empty folder space and Right Click and
Select Paste[
The Copy Progress bar will be displayed, indicating a time
to completion.

The Copy Progress bar will be displayed


Contents of the new folder, with the cloned/copied virtual
machine files.

Contents of the new folder, with copy or clone of the


virtual machine.

6. Register the cloned/copied virtual machine with the Inventory

Select and Right Click the virtual machine VMX file.

Add to Inventory
Follow the Add to Inventory Wizard, make sure the name is
different and unique, it must be different to
the original virtual machine name. This is just a friendly
name for the inventory, it does not change the name of the name of the virtual
machine OS.

Enter a Inventory Name followed by Next

Add name
Select the host, that you want to add this virtual machine
to, followed by Next

Add VM to host
Review the details and Click Finish to add the VM to the
Host Machines Inventory. The Virtual Machine will be added to the inventory.

Review and Finish


You have successfully cloned or copied a virtual machine.

//----- INSTALLING vCenter SERVER 5.5 ON A MICROSOFT WINDOWS PLATFORM USING


THE SIMPLE INSTALL METHOD (2058224) -----//
(https://kb.vmware.com/s/article/2058224)
VMware vCenter 5.5.0 Installation - Step-by-Step Guide - Part2 >>>>>
(https://www.techsupportpk.com/2014/05/vmware-vcenter-550-installation-part2.html)
Step-by-Step Guide � vCenter Appliance 5.5 Installation >>>>>
(http://vmzone.com/vsphere-home-lab/step-by-step-guide-vcenter-appliance-5-5-
installation/)

WEB INTERFACE FOR ESXi WITHOUT vCENTER

INSTALLATION
Everything you need to know can be found on the official Fling page.
https://labs.vmware.com/flings/esxi-embedded-host-client

Installing over Internet


- SSH into ESXi Host
- $ esxcli software vib install -v
http://download3.vmware.com/software/vmw-tools/esxui/esxui_signed.vib <// Run
command to download

Installing from local file


- Download the VIB file <//
http://download3.vmware.com/software/vmw-tools/esxui/esxui_signed.vib
- SSH into ESXi Host
- Copy the VIB file to /tmp/
- esxcli software vib install -v /tmp/esxui_signed.vib
<// Run command to Install

VERDICT:
- UI is very similar to vCenter but with a few modifications that make
it a lot lighter
- I like how the console can be opened within the current window, in a
new window or in VMRC.
- I do not like how clicking on the image of the console automatically
opens it in the current window. Options should be provided like above.
- Almost everything I would want, even the advanced features are
available. The only issue is not everything is fully working like
enabling/disabling SSH
-

You might also like