Showing posts with label ESX. Show all posts
Showing posts with label ESX. Show all posts

Wednesday, May 22, 2013

Add a New Virtual Machine to Inventory from a Datastore

 

 

By Joe Piggee

If you present new storage to vSphere that already has VM’s stored on it, you can add them to inventory so you can power them on, manage them etc by following these steps.

  1. Open the vSphere/VMware Infrastructure (VI) Client and log in with appropriate credentials.
  2. If connecting to vCenter Server, click on the desired host.
  3. Click the Configuration tab.
  4. Click Storage.
  5. Right-click on the appropriate datastore and click Browse Datastore.
  6. Navigate to the folder named after the virtual machine, and locate the <virtual machine>.vmx file.
  7. Right-click the .vmx file and click Add to inventory. The Add to Inventory wizard opens.
    continue to follow the wizard to add the virtual machine.

If the device is something like an external USB drive, prior to completing the steps above complete the following:

If you have some shared storage, install vCenter 5.1, then connect the External hard drive to the PC you are working from(the one you have the vSphere client installed on) browse to the appropriate datastore, and upload the VM's to the shared storage, or to the local datastore that the ESXi host has. Then complete the steps needed to import the discovered VM's listed above.

Wednesday, May 15, 2013

Verify ESXi Licensed Featured

By Joe Piggee

Sometimes you’ll see errors, even though everything is configured correctly. I can’t tell you how many times I’ve gone to a clients site and performed troubleshooting tasks, just to findout they aren’t licensed for a particular function. So Verify first before getting to deep.

 

To verify which features are licensed, make sure that the vSphere Client/VMware Infrastructure is connected to vCenter Server/VirtualCenter.

  1. Select the ESX/ESXi host from the inventory in vCenter Server.
  2. Click the Configuration tab.
  3. Click the Licensed Features link.

Ensure that the feature appears on the list and that there are enough CPU licenses. If the feature is not listed, click Edit and enable the feature

vSphere 5.x Firewalls

By Joe Piggee

By default, when ESXi is installed, the firewall is enabled. The default configuration is to permit only the required operational traffic and to deny all others. As a note, the command esxcfg-firewall was retired and replaced by esxcli network firewall in vSphere 5.

To enable the firewall:

esxcli network firewall set –enabled true

To disable the firewall

esxcli network firewall set –enabled false

Enable/Disable pre-configured services

  • List the services and record the proper ruleset ID for your service
    • esxcli network firewall ruleset list
  • To enable:
    • esxcli network firewall ruleset –enabled true –ruleset-id rulesetName
  • To disable:
    • esxcli network firewall ruleset –enabled false –ruleset-id rulesetName

Configure service behavior automation

  1. Login to vSphere client
  2. Enter the Hosts and Clusters View (Ctrl + Shift + H)
  3. Select a host
  4. Click the Configuration tab
  5. Under the Software view, select Security Profile
  6. Under Security Profile > Services, click Properties
  7. Highlight a service
  8. Click Options
  9. The service operational controls are listed
    1. Start automatically if any ports are open, and stop when all ports are closed
    2. Start and stop with host
    3. Start and stop manually (Select this to effectively disable the service)

Open/Close ports in the firewall

  1. Login to vSphere client
  2. Enter the Hosts and Clusters View (Ctrl + Shift + H)
  3. Select a host
  4. Click the Configuration tab
  5. Under the Software view, select Security Profile
  6. Under Security Profile > Firewall, click Properties
  7. Highlight a service
  8. To enable a firewall rule, check the check box next to the traffic label
  9. Click Options to set the service start automation settings as described above
  10. Click the firewall button to define what connections can be made to the services. All connections may be allowed or it can be restricted to a single IPv4 or IPv6 addresses and/or IPv4 or IPv6 networks.

Alternatively, to define the allowed IP addresses, you may configure this from the command line:
esxcli network firewall ruleset allowedip add –ruleset-id RulesetName –ip-address IPAddress/Network
esxcli network firewall ruleset allowedip add –ruleset-id RulesetName –ip-address IPAddress
esxcli network firewall ruleset allowedip remove –ruleset-id RulesetName –ip-address IPAddress/Network
esxcli network firewall ruleset allowedip remove –ruleset-id RulesetName –ip-address IPAddress
esxcli network firewall ruleset allowedip list –ruleset-id RulesetName

Note that you may edit the /etc/vmware/firewall/services.xml file for the pre-configured services. After you update any port numbers, remember to refresh the firewall:
esxcli network firewall refresh

ESXCLI Firewall Commands

By Joe Piggee

esxcli firewall commands

