Use VMware VMRC Viewer Outside of Browser

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

I was trying to find a way to configure the vSphere Web Console plugin port it connects to since I run a non-standard port for SSL on the vCenter server. This is what I came up with after doing some research.

First thing’s first, download and install the console plugin.

Windows
https://[IP]/ui/plugin/vmware-vmrc-win32-x86.exe

Linux (more info for linux: http://www.geeklab.info/2010/02/running-vmware-remote-console-outside-the-browser/)
https://[IP]/ui/plugin/vmware-vmrc-linux-x86.xpi

This allows me to change the port that VMware VMRC web console plugin uses to connect because I can create a shortcut to the vmware-vmrc executable and pass the needed arguments.

I can run the following command to access my virtual machine (given that I know the MOID):

c:program files (x86)common filesvmwarevmware remote console plug-invmware-vmrc.exe -h 1.2.3.4:11443 -M vm-1234

VMware Tray Dump Files Chewing up Space

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

I was checking out a server today (2003)  and noticed that it was a tad low on disk space on the OS disk.  It’s a terminal server and it is not heavily used (heavily meaning many users) but there are a handful of users who are in it multiple times throughout the day.

I ran my standard temporary files cleanup batch file to clear up any user profile temp files as well as Internet Explorer temp files.  Freed up about 500MB which was nice but I was still not satisfied with total available disk space remaining so I investigated further.  Fired up the trusty TreeSize Free and let it scan C: disk.

Upon inspection I saw one particular user had almost 100MB data files in their profile directory under Application DataVMware.  There were tons of vmwaretray-xxx.dmp files.  The files were about 650KB each!

After some quick research online, I discovered the reason these files are there are because when the user logs onto the terminal server they do not have permission to read a particular key from the registry that the VMware Tray icon accesses at logon.

One option was to change the permissions so users could read the key, but I am not fond of that, plus on an update I’m sure it’d come back around to bite me in the ass.

The other option, I found out, is that I can disable the VMware Tray icon from loading when a user logs on which will in turn not generate a VMwaretray dump file.  Sweet!

I wanted to see how bad the damage was from these VMwaretray dump files so I first set a filter in TreeSize Free to only calculate VMWARETRAY\* files.  4GB+!!!  HOLY SHIT!

Now, I’ve added this path into the cleanup script I typically run and it cleared up the files with no problem.

To make VMware Tray icon not load for users, you can modify the registry.

HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware Tools

Look for ShowTrayIcon and set it’s value to zero (0).

Next time users log on this should not load the tray icon.  =)

Here’s a screenshot of TreeSize showing some massive amount of space used up by VMwaretray dump files!

 

Server 2008 R2 Performance Tuning

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

