VMware
Det er meningen er der skal komme gode fif her til VMware.
Redning
Her følger en hel masse kommandoer der kan hjælpe en, hvis man er kommet til at lave lort i GUI.
Genstarte først reboot
Fjerne netkort (vswif) fra vswitch1
og
esxcfg-vswif -i <new ip address> vswifX
Changes the service console’s IP address.
esxcfg-vswif -n <new netmask> vswifX
Changes the service console’s netmask.
esxcfg-vswitch -U <old vmnic> <service console vswitch>
Removes the NIC for the service console
Hvis ikke noget af det virker, så kig længere nede.
Sætte begge netkort til.
1 til console
1 til maskiner.
http://vmzare.wordpress.com/2007/03/21/networking-vmware/
esxcfg-vswif -l
Provides a list of the service console’s current network interfaces.
Check that vswif0 is present and that the current IP address and Netmask are
correct.
esxcfg-vswitch -l
Provides a list of current virtual switch configurations.
Check that the uplink adapter configured for the service console is connected to the
appropriate physical network.
exscfg-nics -l
Provides a list of current network adapters along with their names
Check that the uplink adapter configured for the service console is up and that the
speed and duplex are both correct.
esxcfg-nics -s <speed> <nic>
Changes the speed of a network adapter.
esxcfg-nics -d <duplex> <nic>
Changes the duplex of a network adapter.
esxcfg-vswif -i <new ip address> vswifX
Changes the service console’s IP address.
esxcfg-vswif -n <new netmask> vswifX
Changes the service console’s netmask.
esxcfg-vswitch -U <old vmnic> <service console vswitch>
Removes the NIC for the service console
esxcfg-vswitch -L <new vmnic> <service console vswitch>
Changes the uplink for the service console.
If you encounter long waits when using esxcfg-* commands, it is possible that DNS is misconfigured.
Connection from Virtual network adapters to port group is made by name, any change in the name would cause loss of connection when VMs are rebooted. It won’t affect already running VMs. Best practise is to avoid renaming networks after they are in use.
1. determine which NICs are seen by the vmkernel:
esxcfg-nics
2. check the current vswitch configuration:
esxcfg-vswitch -l
3. You should see one or more vSwitches listed. If there are no vswitches listed create one using the command:
esxcfg-vswitch -a vSwitch0
4. One of the vswitches should have a portgroup called "Service Console", if not create it with the command:
esxcfg-vswitch -A "Service Console" vSwitch0
5. Make sure that the physical NIC(s) which are connected to the network you want the COS to have access to (and *only* those NICs) are listed in the "Uplinks" column for the vSwitch and "Service Console" portgroup. To add uplinks use the command:
esxcfg-vswitch -L <vmnicN> vSwitch0
To remove unwanted uplinks from a vSwitch use the command:
esxcfg-vswitch -U <vmnicN> <vSwitchN>
6. check the virtual network device in the COS:
esxcfg-vswif -l
7. You should have at least one virtual adapter called vswif0. Check that the IP and other info is correct for that adapter. To add a virtual adapter use the command:
esxcfg-vswif -a -p "Service Console" -i <ip_addr> -n <netmask> -b <broadcast_addr> vswif0
8. If you have other vswifs with misconfigured or overlapping subnets with vswif0 you probably will have to remove them. to remove a vswif use the command:
esxcfg-vswif -d vswifN
9. Most standard linux commands such as ifconfig will work on vswif0. If you want to make your any changes to the paramters and have them stick, you should use esxcfg-vswif.
10. calling any of the esxcfg-* programs with -h will show the available options and a breif description of what they do.
CLI WAY
Create a vSwitch
esxcfg-vswitch -a vSwitch(SWITCH NO)
Create the Service Console portgroup
esxcfg-vswitch -p "Service Console" vSwitch(SWITCH NO)
Add a NIC to the vSwitch
esxcfg-vswitch –L vmnic vSwitch(SWITCH NO)
Add a vswif interface and configure
esxcfg-vswif –a vswif0 -p "Service Console" i (IPADDR)–n (MASK)