Difference between revisions of "HowTo Install Virtual Machines with VMware Player"
(→Installing Xubuntu 12.04 x86_64: save once again...) |
(→Installing Xubuntu 12.04 x86_64: All done on this chapter as well!) |
||
Line 124: | Line 124: | ||
[[File:VMplayer_tut_035.png|thumb|center|400px|23. Next run the commands: <bash>cd vmware-tools-distrib/ | [[File:VMplayer_tut_035.png|thumb|center|400px|23. Next run the commands: <bash>cd vmware-tools-distrib/ | ||
sudo ./vmware-install.pl -d</bash> | sudo ./vmware-install.pl -d</bash> | ||
− | This will ask for root access, namely your user password that you defined for the virtual machine. It will then install the drivers that will establish the connection between virtual and real machine.<br /><br />*Note:* In case you are using some other Linux distribution, make sure that before this command you install the GCC package!]] | + | This will ask for root access, namely your user password that you defined for the virtual machine. It will then install the drivers that will establish the connection between virtual and real machine.<br /><br />*Note:* In case you are using some other Linux distribution, make sure that before this command you install the GCC package!<br />*Another note*: the <tt>-d</tt> option is for using the default answers. Very useful, since there are a lot of questions. You can remove that option, if you want to do this step-by-step.]] |
− | [[File:VMplayer_tut_036.png|thumb|center|400px|24. | + | [[File:VMplayer_tut_036.png|thumb|center|400px|24. There is goes, building and installing on its own...]] |
− | [[File:VMplayer_tut_037.png|thumb|center|400px|25. | + | [[File:VMplayer_tut_037.png|thumb|center|400px|25. When complete, it ejects the CD that had the VMware tools. Nonetheless, there is still some cleaning up to do...]] |
− | [[File:VMplayer_tut_038.png|thumb|center|400px|26. | + | [[File:VMplayer_tut_038.png|thumb|center|400px|26. Let's go back the the parent folder and remove the temporary tools folder: <bash>cd .. |
+ | rm -r vmware-tools-distrib</bash>]] | ||
− | [[File:VMplayer_tut_039.png|thumb|center|400px|27. | + | [[File:VMplayer_tut_039.png|thumb|center|400px|27. OK, it's going to ask a lot of questions... Hit the key combination <tt>Ctrl+C</tt> and run with an additional option: <bash>rm -rf vmware-tools-distrib</bash> |
+ | *Caution*: the <tt>f</tt> (''force'') option is very useful, but it can ''doom you'' if you're not careful when using it!]] | ||
− | [[File:VMplayer_tut_040.png|thumb|center|400px|28. | + | [[File:VMplayer_tut_040.png|thumb|center|400px|28. This is a ''proof of concept''. Switch to the real machine (<tt>Ctrl+Alt</tt> or move mouse outside) and resize the VMplayer window. As you can see, the virtual window didn't resize. So run the command: <bash>vmware-user</bash> When it's done executing, resize the window again!]] |
− | [[File:VMplayer_tut_041.png|thumb|center|400px|29. | + | [[File:VMplayer_tut_041.png|thumb|center|400px|29. A few error messages appeared in the terminal window, but we'll ignore them since we now have a resized virtual machien window, as big as your real screen can handle! <br />Nonetheless, the best would be to reboot the virtual machine... which you can do as is if it were the real machine: you go to the respective controls (upper right corner inside the virtual machine, the <tt>me</tt> text is a button with the ''username'') and choose to reboot or even shutdown.]] |
− | [[File:VMplayer_tut_042.png|thumb|center|400px|30. | + | [[File:VMplayer_tut_042.png|thumb|center|400px|30. Finally, update the Xubuntu packages inside the virtual machine, but only if you want to...]] |
+ | |||
+ | Now that you have a virtual machine working, it's up to you to do whatever you want inside it! | ||
+ | |||
+ | Final hints: | ||
+ | * In the VMplayer window, menu <tt>Virtual Machine -> Enter Full Screen</tt> switches the virtual machine to full screen mode, with a top bar with the VMplayer menu. The Ctrl+Alt key combination will still work as intended when in full screen. | ||
+ | * The ''Unity'' mode, menu <tt>Virtual Machine -> Enter Unity</tt> is a ''merged'' mode that VMplayer provides, which virtualizes (in this case) the Xubuntu toolbar on the real machine, as well as any windows launched inside the virtual machine. This is a nice mode if you need a ''full immersion'' work environment. | ||
+ | * You can run more than one virtual machine at once! All you have to do is launch one VMplayer window per virtual machine. | ||
+ | * '''Caution''': Building {{OpenFOAM}} on two or more virtual machines at the same time can be easily done, as long as you have enough real cores and memory in the real machine.<br />For example, a real machine with 8GB of RAM and 6 real ''cores'', can easily run 3 VMs (virtual machines) with 2 cores and 2GB each. But it won't be able to handle very well 3 VMs with 4 cores and 2 GB each, since it will overload the system and might end up crashing the real machine! ([[User:Wyldckat|Wyldckat]] 12:38, 7 July 2012 (CEST)) | ||
+ | * Another reason for caution is to not install more than one Operating System on each VM at the same time. The ''heavy'' access to the real hard-drive might lock up things during installation of both VMs. ([[User:Wyldckat|Wyldckat]] 12:38, 7 July 2012 (CEST)) | ||
+ | * You should not use two VMplayer windows to control the same virtual machine. If you try this, you're just ''asking for trouble''. | ||
+ | * If you want to install a Windows Operating System in a virtual machine, keep in mind that Windows will '''demand''' that you use a new license for each virtual machine! Also, portability of such a virtual machine might not be as easy, since the real machine's specifications are reflected inside the virtual machine! | ||
= Troubleshooting = | = Troubleshooting = |
Revision as of 10:38, 7 July 2012
Contents
1 Introduction
Testing OpenFOAM installations on several different Operating Systems can take its toll. But at least with virtualization, one person can handle 3, 4 or even more virtual machines at the same time or in sequence, all with a single real machine.
For the readers that don't know what machine virtualization is, here are some pages on this subject at Wikipedia:
- Page about what a Virtual machine is.
- The global description of what Virtualization is.
- Extended descriptions of selected virtualization software.
From the last link there are 2 popular and free virtualization applications for the general public:
- VirtualBox - The preferred among the open-source community, given the code is open-source.
- VMware Player - The one described in this How To page and which will be referred to from here on as VMplayer.
The choice of using VMplayer is somewhat simple: it's free, very good (if not best) performance and easy to use. (and personal preference - Wyldckat 00:11, 7 July 2012 (CEST)) Nonetheless, VirtualBox is a very good competitor, specially for testing PXE boot images. (Wyldckat 00:11, 7 July 2012 (CEST))
This wiki page is divided into the following chapters:
- How to install VMplayer
- How to create a new virtual machine
- Troubleshooting - as in don't shoot your computer, shoot only the troubles themselves
Final introductory note: this tutorial would probably be more appreciated as a video tutorial, but that exercise is left to the readers that wish to contribute!
2 How to install VMplayer
First a few links for reference:
- The official page for VMware Player: www.vmware.com/vmplayer
- Official documentation: Getting Started with VMware Player
Go to the first link and take care of registering and downloading VMplayer for your desired Operating System (Windows, Linux or Mac OS X). (If you don't want to register... search on-line for other possible solutions, but be careful not to download damaged software.)
TODO:
- Describe existing installers and how to run them on each OS.
- Show pictures of the installation process, which should be nearly identical for all of them.
3 How to create a new virtual machine
TODO... 1st upload pictures, then write dialogue...
Here it will be exemplified how to create and install a virtual machine with Xubuntu 12.04 x86_64 (64bit). This assumes you've already downloaded the desktop ISO of Xubuntu 12.04 x86_64, which we'll leave to the reader to figure out how and were to get it.
3.1 Create a New Virtual Machine
This section will take you step by step on how to create a new virtual machine, mainly oriented to test building OpenFOAM. This example will use Xubuntu 12.04 x86_64 (aka 64bits and amd64).
To run the VMplayer, it will depend on the Operating System you are using on your real machine:
- Windows
- Should be on the programs menu, on the lower left corner of the screen, in the button also known as the Start button.
- Linux
- Depends a bit on the distribution. The more modern ones work the same way you run any other application: you write the name of what you want to run (vmplayer, vmware or even player) and it will show you what it thinks you mean. On the more classic ones, it usually is put in the System Tools section.
You can also go old school and run in a terminal/console window:vmplayer
- Mac OS X
- If you have one, then you should already know where to look ;)
So, after you've managed to figure out how to run VMplayer, here are the steps to be taken (you can click on the images to see them bigger):
3.2 Installing Xubuntu 12.04 x86_64
Now onward to installing Xubuntu 12.04 x86_64 inside the virtual machine:
Now that you have a virtual machine working, it's up to you to do whatever you want inside it!
Final hints:
- In the VMplayer window, menu Virtual Machine -> Enter Full Screen switches the virtual machine to full screen mode, with a top bar with the VMplayer menu. The Ctrl+Alt key combination will still work as intended when in full screen.
- The Unity mode, menu Virtual Machine -> Enter Unity is a merged mode that VMplayer provides, which virtualizes (in this case) the Xubuntu toolbar on the real machine, as well as any windows launched inside the virtual machine. This is a nice mode if you need a full immersion work environment.
- You can run more than one virtual machine at once! All you have to do is launch one VMplayer window per virtual machine.
* Caution: Building OpenFOAM on two or more virtual machines at the same time can be easily done, as long as you have enough real cores and memory in the real machine.
For example, a real machine with 8GB of RAM and 6 real cores, can easily run 3 VMs (virtual machines) with 2 cores and 2GB each. But it won't be able to handle very well 3 VMs with 4 cores and 2 GB each, since it will overload the system and might end up crashing the real machine! (Wyldckat 12:38, 7 July 2012 (CEST)) * Another reason for caution is to not install more than one Operating System on each VM at the same time. The heavy access to the real hard-drive might lock up things during installation of both VMs. (Wyldckat 12:38, 7 July 2012 (CEST))
- You should not use two VMplayer windows to control the same virtual machine. If you try this, you're just asking for trouble.
- If you want to install a Windows Operating System in a virtual machine, keep in mind that Windows will demand that you use a new license for each virtual machine! Also, portability of such a virtual machine might not be as easy, since the real machine's specifications are reflected inside the virtual machine!
4 Troubleshooting
On this chapter is shown various known issues and solutions. Other issues and solutions can be found in the official documentation (see chapter How to install VMplayer) and on-line.
4.1 The yield() function is not activated
Issue: A message dialogue box appears saying:
The yield() function is not activated
And doesn't allow running the machine.
Note: This is happens on Linux with kernel versions greater or equal to 2.6.31.
Solution: To fix this until next boot, run as root:
echo "1">/proc/sys/kernel/sched_compat_yield sysctl -w kernel.sched_compat_yield="1"
For a permanent solution, run as root as well:
echo -e "\n\n#This is needed for Virtual Machines to run at full power\!\nkernel.sched_compat_yield = 1" >> /etc/sysctl.conf
4.2 Unable to operate the VMplayer window
Issue: Error and warning windows sometimes pop to the wrong side of the window, namely to the back of the VMplayer window!
Note: This is more common on Linux.
Solution: The main window is sometimes still usable, in the sense that it can still be moved out of the way, to reveal the small error/warning dialogue in the back of the main window.
4.3 /dev/vmmon does not exist
Issue: A dialogue appears with the message:
/dev/vmmon does not exist
Note: This is more common on Linux.
Solution: run as root:
/etc/init.d/vmware stop /etc/init.d/vmware start
5 History
Readers are welcome to improve this document if they so see fit to do it. Links to video tutorials directly related to this tutorial are also welcome.
Below is a short edit history. For the complete history, see the History link at the top-right of the page.
- Wyldckat 00:30, 7 July 2012 (CEST) - Still editing the page...