VMware Workstation “Not enough physical memory is available” Error (when you have plenty of memory)

Today after recurrence of losing all my favorites Microsoft IE (I suppose it has something to do with OneDrive/Synchronization options, though could be updates related) I went on updates spree instead of properly and systematically researching the problem (kind of most tempting way in dealing with technical issues).

After installing bunch of Windows Updates along with refresh of laptop hardware drivers and BIOS firmware I ended up with VMware throwing following error at me:

WMware_WS_Phy_mem_error_KB2995388

And this is for VM which is previously worked fine and having about 30 GB of free RAM. At www.petri.com you can find quite good discussion of possible reasons and ways of addressing this problem, and in my case it was because of KB2995388, so I fixed it by removing this optional update.

How to deal with: “File not found: -SnapshotXXX.vmsn” This file is required to power on this virtual machine error

Due to nature of my work I’m using loads of virtual machines, using mainly VMWare Worksation these days (though I hope to get back to Hyper-V once I start working on my Microsoft certification refresh). In most cases IT Pros use resource demanding VM just because it is often necessary to have whole enterprise technology stack in your lab apart from that particular software on which you happen to be focused at the moment.

So your virtual environment usually involves enterprise technology stack (directory services, sometimes utility services like DNS, DHCP; messaging, databases, web services), and more often than not you end up running rather huge VM as it is preferably to have all this in one VM for the sake of portability and convenience. Such “self-contained” VM is going to require large chunk of your drive space (think snapshots), and as you want performance you likely will try to fit this on SSD, which is great technology by itself but still constrained by its high cost per megabyte of space.

So having said that I barely able to fit about 4 such VMs on my 500 GB SSD, it allows me to have no more than 3 snapshots and recently after deleting number of prior snapshots on the fly in some unsystematic way to free up space for new snapshot I ended up in situation when my paused VM (without recent snapshot) started throwing me this error message upon attempt to start it:

“File not found: <machine>-SnapshotXXX.vmsn” This file is required to power on this virtual machine. If this file was moved, please provide its new location. Cancel/Browse

So rather silly (not googling / researching this properly) I decided to revert to some old snapshot which was way back in terms of where I stopped with things I worked on in this VM, expecting that this will bring my VM backs to life at least. This was big mistake as after reverting to some other snapshot error didn’t gone, it rather continued to ask me about this missing file.

In fact proper solution was to make new snapshot (theoretically it should not be large if your previous existing snapshot was recent) – then copy newly created snapshot file and rename it so that it named as the one about which error message is complaining. The main thing here is not to rush and revert to previous snapshot and use this technique so that you don’t lost your work in progress as I did.

How to: Refresh the User Manager Cache in K2 blackpearl

Each change in the configuration of user managers in K2 requires user cache refresh which can be done by executing following SQL script against K2 database:

UPDATE [K2HostServer].[Identity].[Identity]
SET [ExpireOn] = GETDATE()
,[Resolved] = 0
,[ContainersResolved] = 0
,[ContainersExpireOn] = GETDATE()
,[MembersResolved] = 0
,[MembersExpireOn] = GETDATE()

GO

 

 

How to: Remotely enable inbound Remote Desktop rule in Windows Server 2008 R2 firewall

In situations when you unable to connect to remote WS 2008 box via RDS due to Windows Firewall being enabled without inbound RDS rule enabled you may try to enable required firewall rule remotely.

If PS on machine in question is configured for remoting you may open remote PS session on this machine, using following command:

enter-pssession -computername REMOTE_COMPUTER_NAME

If remote PS session opened successfully you may run both PS commands and regular CLI commands for remote machine there. To check inbound RDS rule for Windows firewall use:

netsh advfirewall firewall show rule name=”Remote Desktop (TCP-IN)”

If this role not enabled issue following command to enable it:

netsh advfirewall firewall set rule name=”Remote Desktop (TCP-IN)” new enable=yes

Starting with Windows Server 2012 you may control Windows Firewall with PS commandlets which is much more convenient and easier.

 

How to: check currently used credentials for database connection in Oracle SQL Developer 4

When you are using Oracle SQL Developer 4 to connect to multiple databases at the same time (sometimes using credentials other than saved in connection properties) you have multiple tabs in main window labeled with DB names without any indication of under which account you are connected to them (it seems natural to have such information in tab label/name).

So your options here is either create multiple saved connections for each credentials used and name connections so that they reflect both DB name and credentials (after that using drop box in top right corner of main window comes in really handy) or use a query to check which credentials are currently being used.

You may use following query to check your currently used credentials:

SELECT username,
osuser,
machine,
schemaname
FROM gv$session
WHERE sid=(SELECT sys_context(‘userenv’,’sid’) FROM dual);

This will give you USERNAME, OSUSER and MACHINE info. Or, alternatively you may use this (less details, but also less privileges required)​:

SELECT USER,SYS_CONTEXT (‘USERENV’,’SESSION_USER’) FROM dual

This returns USER and SYS_CONTEXT.