Search This Blog

Thursday 11 November 2010

vCD Log Files

Here is a list of inportant log files in vCD and a brief description. The can be found at /opt/vmware/cloud-director/logs

  • yyyy-mm-dd.request.log - This shows all the HTTP requests that have come from the user interface or the API. Very useful to run tail -f on this file to see where connections for users are going to.
  • cell.log - shows information for when the vCD cell is starting up. You can use tail -f on this file to watch the vCD cell start up, you will see the % progress. The cell can be started using command service vmware-vcd start, and stopped using command service vmware-vcd stop.
  • vcloud-container-debug.log - Debug level messages
  • vcloud-container-info.log - Information, warning and error messages for this vCD cell
  • vmware-vcd-watchdog.log - Brief message showing the last time the cell was started
  • diagnostics.log - Empty unless diagnostics logging is enabled in the local logging configuration

Unable to create routed organisation network


I've just had an issue at a customer when they were unable to create any Routed Organization Networks.

Direct and Internal only networks were created fine.

The error that was shown in vCD referred to vShield Manager, and error 401, unauthorized.

I'm unsure what caused the issue, although there were issues with the environment as the ESX boot LUNs had been disconnected.

It appeared that the credentials for vCD to authenticate to the vShield Manager have in someway been corrupted.

So, I connected to vCD, selected the properties of the the vCenter server from the Manage & monitor tab, and re-entered the administrator credentails for vShield Manager.

Thursday 7 October 2010

Importing Virtual Machines into vCloud Director


So now that we have a nice new vCloud Director implementation, we need to think about how we are going to get our customers Virtual Machines imported, and placed in the appropriate vApp.

I'm going to assume you already have a process to import Virtual Machine(s) into vCenter. If your doing P2V, probably VMware Converter or something similar, if you are importing a Virtual Machine, then something more straight forward.

For a successful import into vCloud Director, the vCenter that you are importing your Virtual Machine(s) into will need to be attached to vCloud Director.




When you have got your VMs into vCenter, you will need to import them as vApps into vCD. Bear in mind that each VM will be imported into its own vApp, so you will have lots of single Virtual Machine vApps.

In vCloud Director, open up the Organisation that the VMs will be imported into, and select My Cloud -> vApps. Click the Import from vSphere... button


You will then be shown the Virtual Machines in the selected vCenter Server that can be imported. You need to select the required Virtual Machine, name the vApp, and select the Organisation vDC that you want to place it in.


Finally, before hitting OK, you will need to select Move VM or Copy VM... depending on whether you want the VM to remain in vCenter or not.

When all the VMs have been imported, you can group them into a single vApp if you want. Simply open the vApp in question, right click the VM (when its not running), and select Move ... You can then specify the destination vApp for this Virtual Machine. The source vApp will now be empty, and can be deleted. Repeat this for as many VMs that you want within the destination vApp.

The final thing you need to do is configure the networking for the newly added VMs in the vApp. I'm going to assume that the vApp has the appropriate networks added to it, so it is just a case of opening the vApp up, editing the Virtual Machines that have been imported, and allocating the correct vApp network to its NICs.

Tuesday 30 March 2010

ESXi Rollback

So if you patch an ESXi host, and then realise that actually you want to roll back to the pre patch version, this is possible.

As ESXi is basically just firmware, each time you patch it, the whole thing is replaced. Fortunately, before patching, a backup of the current version is taken and stored. So to roll back to the previous version, just press ctrl r when you see the loading hypervisor screen.

Thursday 25 February 2010

Changing Virtual Machine Folder Name

If you need to rename a VM, this is simple as you can simply right click it in the vSphere client and select rename.

The only problem with this is that it doesn't change the folder name on the datastore, so you may end up with a virtual machine called test VM - old, but the folder its files are in is called test VM.

So how to solve this?

Simply Migrate the storage of the Virtual Machine to a different datastore, and the Virtual Machine folder on the new datastore will be created with the new Virtual Machines name.

Job done!

Friday 5 February 2010

Lab Manager 4 Networking


I thought I'd state the bleedin obvious that I didn't get until I had to install Lab Manager 4 and then scratch my head for a day.

When you use Cross Host Fencing, you need to think about the external networking. The network packets between VMs that are residing on different networks don't jump magically get transported without using the physical network - told you it was obvious!!

