2020.05.12 – Problem and solution for Virtual Network in VMware Fusion and ESXi

Info details of the problem

VM with allowed network NAT

[root@esxi00:~] ping yahoo.com
getaddrinfo() for "yahoo.com" failed (-3: Temporary failure in name resolution)

VM with Share with my MAC

WAN -> em0 -> DHCP: 192.168.100.128
LAN -> em1 -> 10.1.1.251
murgescusilvia@Murgescus-MacBook-Pro ~ % ssh root@192.168.100.128
ssh: connect to host 192.168.100.128 port 22: Host is down
murgescusilvia@Murgescus-MacBook-Pro ~ % ssh root@192.168.100.128
ssh: connect to host 192.168.100.128 port 22: Operation timed out
[2.4.5-RELEASE][root@pfSense.silvique.ro]/root: ping yahoo.com
PING yahoo.com (98.138.219.232): 56 data bytes
ping: sendto: No route to host
...

Sometime work sometime does not work ….

Step 1. Reading VMware documentation to trying to solve the problem:

From here https://kb.vmware.com/s/article/2009642?lang=en_US I’ve dome this and restart the MacBook PRO :

sudo rm -f "Library/Preferences/VMware Fusion/networking"
sudo rm -f "Library/Preferences/VMware Fusion/locations"
sudo "/Applications/VMware Fusion.app/Contents/Library/vmnet-cli" -c

The problem is still there. Not solve it!

Step 2 . Ideas receive from a fried and apply it => Solved the problem! OK!!

Change network from 10.1..1.251 to 10.1.1.2 and very and test Internet connection

2.0. Make sure pfSense is powered pff

2.1. Inside ESXi terminal

 [root@esxi00:~] esxcfg-route 
VMkernel default gateway is 10.1.1.2


[root@esxi00:~] esxcli network ip dns server list
   DNSServers: 10.1.1.2


[root@esxi00:~] ping google.com
PING google.com (216.58.212.142): 56 data bytes
64 bytes from 216.58.212.142: icmp_seq=0 ttl=128 time=52.287 ms
64 bytes from 216.58.212.142: icmp_seq=1 ttl=128 time=53.458 ms
64 bytes from 216.58.212.142: icmp_seq=2 ttl=128 time=53.811 ms


--- google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 52.287/53.185/53.811 ms


[root@esxi00:~] 

2.2. For internal CentOS VM inside ESXi_00 I change external ip to 10.1.1.50/25 and 10.1.1.2 and it works OK.

2.3. For pfSense in Vmware Fusion I do not modify anything, but ping works ok.

All are connected to Network > Custom > Allow using NAT

2020.05.7 – Problem and solution for increasing the size of a ESXi virtual disk

Problem: Increase the size of a ESXi Virtual Disk

I wasn’t able to find a solution and mad it work!

Thing an other solution:

Step 1. Migrate a Virtual Machine to New Storage in the vSphere Web Client

Procedure on vCenter:

  1. Right-click the virtual machine from ESXI00.datastore.1 and select Migrate
  2. Click Change storage only and click Next
  3. Select the format for the virtual machine’s disks
    1. Same format as source
  4. Select a virtual machine storage policy from the VM Storage Policy drop-down menu: ESXi00.datastore.2
  5. On the Ready to complete page, review the details and click Finish.

Step 2. Remove a Virtual Hard Disk from a Virtual Machine

Now imposible to power on!

The solution is to install a new ESXi and all VM that I’ve lost!

2020.05.5 – Problem and Solution for License when Include ESXi into vSphere

Theoretically:

  • There are 6 license for 6 ESXi and 2 license for vCenter
  • Maximum 3 ESXi can be included into vCenter
    • Introducing into vCenter the ESXi I power on and use in that moment and need vCenter help for configuration

The License show Usage 4 CPUs and Capacity 6 CPUs

VM ESXi esxi00.silvique.ro has Evaluation License

When open Assign License show it is possible because the Usage 4 CPUs and Capacity 6 CPUs

Choose ESXi Licensing. Then the Usage change to 8 CPUs and impossible to click OK

Important information:

The License is based on 6 CPUs capacity NOT on 6 ESXi VM.

If you use ESXi’s with 2 CPUs then you can do this using maximum of 3 ESXi’s meaning a total of 6 CPUs capacity for the license. If you want to use ESXi with 4 CPUs, then a licence accepts only one ESXi with 2 CPUs.

Now it is more clear for me!

2020.05.5 – Problem and Solution with Adding ESXi host in vSphere Client

I have a problem with Adding ESXi host into vSphere Client. 