Here’s some of the things I do to a new Server 2008 R2 install (physical and/or virtual settings are mixed in; (VIRTUAL ONLY) specifies I only do configuration change on Virtual systems).

  • Disable Screen Saver, Personalize -> Screen Saver -> None
  • Sound, Do not start Audio Service -> Sound
  •  No Sounds
  •  Display Performance, System -> Advanced System Settings -> Performance Settings -> Adjust for Best Performance
  • Power Options -> High Performance
  • Power Options -> Changed when the computer sleeps -> Turn off Display = Never
  •  Pagefile, System -> Advanced -> Performance -> Set no pagefile (VIRTUAL ONLY)
  •  Disable System Screensaver Regedit -> HKEY_USERS\DEFAULT\Control Panel\Desktop -> Delete SCRNSAVE.exe
  •  Stop Audio Service in services.msc, set to Manual
  •  Remove ipv6 support
  •  Start Menu -> remove quick launch
  •  Drive Indexing, My Computer -> C: Properties -> Unselect Index this drive… -> Apply recursively -> ignore all permission errors
  •  Run as administrator ‘cmd.exe’ -> powercfg -h OFF to disable hibernation and delete hiberfil.sys from C:
  •  reboot
  •  delete pagefile.sys on c: (VIRTUAL ONLY)
  •  defrag C: (I use contig http://live.sysinternals.com/contig.exe and run contig -s c:\*.*)
  •  clear c:\users\administrator\appdata\local\temp folder
  •  enable remote desktop, right click my computer -> properties -> advanced properties -> remote tab
  •  activate windows
  • Run as administrator ‘cmd.exe’ and copy/paste the following:
    powercfg -setactive scheme_min
    Powercfg -setacvalueindex scheme_current sub_processor 45bcc044-d885-43e2-8605-ee0ec6e96b59 100
    Powercfg -setactive scheme_current
    Powercfg -setacvalueindex scheme_current sub_processor 893dee8e-2bef-41e0-89c6-b55d0929964c 100
    Powercfg -setactive scheme_current
    Powercfg -setacvalueindex scheme_current sub_processor bc5038f7-23e0-4960-96da-33abaf5935ec 100
    Powercfg -setactive scheme_current
    powercfg -setacvalueindex scheme_current 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 54533251-82be-4824-96c1-47b60b740d00 893dee8e-2bef-41e0-89c6-b55d0929964c 100
    Powercfg -setactive scheme_current

vzlist Output Parameters and Their Specifiers

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

OpenVZ ‘vzlist’ command information

vzlist Output Parameters and Their Specifiers

Almost any parameter that can be used after the -o and -s switches of the vzlist utility can be specified by the “dot+letter” combination following the parameter and denoting one of the following things:

Specifier Description
.m The maximal registered usage of the corresponding resource by the given Container.
.b The barrier on using the corresponding resource set for the given Container.
.l The limit on using the corresponding resource set for the given Container.
.f The number of times the system has failed to allocate the corresponding resource for the given Container.
.s The soft limit on using the corresponding resource set for the given Container.
.h The hard limit on using the corresponding resource set for the given Container.

The following parameters are available for using with the utility:

Parameter Possible Specifiers Output Column Description
ctid none CTID The Container ID.
hostname none HOSTNAME The Container hostname.
ip none IP_ADDR The Container IP address.
status none STATUS Specifies whether the Container is running or stopped.
tm none TM Specifies the type of the OS template your Container is based on:

  • ST indicates that the Container is based on a standard OS template;
  • EZ indicates that the Container is based on an EZ OS template.
ostemplate none OSTEMPLATE Specifies the name of the OS template your Container is based on ( e.g. redhat-el5-x86).
kmemsize .m, .b,.l, .f KMEMSIZE The size of unswappable kernel memory (in bytes), allocated for internal kernel structures of the processes of a particular Container. Typical amounts of kernel memory are 16…50 Kb per process.
lockedpages .m, .b,.l, .f LOCKEDP The amount of memory not allowed to be swapped out (locked with the mlock() system call), in 4-Kb pages.
privvmpages .m, .b,.l, .f PRIVVMP The size in 4 Kb pages of private (or potentially private) memory, allocated by Container applications. Memory that is always shared among different applications is not included in this resource parameter.
shmpages .m, .b,.l, .f SHMP The total size of shared memory (including IPC, shared anonymous mappings and tmpfs objects), allocated by processes of a particular Container, in 4 Kb pages.
numproc .m, .b,.l, .f NPROC The number of processes and threads allowed.
physpages .m, .b,.l, .f PHYSP The total size of RAM used by processes. This is accounting-only parameter currently. It shows the usage of RAM by the Container. For memory pages used by several different Containers (mappings of shared libraries, for example), only a fraction of a page is charged to each Container. The sum of the physpages usage for all Containers corresponds to the total number of pages used in the system by all accounted users.
vmguarpages .m, .b,.l, .f VMGUARP The memory allocation guarantee, in pages (one page is 4 Kb). Applications are guaranteed to be able to allocate memory while the amount of memory accounted as privvmpages does not exceed the configured barrier of the vmguarpages parameter. Above the barrier, memory allocation may fail in case of overall memory shortage.
oomguarpages .m, .b,.l, .f OOMGUARP The out-of-memory guarantee, in 4 Kb pages. Any Container process will not be killed even in case of heavy memory shortage if the current memory consumption (including both physical memory and swap) does not reach the oomguarpages barrier.
numtcpsock .m, .b,.l, .f NTCPSOCK The number of TCP sockets (PF_INET family, SOCK_STREAM type). This parameter limits the number of TCP connections and, thus, the number of clients the server application can handle in parallel.
numflock .m, .b,.l, .f NFLOCK The number of file locks created by all Container processes.
numpty .m, .b,.l, .f NPTY The number of pseudo-terminals. For example, ssh session, screen, xterm application consumes pseudo-terminal resource.
numsiginfo .m, .b,.l, .f NSIGINFO The number of siginfo structures (essentially this parameter limits size of signal delivery queue).
tcpsndbuf .m, .b,.l, .f TCPSNDB The total size (in bytes) of send buffers for TCP sockets – amount of kernel memory allocated for data sent from an application to a TCP socket, but not acknowledged by the remote side yet.
tcprcvbuf .m, .b,.l, .f TCPRCVB The total size (in bytes) of receive buffers for TCP sockets. Amount of kernel memory received from the remote side but not read by the local application yet.
othersockb .m, .b,.l, .f OTHSOCKB The total size in bytes of UNIX-domain socket buffers, UDP and other datagram protocol send buffers.
dgramrcvbuf .m, .b,.l, .f DGRAMRCVB The total size in bytes of receive buffers of UDP and other datagram protocols.
nothersock .m, .b,.l, .f NOTHSOCK The number of socket other than TCP. Local (UNIX-domain) sockets are used for communications inside the system. UDP sockets are used for Domain Name Service (DNS) queries, for example.
dcachesize .m, .b,.l, .f DCACHESIZE The total size in bytes of dentry and inode structures locked in memory. Exists as a separate parameter to impose a limit causing file operations to sense memory shortage and return an error to applications, protecting from excessive consumption of memory due to intensive file system operations.
numfile .m, .b,.l, .f NFILE The number of files opened by all Container processes.
numiptent .m, .b,.l, .f NIPTENT The number of IP packet filtering entries.
diskspace .s, .h DQBLOCKS The total size of disk space consumed by the Container, in 1 Kb blocks. When the space used by a Container hits the barrier, the Container can allocate additional disk space up to the limit during grace period.
diskinodes .s, .h DQINODES The total number of disk inodes (files, directories, symbolic links) a Container can allocate. When the number of inodes used by a Container hits the barrier, the Container can create additional file entries up to the limit during grace period.
laverage none LAVERAGE The average number of processes ready to run during the last 1, 5 and 15 minutes.
cpulimit none CPULIM This is a positive number indicating the CPU time in per cent the corresponding Container is not allowed to exceed.
cpuunits none CPUUNI Allowed CPU power. This is a positive integer number, which determines the minimal guaranteed share of the CPU the Container will receive. You may estimate this share as ((Container CPUUNITS)/(Sum of CPU UNITS across all busy Containers))*100%. The total CPU power depends on CPU and Virtuozzo reporting tools consider one 1 GHz PIII Intel processor to be equivalent to 50,000 CPU units.
slmmode none SLMMOD The SLM mode defining the behaviour of the SLM and UBC parameters in respect of the given Container. It can be one of the following:

  • ubc: the SLM mode is disabled, which means that the slmmemorylimit parameter is not supported and you can use only the UBC parameters to control the amount of memory which can be consumed by the Container.
  • slm: the SLM mode is enabled, which means that the slmmemorylimit parameter is supported and can be used to manage the amount of memory which can be consumed by the Container.
  • all: both the slmmemorylimit and UBC parameters are supported and can be used to manage the amount of memory which can be consumed by the Container.
slminst none SLMINST The instant memory usage limit set for the Container, in 4 KB pages.
slmavg none SLMAVG The average memory usage limit set for the Container, in 4 KB pages.