Showing posts with label VMWare. Show all posts
Showing posts with label VMWare. Show all posts

Sunday, February 8, 2015

Migrate VMWare box to VirtualBox

VMware Player is only free for personal non-commercial use. It's not so hard to migrate your VMWare box to VirtualBox, but it you used a SCSI disk in VMWare, you will see the error below when trying to run converted box in VirtualBox:
Could not find a storage controller named 'SCSI Controller'."
The instructions below will guide you through the converting process.

VMWare

  • Boot the VM
  • Uninstall vmware tools
  • Shutdown
  • Edit VM settings -> remove the HD
  • Edit the_machine.vmdk
  • change ddb.adapterType from "buslogic" or "lsilogic" to "ide"
  • Edit VM settings -> add an HD, type IDE from existing file the_machine.vmdk
  • Boot the VM
  • Shutdown
Now you can convert the box from VMWare to Open Virtualization Format.
$ ovftool -o the_machine.vmx the_machine.ovf Opening VMX source: the_machine.vmx Opening OVF target: the_machine.ovf Writing OVF package: the_machine.ovf Transfer Completed Completed successfully

VirtualBox

The last step is to import the OFV in VirtualBox and install guest additions.
  • File -> import appliance -> the_machine.ovf
  • VM settings -> storage -> add attachment -> CD drive
  • Boot the VM
  • install guest additions from CD

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.

 

Saturday, April 13, 2013

What Files Make up a virtual Machine on ESXi 5.x

By Joe Piggee Sr.

 

Ok, I have received this question 4 times this week, via email, so decided to just put up a quick FAQ. “What files make up a VM, on ESXi 5?” Below you see a screenshot one of my virtual machines, which just happens to be also be my vCenter.

 

image

Quick Note: Virtual machines lock the .vswp, -flat.vmdk and -delta.vmdk, .vmx and .log files while powered on.

 

File Description
*.vmx This is the configuration file for the VM.
*.vmxf This is also a configuration file, but not really used. It’s main purpose is for compatibility. If you were to move a VM from ESXi to a VMWare Workstation installation, this file would be used.
*.vmsd This is just a snapshot descriptor file, that stores metadata. As you see above, mine is 0KB, because I have not created any snapshots.
*.vmdk This is the VM’s hard disk descriptor. This contains all the VM HD’s settings. Like how large etc..
-flat.vmdk This is the actual VM HD that contains the data.
*.log VM Log Files, there maybe additional log file with vmname-(Number) that contain old versions of the logs
*.nvram VM System Bios data
*.vswp VM Swap File reated when the virtual machine boots and is used to swap memory if access to physical memory isn’t possible. Especially useful when ballooning.
*.lck This is the file that has locked your running files. A running virtual machine creates lock files to prevent consistency problems on virtual disks. If the virtual machine did not use locks, multiple virtual machines might read and write to the disk, causing data corruption. Lock files are always created in the same directory as the .vmdk files

Thursday, April 11, 2013

A life saver... Recreate disk descriptors

Restart Management agents, or Web Management Service on an ESXi 5.x Host

By Joe Piggee Sr.

You may run into a scenario when you can’t connect to a host via vCenter, vSphere client etc.

Quick and easy:

To restart the management agents on ESXi:
 
DCUI:
1. Connect to the console of your ESXi host.
2. Press F2 to customize the system.
3. Log in as root.
4 . Use the Up/Down arrows to navigate to Restart Management Agents.

5. Press Enter.
6. Press F11 to restart the services.
7. When the service has been restarted, press Enter.
8. Press Esc to log out of the system.

From Local Console or SSH:
1. Log in to SSH or Local console as root.
2. Run this command:

./sbin/services.sh restart

Friday, March 15, 2013

Ports for Commonly Used Windows Services

Service Name

UDP

TCP

Browsing datagram responses of NetBIOS over TCP/IP

138

Browsing requests of NetBIOS over TCP/IP

137

Client/Server Communication

135

Common Internet File System (CIFS)

445

139, 445

Content Replication Service

560

Cybercash Administration

8001

Cybercash Coin Gateway

8002

Cybercash Credit Gateway

8000

DCOM (SCM uses udp/tcp to dynamically assign ports for DCOM)

