Virtualization2.0 简明教程
Virtualization 2.0 - Troubleshooting
在本章中,我们将讨论网络通信和低性能故障排除。
In this chapter, we will discuss troubleshooting for network communication and for slow performance.
Troubleshooting Network Communication
在虚拟环境中,为了对网络连接进行故障排除,我们应按以下步骤查找解决方案:
In a virtual environment, to troubleshoot a network connectivity, we should follow some steps in order to find a resolution.
Network Communication Indications
以下是我们的某些症状:
Some of the symptoms that we have are as follows −
-
You cannot connect to the Internet.
-
There is no network connectivity to or from a single virtual machine.
-
Virtual machines fail to connect to the network.
-
Cannot get an IP.
-
A TCP/IP connection fails to and from a single virtual machine.
Network Communication Errors
您也可以收到以下错误:
You can get the following errors as well −
-
Destination Host Unreachable
-
Network error
-
Connection Refused
-
Network cable is unplugged
-
Ping request could not find host
-
Please check the name and try again
-
Unable to resolve target system name, etc.
Network Communication Resolutions
上述症状和错误的解决方案如下:
The resolutions for the above symptoms and errors are as follows −
-
Make sure that the Port Group Name is associated with the virtual machine’s network adapter, which exists in the switch or in the Virtual Distributed Switch. Also, ensure that it is spelt correctly.
-
Make sure that there are enough storage capacities in your virtual machine sometimes it affects the connectivity.
-
Verify that the virtual network adapter is present and connected.
-
Verify that the networking within the virtual machine’s guest operating system is correct.
-
Verify that the TCP/IP stack is functioning correctly.
-
If this virtual machine was converted from a physical system, verify that there are no hidden network adapters present. Because it can have hidden static routes.
-
Verify that the vSwitch has enough ports for the virtual machine.
-
Verify that the virtual machine is configured with two vNICs to eliminate a NIC or a physical configuration issue.
-
Confirm that your virtual machine’s firewall is not blocking the Internet access.
-
Confirm that your virtual machine’s anti-virus program is not blocking the Internet access.
-
Ensure that the network adapter is enabled.
-
Shut down the virtual machine and then restart your Host Machine.
-
Removing and re-adding virtual network card adaptor.
Troubleshooting Slow Performance
检查 CPU 负载是否过高。您可以单击“CPU”。这表明虚拟机正消耗多少 CPU。如果负载过高,您可以考虑添加更多 vCPU。在确保物理主机中的可用内核多于将在 VM 中配置的内核后,请执行此操作。我们还应考虑 VM 中的应用程序是否真正能够利用多个 vCPU。
Check if your CPU load is high. You can click on “CPU”. This will show you the amount of CPU the VM is consuming. If it is very high, you may consider adding some more vCPUs. This should be done after ensuring that the physical host has more cores available than what you are going to configure inside the VM. We should also consider whether the applications inside the VM are actually able to utilize multiple vCPUs or not.
Check the Memory
内存也可能是影响 VM 性能的严重限制因素。如果您配置的内存不足,VM 通常会响应,开始将内存页面换出到磁盘。如果虚拟机使用超过三分之二的内存,则应分配更多内存。
Memory could be a serious limit on VM performance as well. If you do not configure enough memory, the VM will usually respond by starting to swap its memory pages to disk .If your virtual machine is using more than 2/3rd of the memory and then we should allocate more.
See Disk Alignment
对于任何早于 Windows 7、早于 Windows 2008 Server 或旧版基于 Linux 的系统,磁盘可能未对齐。未对齐可能会导致严重的性能损失,尤其当底层存储没有太多 IOPS 可用时。
For any pre-Windows 7, pre-Windows 2008 Server or older Linux based systems, your disks may be misaligned. Misalignment may cause quite a performance hit, especially when your storage underneath does not have many IOPS to spare.
必须根据应用程序的需求将虚拟磁盘格式化为特定格式或块大小。例如:Microsoft SQL 2005 服务器的数据库通常放在块大小为 64KB 的 NTFS 上。
It is important to format the virtual disks to a specific format or block size according to the application needs. For example – The database of a Microsoft SQL 2005 server is generally put on an NTFS that has a block size of 64KB.
如果虚拟机在某个时间点出现了性能问题,您需要检查病毒扫描程序。不仅要针对受影响的虚拟机检查,还要针对其他虚拟机检查。
If the virtual machine has a performance issue at some point in time, you need to check the virus scanner. Not only on the impacted virtual machine, but also on the other virtual machines as well.
如果您执行了 P2V(虚拟机,即您将物理机转换为 VM),并且在之后没有“清理”,则可能有很多未使用的驱动程序,甚至应用程序。
If you do a P2V – a virtual machine (meaning you convert a physical machine to a VM) and you do not “clean up” afterwards, there may be a lot of unused drivers and even applications.