Cannot contact the specified host (esxi00.silvique.ro). The host may not be available on the network, a network configuration problem may exist, or the management services on this host may not be responding.
  • I need to put ESXi into vSpare to install a new VM as I do not find solution of installation into ESXi. But if I insert esxi00 into vSphere using the IP, I can not install VM. So I want to insert esxi00.silvique.ro base on its name to try to install Junos Spare.
    • I thought it is fw problem, so I install it into esxi00 and powered on.

  • What can I do to insert esxi00.silvique.ro into vShere?

Ideas and solution

1. Check to see if you can ping the hostname from the vCenter appliance.

vCenter and ESXi from MacBook

murgescusilvia@Murgescus-MacBook-Pro ~ % ping 10.1.1.101
PING 10.1.1.101 (10.1.1.101): 56 data bytes
64 bytes from 10.1.1.101: icmp_seq=0 ttl=64 time=0.336 ms
64 bytes from 10.1.1.101: icmp_seq=1 ttl=64 time=0.598 ms
64 bytes from 10.1.1.101: icmp_seq=2 ttl=64 time=0.496 ms
64 bytes from 10.1.1.101: icmp_seq=3 ttl=64 time=0.217 ms
^C
--- 10.1.1.101 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.217/0.412/0.598/0.146 ms

murgescusilvia@Murgescus-MacBook-Pro ~ % ping vc01      
PING vc01.silvique.ro (10.1.1.101): 56 data bytes
64 bytes from 10.1.1.101: icmp_seq=0 ttl=64 time=0.403 ms
64 bytes from 10.1.1.101: icmp_seq=1 ttl=64 time=0.623 ms
64 bytes from 10.1.1.101: icmp_seq=2 ttl=64 time=0.456 ms
^C
--- vc01.silvique.ro ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.403/0.494/0.623/0.094 ms

murgescusilvia@Murgescus-MacBook-Pro ~ % ping vc01.silvique.ro
PING vc01.silvique.ro (10.1.1.101): 56 data bytes
64 bytes from 10.1.1.101: icmp_seq=0 ttl=64 time=0.355 ms
64 bytes from 10.1.1.101: icmp_seq=1 ttl=64 time=0.881 ms
^C
--- vc01.silvique.ro ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.355/0.618/0.881/0.263 ms

murgescusilvia@Murgescus-MacBook-Pro ~ % ping 10.1.1.10       
PING 10.1.1.10 (10.1.1.10): 56 data bytes
64 bytes from 10.1.1.10: icmp_seq=0 ttl=64 time=0.517 ms
64 bytes from 10.1.1.10: icmp_seq=1 ttl=64 time=0.389 ms
^C
--- 10.1.1.10 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.389/0.453/0.517/0.064 m
s
murgescusilvia@Murgescus-MacBook-Pro ~ % ping esxi00   
PING esxi00.silvique.ro (10.1.1.10): 56 data bytes
64 bytes from 10.1.1.10: icmp_seq=0 ttl=64 time=0.315 ms
64 bytes from 10.1.1.10: icmp_seq=1 ttl=64 time=0.513 ms
64 bytes from 10.1.1.10: icmp_seq=2 ttl=64 time=0.325 ms
^C
--- esxi00.silvique.ro ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.315/0.384/0.513/0.091 ms

murgescusilvia@Murgescus-MacBook-Pro ~ % ping esxi00.silvique.ro
PING esxi00.silvique.ro (10.1.1.10): 56 data bytes
64 bytes from 10.1.1.10: icmp_seq=0 ttl=64 time=0.385 ms
64 bytes from 10.1.1.10: icmp_seq=1 ttl=64 time=0.709 ms
^C
--- esxi00.silvique.ro ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.385/0.547/0.709/0.162 ms

ESXi00 from vCenter

murgescusilvia@Murgescus-MacBook-Pro ~ % ssh root@vc01.silvique.ro
…..

Command> ping 10.1.1.10
PING 10.1.1.10 (10.1.1.10) 56(84) bytes of data.
64 bytes from 10.1.1.10: icmp_seq=1 ttl=64 time=1.01 ms
64 bytes from 10.1.1.10: icmp_seq=2 ttl=64 time=1.11 ms
64 bytes from 10.1.1.10: icmp_seq=3 ttl=64 time=1.29 ms
64 bytes from 10.1.1.10: icmp_seq=4 ttl=64 time=0.978 ms
^C
--- 10.1.1.10 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 0.978/1.101/1.299/0.124 ms
 
Command> ping esxi00
ping: unknown host esxi00


Command> ping esxi00.silvique.ro
ping: unknown host esxi00.silvique.ro

2. If you cant you can either edit the host file on the vcenter machine