135

135

DHCP client

67

DHCP server

68

DHCP Manager

135

DNS Administration

139

DNS client to server lookup (varies)

53

53

Exchange Server 5.0

   Client Server Communication

   135

   Exchange Administrator

   135

   IMAP

   143

   IMAP (SSL)

   993

   LDAP

   389

   LDAP (SSL)

   636

   MTA - X.400 over TCP/IP

   102

   POP3

   110

   POP3 (SSL)

   995

   RPC

   135

   SMTP

   25

   NNTP

   119

   NNTP (SSL)

   563

File shares name lookup

137

File shares session

139

FTP

21

FTP-data

20

HTTP

80

HTTP-Secure Sockets Layer (SSL)

443

Internet Information Services (IIS)

80

IMAP

143

IMAP (SSL)

993

IKE (For more information, see Table C.4)

500

IPSec Authentication Header (AH) (For more information, see Table C.4)

IPSec Encapsulation Security Payload (ESP) (For more information, see Table C.4)

IRC

531

ISPMOD (SBS 2nd tier DNS registration wizard)

1234

Kerberos de-multiplexer

2053

Kerberos klogin

543

Kerberos kpasswd (v5)

464

464

Kerberos krb5

88

88

Kerberos kshell

544

L2TP

1701

LDAP

389

LDAP (SSL)

636

Login Sequence

137, 138

139

Macintosh, File Services (AFP/IP)

548

Membership DPA

568

Membership MSN

569

Microsoft Chat client to server

6667

Microsoft Chat server to server

6665

Microsoft Message Queue Server

1801

1801

Microsoft Message Queue Server

3527

135, 2101

Microsoft Message Queue Server

2103, 2105

MTA - X.400 over TCP/IP

102

NetBT datagrams

138

NetBT name lookups

137

NetBT service sessions

139

NetLogon

138

NetMeeting Audio Call Control

1731

NetMeeting H.323 call setup

1720

NetMeeting H.323 streaming RTP over UDP

Dynamic

NetMeeting Internet Locator Server ILS

389

NetMeeting RTP audio stream

Dynamic

NetMeeting T.120

1503

NetMeeting User Location Service

522

NetMeeting user location service ULS

522

Network Load Balancing

2504

NNTP

119

NNTP (SSL)

563

Outlook (see for ports)

Pass Through Verification

137, 138

139

POP3

110

POP3 (SSL)

995

PPTP control

1723

PPTP data (see Table C.4)

Printer sharing name lookup

137

Printer sharing session

139

Radius accounting (Routing and Remote Access)

1646 or 1813

Radius authentication (Routing and Remote Access)

1645 or 1812

Remote Install TFTP

69

RPC client fixed port session queries

1500

RPC client using a fixed port session replication

2500

RPC session ports

Dynamic

RPC user manager, service manager, port mapper

135

SCM used by DCOM

135

135

SMTP

25

SNMP

161

SNMP Trap

162

SQL Named Pipes encryption over other protocols name lookup

137

SQL RPC encryption over other protocols name lookup

137

SQL session

139

SQL session

1433

SQL session

1024 - 5000

SQL session mapper

135

SQL TCP client name lookup

53

53

Telnet

23

Terminal Server

3389

UNIX Printing

515

WINS Manager

135

WINS NetBios over TCP/IP name service

137

WINS Proxy

137

WINS Registration

137

WINS Replication

42

X400

102

Monday, February 4, 2013

Email will not send after P2V

By Joe Piggee

Monday, February 04, 2013
5:15 AM

1. Use one of the following methods to go to a command prompt:
    ○ In Windows 8 or in Windows Server 2012, use the Search charm to search for cmd, and then tap or clickCommand Prompt.
    ○ In earlier versions of Windows, click Start, click Run, type cmd.exe, and then press Enter.
2. Type set devmgr_show_nonpresent_devices=1, and then press Enter.
3. Type Start DEVMGMT.MSC, and then press Enter.
4. Click View, and then click Show Hidden Devices.
5. Expand the Network Adapters tree.
6. Right-click the dimmed network adapter, and then click Uninstall.

Pasted from <http://support.microsoft.com/kb/269155>

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.