My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com

Pages










Showing posts with label virtual. Show all posts
Showing posts with label virtual. Show all posts

Monday, July 11, 2011

ulimit to set linux resource for testing

Recently I started using ulimit. I can seriously recommend ulimit utility as an awesome tool. Its location is /usr/bin/ulimit. Before begining let me accept that the better title for this post would have been 'how to use ulimit on linux' or 'setting resource limit and unset using ulimit', or better still, 'what is ulimit?'. [Huh..but what is wrong with my title ;) ]

Coming back, You can use 'ulimit' to set or display a resource limit. The available options are listed below. The limit for a specified resource is set when the limit is specified. The value of limit can be a number in the unit specified with each resource, or the value unlimited. I dedicate this post to my fellows in my team. My team including my manager is really great.

Back to the ulimit, the various ulimit Command options are as follows:

-a
Lists all of the current resource limits.
-c
The number of 512-byte blocks on the size of core dumps.
-d
The number of K-bytes on the size of the data area.
-f
The number of 512-byte blocks on files that can be written by the current process and its child processes (files of any size may be read). On file systems (such as vxfs file systems) that support large files, setting this limit to unlimited represents the largest file size supported on the file system. See ``Notices'', below.
-m
The number of K-bytes on the size of physical memory.
-n
The number of file descriptors plus 1.
-s
The number of K-bytes on the size of the stack area.
-t
The number of CPU seconds to be used by each process.
-v
The number of K-bytes for virtual memory.
If no option is given, -f is assumed; that is, you can specify a limit with or without the preceding -f option, and both cases are interpreted as an attempt to raise the file size limit.

There is a provision of hard and soft limit. i have never tried that, but in case yo want to explore more you can search ulimit man pages. or can even refer Click

I am attaching screenshot of ulimit -a option. this would clearly show all the limits currently set:



There are two important operands:

1) limit
Gives the resource-specific limit to use as the new resource limit.

2) unlimited
Sets the largest allowable resource limit. It is necessary to set limit to the value unlimited for access to large files.

It is important to note that ulimit works across all flavors of linux. Even on WindRiverLinux. This comes as a very handy tool for QA people testing on unix environments. Once set, you can reset the limits again using the same command. You can also make it unlimited. Following two scenarios are of great use while testing:
1) ulimit -c unlimited: this will make maximum possible space available for making core dumps. This will help fruitful core dump creations to be consumed both by the QA and dev people.
2) ulimit -v unlimited. this will make maximum possible space available for virtual memory. So this can also regulate or simulate low memory conditions.

I guess this much is enuff. Rest you can explore. Please do not forget clicking on a few Advertisements. Google will give ranking and points to my blog, you will get good contents always. ;) rest you know!!!

Wednesday, June 22, 2011

Access copy Share files between Host and guest file system in VMware virtual machine

There is definitely ways to achieve the task. It all depends on the choice of the host machine you are using and the guest OS in the VMware. Just keep in mind the following matrix:






HostGuestTool
WinWinwindows file sharing
WinLinuxsamba, ssh
linuxwinsmbmount
linuxlinuxnfs,ftp,telnet

The same above in graphics is

To summarize:
# If Both systems run Windows operating system, you can use Windows file sharing
# If You are connecting from a Linux system to a Windows system, you can use smbmount
# If You are connecting from a Windows system to a Linux system, use Samba
# If Both systems run Linux operating systems, use NFS, FTP and Telnet

For more detailed description you can also visit VMWare official website document on this topic at the following location. Click Here for VMWare Help

In order to share folders between the host operating system and the guest operating system you can use VMWare settings. Go to VM->Settings->options

The same is shown in the adjacent snapshot.
Added notes in July 2012 :-- VMware Workstation 4 Features | Documentation | Knowledge Base | Discussion Forums Prev Contents Last Next Using Shared Folders With shared folders, you can easily share files among virtual machines and the host computer. To use shared folders, you must have the current version of VMware Tools installed in the guest operating system and you must use the Virtual Machine Control Panel to specify which directories are to be shared. You can use shared folders with virtual machines running the following guest operating systems: Windows Server 2003 Windows XP Windows 2000 Windows NT 4.0 Linux with a kernel version of 2.4 or higher To set up one or more shared folders for a virtual machine, be sure the virtual machine is open in Workstation and click its tab to make it the active virtual machine. Go to Edit > Virtual Machine Settings > Options and click Shared folders. You can add one or more directories to the list. Those directories may be on the host computer or they may be network directories accessible from the host computer. In a Windows virtual machine, shared folders appear in My Network Places (Network Neighborhood in a Windows NT virtual machine) under VMware Shared Folders. For example, if you specify the name Test files for one of your shared folders, you can navigate to it by opening My Network Places > VMware Shared Folders > .host > Shared Folders > Test files. You can also go directly to the folder using the UNC path \\.host\Shared Folders\Test files. You can map a shared folder to a drive letter just as you would with a network share. Note: To see shared folders displayed in this way, you must update VMware Tools in the virtual machine to the current version. If your guest operating system has the version of VMware Tools that shipped with VMware Workstation 4.0, shared folders appear as folders on a designated drive letter. In a Linux virtual machine, shared folders appear under /mnt/hgfs. So the shared folder in this example would appear as /mnt/hgfs/Test files.

Vmware and sharing rocks!!

Thursday, June 16, 2011

Keyboard shortcuts for VMware

I am listing some keyboard shortcuts for VMWare. These have been prepared by learning, help docs and the internet. Please comment if I miss something important, or if any thing is not working with the version you are using.


F11 switch to full-screen mode and also back to normal mode
Ctrl-Alt-Insert Like a Ctrl-Alt-Delete to the VMware OS running
Ctrl-Alt used for mouse release and exit full screen mode
Ctrl-Alt-Enter VM into full-screen.
Also acts like Tab in windows to choose between VMs
Ctrl-Alt-Tab switch between multiple VM.


Ctrl+N create a new VM for you
Ctrl+O open a new VM for you
Ctrl+P edit VMware settings and Preferences
Ctrl+B power on some VM
Ctrl+E power off
Ctrl+R reset power
Ctrl+Z suspend some VM



Oh cumon! I am not giving all keyboard shortcuts. The UI is rich enough. But actually these are often required especially when your mouse starts non-responsive. Afterall, VMware and OS are also softwares. And they can be buggy sometimes ;) Hope you find this cool/