Setting up your Virtual Machine for VMware



CS-2011, Machine Organization and Assembly Language, D-term 2013A Linux Virtual Machine for CS-2011 ProjectsHugh C. LauerAdjunct ProfessorWorcester Polytechnic InstituteAs an alternative to working on the CCC Linux systems, a virtual machine is provided for your convenience. It is not necessary to use this, but some students may prefer to use their own laptop or desktop computers for CS-2011 projects. This document describes how to set up a Linux virtual machine on your personal Windows computer using the free VMware Player.,Virtual MachinesA virtual machine is an application program capable of simulating a computer system with enough fidelity and performance to mimic actual computer hardware. The virtual machine concept originated in the 1960s, and it has now matured to the point where virtual machines are routinely used in a wide variety of commercial, academic, and organizational settings.Two important terms in virtual machine technology are host and guest.The host is the hardware and operating system on which the virtual machine application runs — e.g., your own computer, a laboratory computer, or a departmental or corporate server. The host operating system is irrelevant, so long as it supports the virtual machine application. Sometimes the host system has no formal operating system of its own and, instead, runs the virtualization application directly on “bare hardware.” In this case, the virtualization application is called a hypervisor.The guest is the simulated computer, which runs its own operating system and set of applications — e.g., a Linux guest running on top of a Windows or Mac-OS host.The virtual machine application uses the host processor(s) to simulate the guest processor(s), and it uses files on the host system to simulate the disks and RAM of the guest system. It also connects some host resources directly to the guest system — e.g., the host’s CD or DVD drive or a USB flash drive when it is plugged into the host system.This virtual machine is based on VMware Player, a freeware virtualization application. Other virtualization applications are also available and can be used with this virtual machine image, but students who choose to do so are on their own.Download and install your virtual machineBefore you can use your virtual machine, you need to acquire and install VMware Player. You can download and install VMware Player from here:–, download the zip file containing the virtual machine image from the following URL:– This file is about 2.1 gigabytes. It will download fairly quickly on the WPI campus, but it could take a long time to off-campus locations with slow network service. Unzip this file to a folder on your hard drive. Please note that the unzipped files may eventually grow to 8-10 gigabytes on your host machine. The unzipped folder should look like REF _Ref294467093 Figure 1 below:–Figure SEQ Figure \* ARABIC 1The most important file is the VMware virtual machine configuration file (with the vmx extension, just above the middle of the figure). This is a text file describing all of the attributes of the virtual machine and its component files. You can open it in a text editor such as Notepad and examine its contents, but that is not necessary for this course.For most purposes in this course, you can use the virtual machine “right out of the box.” Double click on the vmx file in REF _Ref294467093 \h Figure 1, or navigate to it and open it in VMware Player. If it turns out that you need to make adjustments, see instructions at the end of this document.After VMware Player opens and before it boots the virtual machine, it will present you with dialog box resembling the following:–Figure SEQ Figure \* ARABIC 2Be sure to select “I copied it.” The reason is that VMware generates a network MAC address from the path name of the VMware virtual machine configuration file. VMware uses this path name to figure out whether it is dealing with the same virtual machine or a copy. Very, very bad things happen when two or more computers get onto the same network with the same MAC address. When you select “I copied it,” VMware changes the MAC address to something different (and hopefully unique, at least within the scope of your network).After the virtual machine is loaded and started, you will be presented with a boot screen resembling the one in REF _Ref351129780 \h Figure 3 REF _Ref351129780 \p \h below.If you do nothing, a timer will count down and the default version of the operating system — i.e., Desktop -- openSUSE 12.1— will boot. If you click in the window, you may choose other options before booting, but that should not be necessary in this course.Note:You transfer the input focus of the mouse and keyboard to the virtual machine by clicking in its window or typing CTRL-G. You can return the input focus to the host desktop by typing CTRL-ALT. If the input focus is in the wrong place, the virtual machine won’t hear you type and won’t notice you moving the mouse.Once the focus is in the virtual machine, you may use the up and down arrows to select the booting option and Enter to invoke that booting option. You can also cancel the boot timer by simply pressing the arrow keys. This will give you time, for example, to change settings in the VMware Player menu bar. During booting, the screen may briefly change to a text console, and then it will eventually change to a GUI login interface resembling REF _Ref351130333 \h Figure 5 on Page PAGEREF _Ref351130333 \h 5. If you want to watch the Linux boot messages, type ESC when the input focus is in the virtual machine prior to the GUI login.Figure SEQ Figure \* ARABIC 3If any of these screens is too large to fit into the VMware Player window (or if it is too large to fit on your monitor when you are in full screen mode), you will see scrollbars. You may resize the virtual display to fit your own monitor or window later, after you have logged in (see below under REF _Ref351147329 \h \* MERGEFORMAT Optional Virtual Machine Settings).You can also run your virtual machine in full-screen mode, during which it occupies the entire display. To enter or leave full-screen mode, simply type CTL-ALT-ENTER. In full-screen mode, a retractable a menu bar resembling REF _Ref351131060 \h Figure 4 appears at the top of the screen. This lets you access useful VMware commands at run time. The “thumb tack” at the left of the menu bar locks it in place or allows it to retract upward from view. Figure 4In this menu bar, the Virtual Machine pull-down menu contains various commands that allow you to change the settings of the virtual machines, modify the Shared Folders, connect host devices such as CD-DVD drives and USB devices to the virtual machine, etc. One of the commands allows you to send CTL-ALT-DEL to the guest Also at the right of the menu bar are buttons to minimize, maximize, and close the guest. Figure SEQ Figure \* ARABIC 5Logging inLog in to the dialog box of REF _Ref351130333 \h Figure 5. Your user ID is student, and your password is CS-2011. After you have logged in, you will be presented with a graphic desktop called KDE, the Linux Desktop Environment, shown in REF _Ref351131256 \h Figure 6 REF _Ref351131256 \p \h below. Under normal circumstances, it will resize itself to fit the window of your VMware application or the full screen. If it does not resize itself, see the instructions for under REF _Ref351147329 \h \* MERGEFORMAT Optional Virtual Machine Settings below.KDE is the SUSE Linux equivalent of the Windows or Macintosh desktop, and it is used much the same way. In particular, note the little green “Gecko” icon in the lower left corner. This is functionally equivalent to the Start button in Windows. Click it to get a two-dimensional menu of program items and other commands, as shown in REF _Ref294517093 \h Figure 7.Figure 6Note:After you have logged in, you will find that the input focus follows the mouse and cursor. That is, you can move the mouse out of the virtual machine and click in a normal desktop window and work there. You can then move the mouse back into the virtual machine, click, and work there. Normally, you will also be able to cut, copy, and paste between the virtual (i.e., guest) machine and other applications on the host machine. This is made possible by a software package called open-vm-tools, which is installed in the guest operating system. Open a Command ShellClick on the Start button (i.e., the “Gecko” button) to bring up the REF _Ref294517093 \h Figure 7 menu. Select the Terminal command to bring up a Linux command shell. Test your shell by typing a shell command. REF _Ref294515760 \h Figure 8 shows a small terminal window in which the commands which and ip address have been issued.Figure 7Figure 8You are now ready to work. You may invoke Firefox by clicking he Firefox icon next to the Gecko (start) button at the bottom of the desktop, or you may type the commandfirefox &to a command shell. (The ‘&’ instructs the shell to run the command in the background.)For editing text and C files, use your favorite Linux editor. In this virtual machine, kwrite is particularly recommended. It has a natural graphical user interface, and it can be configured to intelligently indent C code.Optional Virtual Machine SettingsChanging the Display SizeIt is a nuisance to try to work with a virtual display of the guest system that does not fit into a window or on the screen of the host system. Under normal circumstances, the display “should” automatically resize itself. If not, you may want to change the default display size of the guest by invoking the Configure Desktop command from the Start menu of the guest operating system ( REF _Ref294517093 \h Figure 7). This brings up a window resembling REF _Ref294527749 \h Figure 9 REF _Ref294527749 \p \h below.Scroll down until an icon group named “Hardware” is visible, and then select Display and Monitor to tell KDE the size of the display. After you have selected and applied the new display size, click the option that says to make it the default. Finally, select Application Appearance in the top section, which opens a window with a lot of options. Select Fonts from the left panel. This lets you set the font sizes for most of the window characteristics. Note especially the Force Fonts DPI pull-down menu near the bottom, which controls the number of pixels per inch. Setting this will help the font sizes to look like those sizes on the virtual display. Feel free to experiment with other settings in this tool.Figure 9Personalizing your virtual machineTo change your password, click on the “Account Details” icon in the top left corner of REF _Ref294527749 \h Figure 9 REF _Ref294527749 \p \h above. This will bring up a dialog box allowing you to change your password and enter other information about yourself. Alternatively, you can use the passwd shell command.If you want to create another user name for yourself, invoke YaST, the system administration tool, to configure the user and group settings. Click the Start button in the lower left corner, select the third submenu, labeled Computer, and select the YaST command, as shown at the top of REF _Ref294516342 \h Figure 10 REF _Ref294516342 \p \h below. Figure 10YaST will first ask you for the root password. This is CS-2011, the same as the password for the user student. It will then bring up the YaST window, shown in REF _Ref294527680 \h Figure 11 REF _Ref294527680 \p \h below. Figure 11Select Security and Users from the left panel and User and Group Management from the right panel. Follow this GUI to create a new identity for yourself and/or to change passwords. We suggest that you use your WPI e-mail identity. Log out, and then log in with this new identity, and finally use YaST again to delete the student identity. Other Properties of your Virtual MachineIn normal circumstances, it is not expected that you will need to change the attributes or properties of your virtual machine. However, if you do, these can be accessed from the Virtual machine settings submenu of the Virtual Machines menu of REF _Ref351129780 \h Figure 3 or REF _Ref351131060 \h Figure 4. Attributes include:–The number of processors. There is no need for you to run more than one processor in this course. If you are running on a multi-core machine, you should allocate no more than half the number of processors to the guest machine.The size of (simulated) RAM. By experience, the amount of simulated Random Access Memory in the virtual machine should not exceed half of the amount of physical RAM in the host computer. The size of the RAM memory can be changed when the virtual machine is running, but changes do not take effect until it is restarted.The CD/DVD drive or USB device. These devices in the guest system use the physical devices of the host system. When you insert a CD or DVD into the physical drive of the host, or when you plug a flash drive into a USB port of the host, you can control the behavior as to whether the device should be used by the host system or the guest system. It cannot be used by both at the same time.ConclusionThat’s it! Enjoy your virtual machine. You are now ready for your first project. When you are ready to take a break, you may power off your virtual machine by invoking the “leave” tab from the Start menu and selecting the appropriate option. You may also “Suspend” the virtual machine by simply exiting VMware Player. You can then resume it later.Be sure to back up your work on a regular and frequent basis.DocumentationDocumentation for VMware Player can be found here:– Documentation about OpenSUSE Linux can also be found on-line at This includes a getting started guide, a user’s manual, an administrator’s manual, and other information. Do not try to print these. Together, they are well over 1000 pages. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download