Thursday 23 July 2015

Deploying multiple VMs fails with error "Error caused by file /vmfs/volumes/datastore_id/path_to/source.vmdk" on ESXi 5.5 u2

I've been puzzled over this issue for quite a long time.

Customer has some cloud solution on top of vSphere 5.5 u2 and deploying/cloning multiple VMs from template/VM fails with an error:

"Error caused by file /vmfs/volumes/datastore_id/path_to/source.vmdk".

This errors shown in vSphere client during "Apply Storage DRS recommendation".

I was able to replicate this behaviour with simple PowerCli script:

$vmquantity = 5
$template = Get-vm -Name "template_vm"
$dsclu = Get-DatastoreCluster -Name DS_clu1_foo
$clu = Get-Cluster -Name Clu1_foo
$vmlocation = Get-Folder -Name Folder_foo


1..$vmquantity |ForEach-Object {
$vmname = "testVM$_"
New-VM -ResourcePool $clu -Name $vmname -Datastore $dsclu -Location $vmlocation -VM $template -RunAsync 
}

Key here is "RunAsync" parameter, only then problem occur.

I did a lot of unnecessary steps, like disabling VAAI, changing datastore and storage controller queues, without success.

Simple solution resolved this issue: deleting ctk.vmdk file of source VM/template fixed the problem. Also, make sure that .vmx or .vmtx files doesn't have any reference to deleted files.

There is some VMware KB with this solution but it is not related to the error I was getting.VMware should update their KB's because solution was hard to find.

Update:

I noticed that backups also are affected by this (at least TSM backup can be), that is snapshots are not created and as a result backup fails. Deleting ctk file can help here also.

Tuesday 7 July 2015

Powershell ISE usefull keyboard shortcuts

Here they are, why I forget them all the time is beyond me.

Ctrl + T - opens new PowerShell session in new tab.

Ctrl + Space - runs intellisense against typed text

Ctrl + J - allows to insert predefined code to your script

Ctrl + R - shows/hides script pane (maximizes console view)

Ctrl + I - goes t othe script pane

Ctrl  +D - goes to console pane

Ctrl + G - Go to line

F8 - executes one line on cursor position

F5 - executes whole script

Friday 19 June 2015

Flex System x240 M5 PXE not booting

Hello, today I stumbled upon another problem. x240 M5 compute node did't start from PXE.
On pxe server I had tftp error:

tftp: client does not accept options

Problem wasn't on PXE server side, it was compute node configuration issue, more precisely - NIC config. So to resolve it one has to do following:

1. Log in to server's IMM (you can't do it from chassis CMM, it needs to be done from IMM) and go to Server Management --> Adapters.

2.   Next, select you ethernet adapter. In my case it is Flex System EN4172 2 port 10 Gbit Ethernet Adapter





3. Go to configuration tab and under "MBA Configuration Menu" change "Legacy Boot protocol" from NONE to PXE.

4. Reboot the node, it should now boot from PXE if you have legacy mode enabled*.


(maybe it'll work with UEFI also, but didn't veriy it)

Update: I checked and it doesn't work with UEFI...

Tuesday 3 March 2015

Windows 8.1/Server 2012 (R2) classic Start Menu

Windows 8.1/Server 2012(R2) has some sort of classic Start Menu built-in.

Well, it's not a GUI thing, it's just a folder with all standard shortcuts, similar to "All Programs" menu in Windows 7.

How to get it?

1. Right click your taskbar and Toolbars -> New toolbar
2. In Select Folder windows nawigate to C:\ProgramData\Microsoft\Windows\Start Menu\Programs and click "Select Folder"

That's it! Now you have "Start Menu" on your taskbar.

Sunday 1 February 2015

How to configure site exceptions in java portable

So, scenario is as following: you want to run remote console or other java app from customer's server without installing Firefox and Java. You cannot disable high security settings in IE.

So you'll probably go with portable version of FF/Java. Cool, but latest java portable is really pain in the bottom, when dealing with outdated or self signed certs.

For me, "Application blocked by security" errors were caused by expired certs.

Normally you'd go to Control Panel opened Java settings and in security tab add there website as an exception. But there's no java applet, because we are using portable version.

We must modify/create exception.sites file to be able to use our Java app:

1. Go to <your user profile>\AppData\LocalLow\Sun\Java\Deployment\security (For some strange reason, despite Java portability, this folder is created in user profile)
2. Modify/create exception.sites file and add there your website starting from "http://" or "https://"

So, for example if your user is Tom it would be:

c:\Users\Tom\AppData\LocalLow\Sun\Java\Deployment\security\exception.sites

And file content looks like this:

http://192.168.10.200
https://192.168.30.20

etc...

Now app should start without problems.

Update:

This method will also work in normal, installed java, if for some reason you don't have java applet in control panel.

If still doesn't work, try commenting (put # in front) line

jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024


in c:\Program Files (x86)\java\<your version>\lib\security\java.version file.

This line in more by the end of file.