2.1. SSH’d into the vCenter using Terminal

Last login: Tue May  5 07:19:26 on ttys006
murgescusilvia@Murgescus-MacBook-Pro ~ % ssh root@vc01.silvique.ro

Command> ls /etc/
Unknown command: `ls'
Command> cd etc
Unknown command: `cd'

Command> shell
Shell access is granted to root

root@10 [ ~ ]# 

2.2. Navigated to the host files directory

  • cd /
  • cd etc
  • ls (this list everything in the directory)
root@10 [ ~ ]# cd ..
root@10 [ ~ ]# cd /etc

2.3. Used vim to edit the file:

  • vim hosts
root@10 [ /etc ]# vim hosts

2.4. Added the name and the IP that I wanted to be tied together.

  • xxx.xxx.xxx.xxx name.domain name
# Begin /etc/hosts (network card version)


127.0.0.1   localhost.localdomain
127.0.0.1       localhost
10.1.1.101 10.1.1.101 10
10.1.1.10  esxi00.silvique.ro  esxi00
# End /etc/hosts (network card version)

2.5. Exited vi (vi automatically saves the file when you leave unless specified to not save when you leave.)

  • To exit and save type                ESC + : x or ESC + : wq
  • To exit without saving type        Esc + : q!
Esc 
:wq

2.6. Now test it using the Ping command.

  • ping name
Command> ping 10.1.1.10
PING 10.1.1.10 (10.1.1.10) 56(84) bytes of data.
64 bytes from 10.1.1.10: icmp_seq=1 ttl=64 time=0.687 ms
64 bytes from 10.1.1.10: icmp_seq=2 ttl=64 time=0.512 ms
64 bytes from 10.1.1.10: icmp_seq=3 ttl=64 time=1.03 ms
64 bytes from 10.1.1.10: icmp_seq=4 ttl=64 time=0.883 ms
^C
--- 10.1.1.10 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 0.512/0.780/1.039/0.199 ms

Command> ping esxi00.silvique.ro
ping: unknown host esxi00.silvique.ro
Command> ping 10.1.1.10
PING 10.1.1.10 (10.1.1.10) 56(84) bytes of data.
64 bytes from 10.1.1.10: icmp_seq=1 ttl=64 time=0.663 ms
64 bytes from 10.1.1.10: icmp_seq=2 ttl=64 time=1.03 ms
64 bytes from 10.1.1.10: icmp_seq=3 ttl=64 time=0.790 ms
64 bytes from 10.1.1.10: icmp_seq=4 ttl=64 time=0.719 ms
^C
--- 10.1.1.10 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 0.663/0.802/1.038/0.145 ms
Command> ping esxi00.silvique.ro
PING esxi00.silvique.ro (10.1.1.10) 56(84) bytes of data.
64 bytes from esxi00.silvique.ro (10.1.1.10): icmp_seq=1 ttl=64 time=0.385 ms
64 bytes from esxi00.silvique.ro (10.1.1.10): icmp_seq=2 ttl=64 time=0.539 ms
64 bytes from esxi00.silvique.ro (10.1.1.10): icmp_seq=3 ttl=64 time=0.668 ms
^C
--- esxi00.silvique.ro ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.385/0.530/0.668/0.118 ms

Command> ping esxi00
PING esxi00.silvique.ro (10.1.1.10) 56(84) bytes of data.
64 bytes from esxi00.silvique.ro (10.1.1.10): icmp_seq=1 ttl=64 time=0.388 ms
64 bytes from esxi00.silvique.ro (10.1.1.10): icmp_seq=2 ttl=64 time=0.581 ms
64 bytes from esxi00.silvique.ro (10.1.1.10): icmp_seq=3 ttl=64 time=0.599 ms
^C
--- esxi00.silvique.ro ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.388/0.522/0.599/0.099 ms

Solution photos

An other idea: Or add the host to the dnsresolver on the pfsense firewall. When using the firewall, the vcenter machine needs to have the IP of the firewall as it’s gateway and dns server. 

It seems I don’t this idea now …

2020.05.4 – Problem and solution for ESXi: Failed to create virtual machine vm. The operation is not allowed in the current state

I try to install VM into the VMware ESXi.

Before this I have added a new Hard Disk into VMware Fusion end the configure Storage Datastore into VMware ESXi.

Now I want to install a VM and I get an error:

– The vm configuration was rejected. Please see Browser console

– Failed to create virtual machine vm. The operation is not allowed in the current state.

The answer I find on internet including the solution: “check the vmware state.. if it is in maintenance mode means you are not able to create virtual machine… keep the vmware on normal state.”

I solved this problem!!!