Command Description
esxcli network firewall get Returns the enabled or disabled status of the firewall and lists default actions
esxcli network firewall set –defaultaction Update default actions
esxcli network firewall set –enabled Set to true to enable the firewall, set to false to disable the firewall
esxcli network firewall load Load the firewall module and rule set configuration
esxcli network firewall refresh Refresh the firewall configuration by reading the rule set files if the firewall module is loaded
esxcli network firewall unload Destroy filters and unload the firewall module
esxcli network firewall ruleset list Set the allowedall flag
esxcli network firewall ruleset set –allowedall Enable or disable the specified rule set
esxcli network firewall ruleset set –enabled Enable or disable the specified rule set
esxcli network firewall ruleset allowedip list List the allowed IP addresses of the specified rule set.
esxcli network firewall ruleset allowedip add Allow access to the rule set from the specified IP address or range of IP addresses
esxcli network firewall ruleset allowedip remove Remove access to the rule set from the specified IP address or range of IP addresses.

Configuring VLANs on UCS and VMware

By Joe Piggee

 

 

These are the steps required to add VLANs to both UCS and VMware. In UCS each VLAN is identified by a unique ID. The VLAN ID is a number that represents that particular VLAN. The name that you assign to a VLAN ID adds a layer of abstraction that allows you to globally update all servers associated with service profiles that use the named VLAN. You can also create more than one named VLANs with the same VLAN ID. Note that the name of a VLAN is known only within the UCS environment, and outside of the UCS the VLAN is represented by the unique ID.

 

VLAN Configuration on the UCS

Depending on how the UCS infrastructure is configured, VLAN availability for physical hosts may have to be configured on either a port group or individual host basis. The same applies in the VMWare environment.

 

Follow the steps to configure VLAN on UCS:

 

a) Open UCS manager. In the Navigation pane on the left of the application, select the LAN tab.

clip_image001

 

b) Expand the navigation tree so that the VLANs branch is visible.  Right click on the VLANs branch and select Create VLAN(s).

clip_image002

 

c) Provide a meaningful name for the VLAN, this name cannot be changed once saved. For most situations the Common/Global radio button should be selected to ensure the same configuration is applied to both Fabrics.  Enter the VLAN ID(s), then press the Check Overlap button to ensure there is no conflict with existing configuration and if unique, press OK.

clip_image003

 

.

d) Check that the newly created VLAN appears in the list of configured VLANs in the navigation pane.

clip_image004

 

e) If the platform is using vNIC templates then the next step is to add the created VLAN to the required templates. Expand the vNIC Templates branch of the navigation pane (LAN -> Policies -> root -> vNIC Templates) and select the template which should have the VLAN available.

 

clip_image005

 


f) On the General tab for each Template click Modify VLANs.

clip_image006

 

g) In the window that opens add the new VLAN.

clip_image007

Repeat this for each Template.

 

h) Switch to the servers tab in the Navigation Pane and expand the Service Profiles and the root node, the service profiles for each Chassis/Blade should be visible.

clip_image008

 

.

i) Expand each service profile in turn so that the vNIC for the Chassis/Blade is visible.  If the vNIC is bound to one of the templates modified earlier then the VLAN will be listed under the vNIC.

clip_image009 

j) If the VLAN is not listed then select the vNIC and in the main panel click the Modify VLANs link.  For vNICs bound to templates, this link will be greyed out.

clip_image011

 

k) In the window that opens select the new VLAN.

clip_image007

Repeat this process for each vNIC that is not bound to a template.

 

Once all the vNICs have the VLAN available to them, exit UCS Manager.

 

VLAN Configuration on VMware

Follow these steps to add VLAN on VMware:

 

a) Open vSphere Client and connect to the VCENTER server.  Navigate to the blade that the VLAN is required on (Home -> Inventory -> Hosts and Clusters).  Expand the Navigation tree, to locate the server name and then select the Configuration tab in the main window.  From within the Configuration window, select Networking.

clip_image013

 

b) Click on the Properties link for the Virtual Switch, then in the opened window click on the Add button.

 

clip_image014

 

c) In the next window select Virtual Machine in the Connection Types and click next.

clip_image015

 

 

d) Under Port Group Properties enter a Network Label and the VLAN ID, then click Next 

clip_image016

 

e) Now the new VLAN should show under Host networking vSwitch, click Finish.

clip_image017

clip_image018

 

f) To add a virtual machine to the VLAN, edit the machine configuration, select the Network Adapter and from the Network Connection drop down list select the new VLAN.

clip_image020

 

 

That’s it. You should be all set.

 

Monday, July 2, 2012

ESX-to-ESXi Migration Tool The ESX System Analyzer

 

If you plan your migration from ESX to ESXi, learn about the ESX System Analyzer, a tool from VMware that helps you gather information about your ESX environment. 

What wil the tool do for you?:

  • Evaluates the hardware that ESX is installed on and determines if it is compatible with ESXi.
  • Spots dependencies or modifications made to the Service Console.
  • Analyzes VM datastore locations.

It analyzes your Virtual Machine, and gives you:

  • VMware Tools version
  • Virtual machine Virtual Hardware version.

You can download it from VMWare here.