The way that Cross Host Fencing works is that a Host Spanning Transport Network needs to exist where the traffic will flow across. Each ESX host in the cluster will have a single VM created (don't touch it) named something like

nnnnnn-VMware-ServiceVM-Ixx-YY

where nnnnnn is a number (e.g. 000001), xx is the Lab Manager Installation ID and YY is some letter number combination that is the same for each VM.

As I said, never ever touch these machines. If you are having problems with Cross Host Fencing, you can recreate these machines by disabling the individual hosts from Host Spanning, and then re-enabling it. this removes these VMs and creates new ones, but will obviously break any configurations that are using Cross Host Fencing.

These machines are connected to the VLAN that you have configured as your Host Spanning Transport Network on a Port Group that is created on the dvSwitch that you specified when configuring the Host Spanning Transport Network. The Port Group is named:

dvSwitchx-LMService-yLMxx

where y is a number and xx is the Lab manager Installation ID.

HP Flex-10, Virtual Connect & vSphere




So there are restrictions to how you can implement this configuration. There are some really good blogs that describe it, such as

http://kennethvanditmarsch.wordpress.com/2009/11/04/understanding-hp-flex-10-mappings-with-vmware/

http://frankdenneman.wordpress.com/2009/04/26/flex-10-lessons-learned/

so I won't repeat what has been said before.

However, the restriction where you are unable to present the same VLAN to more than one FlexNIC on the LOM can be got around if you present the VLAN as a native VLAN (i.e. 0) to one FlexNIC, and apply the VLAN tag to the other FlexNIC.

This is really helpful when you have a virtual vCenter as if this wasn't possible, you would have to put it on a different VLAN to the ESX(i) hosts. However, I have configured it so that vSwitch0 on the hosts is presented with the native VLAN, and the vSwitch (or dvSwitch) that vCenter is attached to is presented with the tagged VLAN.


UPDATE: Whilst this configuration works during normal operation. In the event of loss of Virtual Connect module, or uplinks, all management networking will be lost. This is because the LOM to uplink mapping is hard coded, and whilst you can configure the mapping differently, it will break. Therefore always remember the 1 LOM to on uplink rule.

Friday 22 January 2010

VMware Update Manager Download Service



I knew it existed, but I hadn't come across this until now, so here are my notes.

The UMDS is very useful in 2 scenarios

1. When the VUM server has no access to the internet (proxy or not)
This is a pretty obvious use case. VUM can't get the updates, so something else needs to.

2. When there are multiple VUM servers
To avoid all the VUM servers downloading all the same patches, just have UMDS do it instead, and then place them onto a shared device/folder somewhere that all the VUM servers have access to.


In both cases, the updates will be downloaded by UMDS, exported, and then placed onto some sort of shared storage that the VUM servers can see. In scenario 1, this can be a shared folder, a usb drive, or even a CD. In scenario 2, I would suggest that only a shared folder makes sense.

UMDS is not very attractive in terms of using it, it doesn't have a GUI, and you need to use the command vmware-umds which is found in the c:\program files\vmware\infrastructure\update manager folder. Here are the switches as reported by the -H (--help) option:

Basic Commands:

-H [ --help ]
Help on running (this description)

-D [ --download ]
Download Updates based on the current configuration

-E [ --export ]
Export Updates

-R [ --re-download ]
Re-download the Updates

-S [ --set-config ]
Setup Initial Configuration

-v [ --version ]
Print the UMDS version number

-i [ --info-level ] arg
The level of information shown on the console: verbose, info.



Optional arguments for Export and Re-download:

--export-store arg
The destination directory for export operation (Overrides setting from initial configuration)

-s [ --start-time ] arg
For re-download, restrict selection to include updates downloaded since this time (inclusive). Format is ISO-8601 YYYY-MM-DDThh:mm:ss[Z]. Use 'Z' at the end to indicate UTC

-t [ --end-time ] arg
For re-download, restrict selection to include updates downloaded till this
time (inclusive). Format is ISO-8601 YYYY-MM-DDThh:mm:ss[Z]. Use 'Z' at the end to indicate UTC



Arguments for setting up initial configuration:

--patch-store arg
The directory to store all the downloaded updates

--proxy arg
Proxy Server settings in host:port format.To disable proxy, use --proxy ""

-h [ --enable-host ] arg
Enable ESX Host update downloads: true or false

-w [ --enable-win ] arg
Enable Windows VM update downloads: true or false

-l [ --enable-lin ] arg
Enable Linux VM update downloads: true or false

-e [ --export-store ] arg
The default directory for exporting updates

--lang arg
Specify the languages for which updates are downloaded. Multiple values are allowed. Valid values are: ARA, CHS, CHT, DA, ELL, ENU, FI, FRA, GER, HEB, HUN, ITA,
JPN, KOR, NL, NO, PLK, PT-BR, RUS, ESN, SV, THA, TRK



So the common setup commands will be:

vmware-umds -S -h true
vmware-umds -S -w false
vmware-umds -S -l false

If you only want to download host patches and not Virtual Machine patches. I haven't found a way of only downloading certain versions of host patches such as only the ESXi 4 patches. You will end up downloading ALL the patches for ALL the versions.

When you have run the commands above, you can now download the patches by running:

vmware-umds -D

This will download the patches into the repository you specified during install. BEWARE - this takes a LONG time!



UPDATE

See http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1015663 to see how to only download ESX 4 patches

Wednesday 13 January 2010

vCenter installation



  • When creating the database first, run the script provided in the VMware installation and setup guide, but change the password.
  • I also used the script to create the Update Manager database, but I changed the username.
  • For 64 bit servers, run the odbc.exe in c:\windows\SysWoW64\odbcad32.exe, and configure the System DSN from there.
  • It's best to use a service account for the vCenter and Update Manager services, and it is also better to create these before install, rather than changing them after.
  • These service accounts will need to have run as a service, act as part of the operating system rights, plus be local admins on the vCenter server.
  • The service account will also need access to the SQL vCenter database created in point 1
  • When installing vCenter, make sure you are logged on with a domain account with local admin rights rather than a local account. It will also need rights to the SQl server. I got error "25004: Failed to create vcenter server repository" right at the end of the install which i think was due to this causing issues with connection to the SQL server.
  • When installing, I found it much quicker to unzip the vCenter iso/zip onto a drive on the vCenter server, rather than connecting the iso to the CD or opening the zip from a remote server.

Sunday 3 January 2010

ESXi Hints and Tips

Some useful information for using ESXi

Its worth finding out about and installing vMA

  • Use vicfg-cfgbackup to save the configuration of a host. This backup can then be used if it is necessary to restore the host at a later point in time.
  • To view the log files of a host, simply point your browser at https://hostname.vmware.com/host
  • To view the datastore files of a host, simply point your browser at https://hostname.vmware.com/folder
  • Us the vCLI command vifs to transfer files to/from ESXi hosts
  • The command esxcli is used for multi-pathing module management
  • It is not possible to have persistent HA logs either by using a datastore or syslog server as they are only stored locally on the server.

http://communities.vmware.com/community/vmtn/vsphere/esxi