Network addresses (IPs, subnets and gateways) in a virtual machine are entered in the same way as a physical machine. Precisely from the IPv4 network configuration of the operating system.
what operating system does your virtual machine have?
I was asked to configure the ESXi in trunk mode, so what I did was enter my ESXi, then select networking, add port group, put a name and a VLAN 922, once the port group is created, select my VM and in Edit Settings , select the network card and change the one brought by defult (VM Network) to the one with the VLAN. but still I can't see the vm by ping.
Here I am pinging the host and the vm