Welcome to a Danish Virtualization blog! Thoughts, comments and tips and tricks on Virtualization topics are provided to you by Heino Skov and Nicolai Sandager.
The Virtual Troll
A virtualization blog!
On this blog we will post comments, thoughts, ideas, tips and tricks around virtualization topics. We may also discuss other topics and we hope you will enjoy it and feel free to leave a comment.
Enable VMotion on the vmkernel interface by commandline
To fully automate an installation of ESX server 3.5 certain esxcfg- commands needs to be used. However these commands doesnt allow us to enable VMotion on a vmkernel interface. To do this in a command line use the vimsh command.
Before enabling VMotion create the neccesary virtual switches and vmkernel interfaces using esxcfg-vswitch and esxcfg-vmknic commands
Examples:
To create a new vswitch called vSwitch10 do:
- esxcfg-vswitch -a vSwitch10
To link a vmnic to vSwitch10 do:
- esxcfg-vswitch -L vmnic1 vSwitch10
To create a portgroup called VMotion on vSwitch10 do:
- esxcfg-vswitch -A VMotion vSwitch10
To create the vmkernel interface on the VMotion portgroup do:
- esxcfg-vmknic -a -i 10.0.0.1 -n 255.255.255.0 VMotion
To enable that interface as the VMotion interface. First thing we need to know is the interface name of the vmkernel port. To find that do:
- esxcfg-vmknic -l
This lists all the vmkernel interfaces that is created on the ESX host. Its likely that its called vmk0 because its probably the first vmkernel interface created
Now Enable the vmkernel interface to used by VMotion do this:
- vimsh -n -e “/hostsvc/vmotion/vnic_set vmk0″
All done. Now verify in the VirtualCenter client that your vmkernel interface now is enabled for VMotion.
Note: The vimsh command does only work in ESX 3.5 and not 3i unfortunately as 3i doenst have a service console. To use esxcfg- commands with 3i install the VMware Infrastructure RCLI Tool created by VMware.
Leave a Reply
You must be logged in to post a comment.
Feel free to leave a comment. Thanks in advance. Regards Heino.