Download: Workstation User’s Manual VMware Workstation 7.0 EN-000168-00
Workstation User’s Manual VMware Workstation 7.0 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs. EN-000168-00 You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: email is hidden Copyright © 1998–2009 VMware, Inc. Al...
Author:
Walton Shared: 7/30/19
Downloads: 963 Views: 2139
Content
Workstation User’s Manual
VMware Workstation 7.0 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs. EN-000168-00, You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: email is hidden Copyright © 1998–2009 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com 2 VMware, Inc.,Contents
About This Book 19 1 Introduction and System Requirements 21 Product Benefits 21 Overview of This Manual 22 Host System Requirements 23 PC Hardware 23 Memory 23 Display 24 Disk Drives 24 Local Area Networking 25 Host Operating System 25 Virtual Machine Specifications 29 Processor 29 Chip Set 29 BIOS 30 Memory 30 Graphics 30 IDE Drives 30 SCSI Devices 30 Floppy Drives 31 Serial (COM) Ports 31 Parallel (LPT) Ports 31 USB Ports 31 Keyboard 31 Mouse and Drawing Tablets 31 Ethernet Card 32 Sound 32 Virtual Networking 32 Supported Guest Operating Systems 32 Support for 64‐Bit Guest Operating Systems 37 VMware, Inc. 3, 2 Installing and Upgrading VMware Workstation 41 Installation Prerequisites 41 Sharing a Workstation Host with Other VMware Products 42 Install Workstation on a Windows Host 43 Install Workstation Silently 44 Uninstall Workstation from a Windows Host 46 Install Workstation on a Linux Host 46 Using Command‐Line Installation Options 48 Uninstall Workstation from a Linux Host 49 Preparing for an Upgrade 49 Upgrade Workstation on a Windows Host 50 Upgrading to a Windows Vista and Windows 7 Host 51 Upgrade Workstation on a Linux Host 53 3 Learning Workstation Basics 55 Start Workstation on a Windows Host 55 Start Workstation on a Linux Host 56 Overview of the Workstation Window 56 Home Page and Views 58 Toolbar Buttons 61 View the Sidebar 64 Favorites List in the Sidebar 65 Check for Product Updates 67 Quickly Create a Virtual Machine and Install an Operating System 68 Introduction to Workstation Preferences 69 Introduction to Virtual Machine Settings 71 Hardware Tab 71 Options Tab 72 Closing Virtual Machines and Exiting Workstation 73 Set a Virtual Machine to Run in the Background 74 Keyboard Shortcuts 74 Change the Hot‐Key Combination 76 Gathering Information for VMware Technical Support 77 Register and Create a Support Request 77 Gather Debugging Information for a Virtual Machine 77 Running the Support Script 78 4 VMware, Inc., Contents 4 Creating and Upgrading a Virtual Machine 81 Methods of Creating Virtual Machines 81 Configuration Options for the New Virtual Machine Wizard 82 Easy Install Feature for Some Guest Operating Systems 82 Typical Compared to Custom Configurations 84 Guest Operating System Selection 85 Virtual Machine Location 85 Virtual Hardware Compatibility Levels 86 Number of Processors 86 Memory Allocation 87 Network Connection Type 87 I/O Adapter Types 88 Disk Types 88 Normal and Independent Disk Modes 89 Virtual Disks and Physical Disks 89 Disk Capacity 90 Pocket ACE Disk Size Calculator on Windows Only 90 Use the New Virtual Machine Wizard 91 Installing a Guest Operating System 91 Installation Requirements for the ESX Guest Operating System 92 Respond to Easy Install Prompts 92 Install a Guest Operating System Manually 93 Use a Paravirtualized Kernel in Linux Guests 95 Upgrade a Guest Operating System 96 Change the Version of a Virtual Machine 96 Using an Older‐Version Virtual Machine Without Upgrading 98 Files That Make Up a Virtual Machine 99 5 Installing and Using VMware Tools 103 Components of VMware Tools 103 VMware Tools Service 104 VMware Device Drivers 104 VMware User Process 105 VMware Tools Control Panel 106 Installing VMware Tools 106 Install VMware Tools in a Windows Guest 106 Configure the Video Driver on Older Versions of Windows 107 Automate the Installation of VMware Tools in a Windows Guest 108 VMware, Inc. 5, Install VMware Tools in a Linux Guest 111 Install VMware Tools in a Solaris Guest 113 Install VMware Tools in a FreeBSD Guest 114 Install VMware Tools in a NetWare Guest 115 Start the VMware User Process Manually If You Do Not Use a Session Manager 116 VMware Tools Update Process 117 How Automatic Updates Occur 117 How You Are Notified to Do a Manual Update 118 Use Global Settings to Update VMware Tools Automatically 118 Set VMware Tools Update Options for Each Virtual Machine 119 Update VMware Tools in Older Windows Virtual Machines 119 Uninstall VMware Tools 120 Repair or Change Installed Modules in a Windows Guest 120 Open the VMware Tools Control Panel 121 Use the Windows Control Panel to Display the Taskbar Icon 122 Options Tab Settings 122 Devices Tab Settings 124 Scripts Tab Settings 124 Shrink Tab Settings 125 About Tab 125 Configure VMware Tools in a NetWare Guest 125 Customizations to VMware Tools 127 How VMware Tools Scripts Affect Power States 127 Execute Commands After You Power Off or Reset a Virtual Machine 130 Passing a String from the Host to the Guest at Startup 131 Passing Information Between the Guest and Another Program 133 Use the VMware Tools Service Command‐Line Interface 134 6 Creating a Virtual Machine from a System Image or Another Virtual Machine 135 Conversion Process for Importing from Other Formats 135 VMware Converter Compared to the Conversion Wizard 137 Supported Source Machines 137 Importing from Various Sources 138 Supported Destinations 142 Designating a Destination for a Virtual Machine 142 Conversion Impact on Settings 144 Migration Issues Caused by Hardware Changes 145 6 VMware, Inc., Contents Open a Third‐Party Virtual Machine or System Image 145 Import a Virtual Machine, Virtual Appliance, or System Image 146 Import a Windows XP Mode Virtual Machine 147 7 Getting Started with Virtual Machines 149 Starting a Virtual Machine 150 Start a Virtual Machine from the Workstation User Interface 150 Start a Virtual Machine That Is Running in the Background 151 Start a Virtual Machine by Using VM Streaming 151 Virtual Machine Location 152 Shut Down a Virtual Machine 153 Configure Power Off and Reset Options for a Virtual Machine 154 Download Components 155 Pausing a Virtual Machine 156 Pause Feature Limitations 156 Pause and Unpause a Virtual Machine 157 Encrypting a Virtual Machine 157 Restrictions on Encryption 158 Encrypt a Virtual Machine 158 Remove Encryption from a Virtual Machine 159 Change the Password for an Encrypted Virtual Machine 159 Delete a Virtual Machine 160 Controlling the Virtual Machine Display 160 Using Unity Mode 160 Use Full Screen Mode 164 Use Quick Switch Mode 167 Use Exclusive Mode 167 Use Multiple Monitors for One Virtual Machine 168 Use Multiple Monitors for Multiple Virtual Machines 171 Fitting the Workstation Console to the Virtual Machine Display 171 Working with Nonstandard Resolutions 173 Configuring Video and Sound 174 Setting Screen Color Depth 174 Support for Direct3D Graphics 175 Configuring Sound 177 Install New Software in a Virtual Machine 181 Disable Acceleration If a Program Does Not Run 181 Report Battery Information in the Guest 182 VMware, Inc. 7, Use Host Printers in a Virtual Machine 182 Use Removable Devices in a Virtual Machine 183 Configure the Appliance View for a Virtual Machine 184 Create a Screenshot of a Virtual Machine 185 Create and Play Back a Movie of a Virtual Machine 186 Advanced Options for Application Developers 187 8 Transferring Files and Text Between the Host and Guest 189 Using the Drag‐and‐Drop Feature 189 Enable or Disable the Drag‐and‐Drop Feature 190 Using the Copy and Paste Feature 191 Enable or Disable the Copy and Paste Feature 192 Using Shared Folders 192 Set Up Shared Folders 193 Enabling and Disabling Shared Folders 195 Viewing a Shared Folder 197 Permissions and Folder Mounting for Shared Folders on Linux Guests 198 Using a Mapped Drive 200 Map or Mount a Virtual Disk to a Drive on the Host 201 Disconnect the Host from the Virtual Disk 202 9 Preserving the State of a Virtual Machine 203 Using the Suspend and Resume Features 203 Use Hard Suspend or Soft Suspend 203 Suspend or Resume a Virtual Machine 204 Using Snapshots 205 Scenarios for Using Multiple Snapshots 205 Information Captured by Snapshots 207 Snapshot Conflicts 208 Enable or Disable Background Snapshots 208 Exclude a Virtual Disk from Snapshots 209 Snapshot Manager Overview 210 Take a Snapshot 211 Rename a Snapshot or Recording 212 Restore an Earlier State from a Snapshot 213 Delete a Snapshot or a Recording 214 Take or Revert to a Snapshot at Power Off 215 Using AutoProtect Snapshots 216 Snapshots and Workstation 4 Virtual Machines 217 8 VMware, Inc., Contents 10 Cloning, Moving, and Sharing Virtual Machines 219 The Virtual Machine’s Universal Unique Identifier 219 UUID Options When You Move a Virtual Machine 220 Specify a UUID for a Virtual Machine 220 Cloning a Virtual Machine 221 Types of Clones 222 Creating Clones 223 Moving a Virtual Machine 225 Hosts with Different Hardware 225 Move a Virtual Machine to a New Location or a New Host 227 Moving an Older Virtual Machine 228 Moving Linked Clones 229 Sharing Virtual Machines with Other Users 229 Using VNC for Remote Connections to a Virtual Machine 230 Configure a Virtual Machine as a VNC Server 230 Use a VNC Client to Connect to a Virtual Machine 231 Make Virtual Machines Available for Streaming from a Web Server 232 Sharing Virtual Machines with VMware Player 233 Start and Exit VMware Player 234 Setting Up Virtual Machines for Use with VMware Player 235 11 Using Disks and Disk Drives 237 Virtual Machine Disk Storage 237 Benefits of Using Virtual Disks 238 Physical Disks 240 Virtual Disk Maintenance Tasks 240 Defragment Virtual Disks 241 Compact a Virtual Disk 242 Expand a Virtual Disk 242 Adding Virtual and Physical Disks to a Virtual Machine 243 Add a New Virtual Disk to a Virtual Machine 244 Add an Existing Virtual Disk to a Virtual Machine 245 Remove a Virtual Disk from a Virtual Machine 245 Using Physical Disks in a Virtual Machine 246 Adding DVD/CD‐ROM and Floppy Drives to a Virtual Machine 252 Add DVD or CD Drives to a Virtual Machine 252 Add a Floppy Drive to a Virtual Machine 254 Connect a CD‐ROM, DVD, or Floppy Drive to an Image File 255 VMware, Inc. 9, Using VMware Virtual Disk Manager 256 Using Dual‐Boot Computers with Virtual Machines 256 Legacy Virtual Disks 256 12 Recording and Replaying Virtual Machine Activity 259 Uses of the Record/Replay Feature 259 Physical and Virtual Hardware Requirements 260 Configure Record/Replay for a Virtual Machine 261 Record Control Dialog Box Features 263 Replay Control Dialog Box Features 264 Create a Recording 266 Replay a Recording 267 Browse a Recording 268 Using an Execution Trace File of a Recording 268 Enable Execution Tracing for a Recording 269 Create an Execution Trace File of a Recording 270 Maintenance Tasks for Using Recordings 270 Delete a Recording 270 Disable Periodic Screenshots 271 13 Configuring Teams 273 Benefits of Using Teams 273 Managing Teams 274 Create a Team 274 Open a Team and Add It to the Favorites List 275 Rename a Team 276 Power Off or Close a Team 276 Delete a Team 277 Summary and Console Views for Teams and Their Virtual Machines 278 Managing the Members of a Team 278 Add a Virtual Machine to a Team 278 Remove a Virtual Machine from a Team 279 Specify the Startup Sequence for a Team 280 Power Operations for Teams and Their Members 281 Power On a Team 281 Suspend or Resume a Team 281 Perform Power Operations on One Team Member 282 10 VMware, Inc., Contents Working with Team Networks 282 LAN Segment Requirements Regarding IP Addresses 282 Create a Team LAN Segment 283 Configure LAN Segments 283 Add or Remove Network Adapters 284 Delete a LAN Segment 285 Cloning and Taking Snapshots of Team Virtual Machines 285 14 Configuring a Virtual Network 287 Components of the Virtual Network 287 Virtual Switch 287 DHCP Server 288 Network Adapter 288 Common Networking Configurations 288 Bridged Networking 289 Network Address Translation (NAT) 291 Host‐Only Networking 292 Example of a Custom Networking Configuration 293 Set Up a Custom Networking Configuration 294 Changing a Networking Configuration 297 Find the Network Type of a Virtual Machine 297 Add Virtual Network Adapters 297 Modify Existing Virtual Network Adapters 298 Configuring Bridged Networking 299 Configure VMnet0 Automatic Bridged Networking on a Windows Host 299 Configure vmnet0 Automatic Bridged Networking on a Linux Host 300 Setting Up a Second Automatic Bridged Network Interface 301 Changing the Subnet or DHCP Settings for a Virtual Network 301 Change Subnet or DHCP Settings on a Windows Host 302 Change Subnet or DHCP Settings on a Linux Host 302 Configuring Host Virtual Network Adapters 303 Connect or Disconnect a Host Virtual Network Adapter 303 Setting Up Two Separate Host‐Only Networks 304 VMware, Inc. 11, 15 Advanced Virtual Networking 305 Selecting IP Addresses on a Host‐Only Network or NAT Configuration 306 How the Subnet Number Is Assigned 306 Determining Whether to Use DHCP or Statically Assign Addresses 307 DHCP Conventions for Assigning IP Addresses 307 Configure the DHCP Server on a Windows Host 308 Configure the DHCP Server on a Linux Host 308 Avoiding IP Packet Leakage in a Host‐Only Network 308 Disable Packet Forwarding on Windows Hosts 309 Disable Packet Forwarding on Linux Hosts 310 Maintaining and Changing the MAC Address of a Virtual Machine 310 Avoiding MAC Address Changes 310 Assign the Same MAC Address to Any Virtual Machine Manually 311 Controlling Routing Information for a Host‐Only Network on Linux 312 Potential Issues with Host‐Only Networking on Linux 313 DHCPD on the Linux Host Does Not Work After Installing Workstation 313 DHCP and DDNS 313 Configuring Host‐Only Virtual Machines 314 Set Up Using Configuration 1 or 2 314 Set Up Using Configuration 3 315 Complete Configuring the Virtual Network Adapters 315 Set Up Routing Between Two Host‐Only Networks 316 Using Virtual Network Adapters in Promiscuous Mode on a Linux Host 318 Using NAT 318 How the NAT Device Uses the VMnet8 Virtual Switch 319 DHCP on the NAT Network 319 DNS on the NAT Network 320 External Access from the NAT Network 320 Advanced NAT Configuration 321 Configure NAT on a Windows Host 321 Custom NAT and DHCP Configuration on a Windows Host 321 Specifying Connections from Ports Below 1024 322 Configuring NAT on a Linux Host 323 Considerations for Using NAT 326 Using NAT with NetLogon 326 Sample Linux nat.conf File 329 12 VMware, Inc., Contents Using Samba with Workstation 330 Add Users to the Samba Password File 331 Using a Samba Server for Bridged and Host‐Only Networks 331 Use Samba Without Network Access 332 16 Connecting Devices 333 Using Parallel Ports 333 Add a Virtual Parallel Port to a Virtual Machine 334 Troubleshoot ECR Errors for Parallel Ports 334 Configuring a Parallel Port on a Linux Host 335 Using Serial Ports 337 Add a Virtual Serial Port to a Virtual Machine 337 Change the Input Speed of the Serial Connection 339 Debugging over a Virtual Serial Port 340 Configuring Keyboard Features 341 Use the Enhanced Virtual Keyboard for Windows Hosts 341 Hot Keys for Virtual Machines 342 Specify a Language Keyboard Map for VNC Clients 343 Keyboard Mapping on a Linux Host 344 Using USB Devices in a Virtual Machine 353 Enable the USB 2.0 Controller for a Virtual Machine 354 Add a USB Controller to a Virtual Machine 354 Connecting USB Devices 355 USB Driver Installation on a Windows Host 357 Access and Use a USB Device on a Linux Host 358 How Device Control Is Shared Between Host and Guest 358 Disconnecting USB Devices from a Virtual Machine 359 Use Smart Cards with Virtual Machines 360 Switch to Using the Virtual Smart Card Reader on Linux Hosts 362 Disable Smart Card Sharing 362 Support for Generic SCSI Devices 363 Installing Required Adapters or Drivers for Some Windows Guests 364 Avoiding Concurrent Access on Linux Hosts 365 Add a Generic SCSI Device to a Virtual Machine 365 Troubleshoot Problems Detecting Generic SCSI Devices 366 Use Four‐Way Virtual Symmetric Multiprocessing 368 Use a Virtual Machine That Originally Had More Than Four Virtual Processors 369 VMware, Inc. 13, 17 Special‐Purpose Configuration Options for Windows Hosts 371 Restricting the User Interface 371 Enable the Restricted User Interface 372 Restrict the User Interface and Return to a Snapshot 372 Disable the Restricted User Interface 373 Making a Virtual Machine Always Use Full Screen Switch Mode 374 Specify Global Configuration Settings for Full Screen Switch Mode 374 Virtual Key Codes 375 Hot Key for Cycling Through Virtual Machines and the Host Computer 377 Hot Keys for Switching Directly to Virtual Machines and the Host Computer 377 Other Entries in the Global Configuration File 378 Using vmware‐fullscreen to Run a Virtual Machine 379 Guest ACPI S1 Sleep 382 18 Learning the Basics of VMware ACE 383 Benefits of Using VMware ACE 383 Key Features of VMware ACE 384 VMware ACE Terminology 385 Network and Disk Space Requirements for the Administrative Workstation 386 Overview of Creating and Deploying ACE Packages 387 Overview of the ACE User Interface 388 Troubleshooting Users’ Problems 389 19 Setting and Using Policies and Customizing VMware Player 391 Benefits of Using Policies 392 Set Policies for ACE Instances 392 Setting Access Control Policies 393 Create or Edit an Access Control Policy 394 Activation Settings 394 Authentication Settings 395 Using an Authentication Script 396 Include a Power‐On and Power‐Off Script in the Package 396 Set a Recovery Key for Encrypted ACE Instances 398 Set Activation Limit 398 Active Directory Password Change Proxying 399 14 VMware, Inc., Contents Setting Host to Guest Data Script Policies 399 Specify a Script and a Command to Run It 400 Setting Expiration Policies 401 Setting Copy Protection Policies 402 Setting Resource Signing Policies 403 Setting Network Access Policies 404 Before You Begin Setting Host Policies 404 Use the Network Access Wizard to Configure Network Access 405 Guidelines for Specifying Zone Conditions 406 Using the Ruleset Editor to Configure Host and Guest Access 409 Change NAT Settings 411 Configure Which Physical Network Adapter to Use 412 Understanding the Interaction of Host and Guest Access Filters with Tunneling Protocols 413 Updating a Network Access Policy 413 Setting Removable Devices Policies 413 Setting USB Device Policies 414 Access Levels for USB Devices 414 Set an Access Policy for USB Devices 414 Setting Virtual Printer Policies 416 Setting Runtime Preferences Policies 417 Runtime Preferences Settings 417 Enhanced Virtual Keyboard Settings 418 Exit Behavior Settings 418 Pocket ACE Cache Settings 419 Setting Snapshot Policies 420 Setting Administrator Mode Policies 421 Use Administrator Mode on an ACE Instance 421 Setting Kiosk Mode Policies 422 Change the Key Combination for Exiting Kiosk Mode 422 Setting Hot‐Fix Policies for Standalone ACE Instances 423 Setting the Policy Update Frequency for Managed ACE Instances 423 Control Which ACE Instances Run on a Host 424 Writing Plug‐In Policy Scripts 426 Examples of Policy Scripts 427 Customizing the VMware Player Interface on Windows Hosts Only 430 Create and Specify a Skin File 430 Customizing the VMware Player Icons 431 Customizing the Title Bar Text 432 VMware, Inc. 15, Customizing the Removable Device Display 432 Shortcut Key Values 434 Sample Skin File 435 20 Deploying ACE Packages 437 Edit Deployment Settings 437 Encryption Settings 438 Package Lifetime Settings 438 Instance Customization on Windows Guests Only 439 Custom EULA Settings 447 Deployment Platform Settings 448 ACE Resources Directory 448 Review the Configuration of an ACE‐Enabled Virtual Machine 449 Use Preview Mode to Test Policy and Deployment Settings 450 Creating a Package 451 Overview of Package Creation and Validation 452 Turn Off the VMware Tools Check for Test Deployments 453 Prerequisites for Using the Packaging Wizards 454 Use the New Package Wizard 455 View Package Properties and Add Notes 456 Perform an End‐to‐End Deployment Test 457 Deploy Packages 458 21 Pocket ACE 459 Use Cases for Pocket ACE 460 Portable Device Requirements 461 Policies and Deployment Settings for Pocket ACE 462 Create a Pocket ACE Package 462 Deploying the ACE Package on a Portable Device 463 Use the Graphical Utility to Deploy Pocket ACE Packages 463 Use the Command‐Line Utility to Deploy Pocket ACE Packages 464 Run the Pocket ACE Instance 465 22 Installing ACE Packages 467 Installing an ACE Package on a Windows Host 467 Install an ACE Instance on a Single Windows Host 468 Installing an ACE Package Silently on Multiple Windows Hosts 468 Uninstall VMware Player or an ACE instance from a Windows Host 470 16 VMware, Inc., Contents Installing an ACE Package on a Linux Host 471 Manually Install VMware Player on a Linux Host 471 Install the ACE Instance on a Single Linux Host 472 Install an ACE Package Silently on Multiple Linux Hosts 473 Prepare a Linux Host for Running in Kiosk Mode 474 Uninstall VMware Player or an ACE Instance from a Linux Host 475 Upgrading ACE Instances to ACE 2.6 475 Start and Use an ACE Instance 476 Change Default Kiosk Mode Startup Behavior 477 Use Multiple Virtual Machines in Kiosk Mode 478 Install an ACE Client License 480 Change the ACE Client License 480 Quit VMware Player 481 Troubleshooting Tools 481 Using the vmware‐acetool Command‐Line Tool 481 Respond to Hot Fix Requests 483 Troubleshooting Setup Issues 484 Appendix: Workstation Command‐Line Reference 487 Startup Options for Workstation and Virtual Machines 487 Using Startup Options in a Windows Shortcut 489 Glossary 491 Index 497 VMware, Inc. 17, 18 VMware, Inc.,About This Book
This manual, the Workstation User’s Manual, provides information about installing and using VMware® Workstation 7.0. With Workstation, you can convert an existing physical PC into a VMware virtual machine or create a new virtual machine. Each virtual machine represents a complete PC, including the processor, memory, network connections and peripheral ports. Use Workstation to do the following: Host legacy applications and overcome platform migration issues. Configure and test new software or patches in an isolated environment. Automate tasks for software development and testing. Demonstrate multi‐tier configurations on a single PC.Intended Audience
This book is intended for anyone who needs to install, upgrade, or use VMware Workstation. Workstation users typically include people who do software development and testing or work with multiple operating systems or computing environments: software developers, QA engineers, trainers, salespeople who run demos, and anyone who wants to create virtual machines.Document Feedback
VMware welcomes your suggestions for improving our documentation. If you have comments, send your feedback to email is hidden. VMware, Inc. 19,Technical Support and Education Resources
The following sections describe the technical support resources available to you. To access the current version of this book and other books, go to http://www.vmware.com/support/pubs.Online and Telephone Support
To use online support to submit technical support requests, view your product and contract information, and register your products, go to http://www.vmware.com/support. Customers with appropriate support contracts should use telephone support for the fastest response on priority 1 issues. Go to http://www.vmware.com/support/phone_support.html.Support Offerings
To find out how VMware support offerings can help meet your business needs, go to http://www.vmware.com/support/services.VMware Professional Services
VMware Education Services courses offer extensive hands‐on labs, case study examples, and course materials designed to be used as on‐the‐job reference tools. Courses are available onsite, in the classroom, and live online. For onsite pilot programs and implementation best practices, VMware Consulting Services provides offerings to help you assess, plan, build, and manage your virtual environment. To access information about education classes, certification programs, and consulting services, go to http://www.vmware.com/services. 20 VMware, Inc.,Introduction and System Requirements 1
VMware Workstation is a desktop software that allows you to run multiple x86‐compatible desktop and server operating systems simultaneously on a single PC, in fully networked, portable virtual machines—with no rebooting or hard drive partitioning required. This chapter includes the following topics: “Product Benefits” on page 21 “Overview of This Manual” on page 22 “Host System Requirements” on page 23 “Virtual Machine Specifications” on page 29 “Supported Guest Operating Systems” on page 32Product Benefits
Workstation is used in the software development, quality assurance, training, sales, and IT fields. Workstation streamlines software development and testing: Develop and test multiple operating systems and applications on a single PC. Connect virtual machines to simulate and test multitier configurations. Use multiple snapshots and debugging support to facilitate testing. Archive test environments on file servers where they can be easily restored or shared. VMware, Inc. 21, Workstation enhances productivity of IT professionals: Configure and test desktops and servers as virtual machines before deploying them to production. Test new multitier applications, application updates, and operating system patches on a single PC. Host legacy applications within virtual machines, facilitating operating system migrations and eliminating the need to port legacy applications. Create a virtual library of end‐user configurations on a shared drive. Workstation facilitates computer‐based training and software demos: Package and deploy classroom material in virtual machines. Allow students to experiment with multiple operating systems, applications, and tools in secure, isolated virtual machines. Configure virtual machines to undo all changes at shutdown. Demo complex or multitier configurations on a single laptop.Overview of This Manual
If you are a veteran Workstation user, see the Workstation Release Notes for a list of new features. For upgrade instructions, see “Preparing for an Upgrade” on page 49. If you are new to Workstation, the first chapters of this manual—through Chapter 7, “Getting Started with Virtual Machines,” on page 149—guide you through the key steps for installing the software and provide an introduction to using Workstation. Later chapters provide in‐depth information about the sophisticated features of Workstation. These chapters are intended for expert users. Chapter 18, “Learning the Basics of VMware ACE,” on page 383 through Chapter 22, “Installing ACE Packages,” on page 467 describe how to use the ACE features included with the version of Workstation that runs on Windows hosts. VMware ACE authoring features enable you to package and deploy Pocket ACE and desktop virtual machines with encryption, restricted network access, and device control. 22 VMware, Inc., Chapter 1 Introduction and System RequirementsHost System Requirements
Like physical computers, the virtual machines running under Workstation perform better if they have faster processors and more memory. The terms host and guest describe physical and virtual machines: Host — The physical computer on which you install the Workstation software is called the host computer, and its operating system is the host operating system. Guest — The operating system running inside a virtual machine is called a guest operating system. For definitions of these and other special terms, see “Glossary” on page 491.PC Hardware
Standard x86‐compatible or x86‐64‐compatible personal computer 1.3GHz or faster CPU minimum Multiprocessor systems are supported. Support for 64‐bit guest operating systems is available with Intel VT or AMD‐V CPUs. For hardware requirements to support Windows 7 Aero graphics, see “Recommendations for Windows 7 Aero Graphics Support” on page 24.Memory
You need enough memory to run the host operating system, plus the memory required for each guest operating system and for applications on the host and guest. The minimum memory requirement is 1GB, VMware recommends to have 2GB and above. For more information on memory requirements, see your guest operating system and application documentation. As of version 7.0 of Workstation, the total amount of memory you can assign to all virtual machines running on a single host is limited only by the amount of RAM on the host. The maximum amount of memory for each virtual machine is 32GB. For memory requirements to support Windows 7 Aero graphics, see “Recommendations for Windows 7 Aero Graphics Support” on page 24. VMware, Inc. 23,Display
16‐bit or 32‐bit display adapter is recommended. For display requirements to support Windows 7 Aero graphics, see “Recommendations for Windows 7 Aero Graphics Support” on page 24. NOTE Use the latest graphics driver recommended for your host. Recommendations for Windows 7 Aero Graphics Support To support Windows 7 Aero graphics, VMware recommends the following configuration: CPU Intel Dual Core, 2.2GHz and above AMD Athlon 4200+ and above Host GCPU nVidia GeForce 8800GT and above ATI Radeon HD 2600 and above Memory—at least 3GB of host system memory, 1GB of memory allocated to the guest operating system, and 256MB graphics memory.Disk Drives
Guest operating systems can reside on physical disk partitions or in virtual disk files. Hard Disks IDE and SCSI hard drives are supported. VMware recommends at least 1GB free disk space for each guest operating system and the application software used with it. If you use a default setup, the actual disk space needs are approximately the same as those for installing and running the guest operating system and applications on a physical computer. 200MB (Linux) or 1.5GB (Windows) free disk space is required for basic installation. Delete the installer afterwards to reclaim disk space. 24 VMware, Inc., Chapter 1 Introduction and System Requirements Optical CD-ROM/DVD-ROM Drives IDE and SCSI optical drives are supported. CD‐ROM and DVD‐ROM drives are supported. ISO disk image files are supported. Floppy Drives Virtual machines can connect to the host’s disk drives. Floppy disk image files are also supported.Local Area Networking
You can use any Ethernet controller that the host operating system supports. Non‐Ethernet networks are supported by using built‐in network address translation (NAT) or using a combination of host‐only networking plus routing software on the host operating system.Host Operating System
VMware Workstation is available for Windows and Linux host operating systems. VMware ACE features are included only in the version of Workstation that runs on Windows hosts. A Web browser is required for the Workstation Help system. VMware, Inc. 25,Windows Host Operating Systems Workstation supports the following Windows 32‐bit and 64‐bit host operating systems. Table 1-1. Supported Windows Host Operating Systems
Operating System Type Operating System Edition 32‐bit Windows 7 Ultimate Edition Windows 7 Enterprise Edition Windows 7 Business Windows 7 Home Basic and Premium Windows Vista Enterprise Edition, SP1, SP2 Windows Vista Business Edition, SP1, SP2 Windows Vista Home Basic and Premium Editions, SP1, SP2 Windows Vista Ultimate Edition, SP1, SP2 Listed versions are also supported with no service pack. Windows Server 2008 Enterprise, SP1, R2 Windows Server 2008 Standard, SP1, R2 Windows Server 2003 Standard Edition with SP1, R2, SP2 Windows Server 2003 Small Business Edition with SP1, R2, SP2 Windows Server 2003 Enterprise Edition with SP1, R2,SP2 Windows XP Home Edition with SP2 or later service pack Windows XP Professional with SP2 or later service pack 64‐bit Windows 7 Ultimate Edition Windows 7 Enterprise Edition Windows 7 Professional Windows 7 Home Basic and Premium Windows Vista Enterprise Edition, SP1, SP2 Windows Vista Business Edition, SP1, SP2 Windows Vista Home Basic and Premium Editions, SP1, SP2 Windows Vista Ultimate Edition, SP1, SP2 Listed versions are also supported with no service pack. Windows Server 2008 Enterprise, SP1, R2 Windows Server 2008 Standard, SP1, R2 Windows Server 2003 Standard Edition with SP1, R2, SP2 Windows Server 2003 Small Business Edition with SP1, R2, SP2 Windows Server 2003 Enterprise Edition with SP1, R2,SP2Windows Windows XP Professional x64 Edition with SP1 or later service pack 26 VMware, Inc., Chapter 1 Introduction and System Requirements Linux Host Operating Systems Workstation supports the following Linux 32‐bit and 64‐bit distributions and kernels for the host operating systems. Workstation might not run on systems that do not meet these requirements. As newer Linux kernels and distributions are released, VMware modifies and tests its products for stability and reliability on those host platforms. VMware makes every effort to add support for new kernels and distributions in a timely manner, but until a kernel or distribution is added to the following list, its use with VMware products is not supported. Look for newer prebuilt modules in the Downloads area of the VMware Web site. In Workstation 7.0, only Linux kernels version 2.6.9 and later are supported. Table 1-2. Supported Linux Host Operating Systems Operating System Type Operating System Edition 32‐bit Asianux Server 3 CentOS 5.2 CentOS 5.1 CentOS 5.0 Mandriva 2009 Mandriva 2008, 2008‐1 Oracle Enterprise Linux 5.2 Oracle Enterprise Linux 5.1 Oracle Enterprise Linux 5.0 Red Hat Enterprise Linux 5.3 WS, AS, ES Red Hat Enterprise Linux 5.2 WS, AS, ES Red Hat Enterprise Linux 5.1 WS, AS, ES Red Hat Enterprise Linux 5.0 WS, AS, ES Red Hat Enterprise Linux 4.8 WS, AS, ES Red Hat Enterprise Linux 4.7 WS, AS, ES Red Hat Enterprise Linux 4.6 WS, AS, ES Red Hat Enterprise Linux WS 4.5 (formerly 4.0 Update 5) WS, AS,ES
SUSE Linux Enterprise Server 11 SUSE Linux Enterprise Server 10 SP1, SP2 SUSE Linux Enterprise Desktop 11 SUSE Linux Enterprise Desktop 10, SP1, SP2 Listed versions are also supported with no service pack. VMware, Inc. 27,Table 1-2. Supported Linux Host Operating Systems (Continued)
Operating System Type Operating System Edition 32‐bit openSUSE 11.2 openSUSE 11.1 openSUSE 11 openSUSE 10.3 openSUSE 10.2 (formerly known as SUSE Linux 10.2) Ubuntu Linux 9.04 Ubuntu Linux 8.10 Ubuntu Linux 8.04, 8.04.1, 8.04.2, 8.04.3 Ubuntu Linux 6.06 64‐bit Asianux Server 3 CentOS 5.2 CentOS 5.1 CentOS 5.0 Mandriva 2009 Mandriva 2008, 2008‐1 Note: On 64‐bit Mandriva hosts, some 32‐bit compatibility libraries are required. Specifically, 32‐bit glibc, X11, and libXtst.so are required. Oracle Enterprise Linux 5.2 Oracle Enterprise Linux 5.1 Oracle Enterprise Linux 5.0 Red Hat Enterprise Linux 5.3 WS, AS, ES Red Hat Enterprise Linux 5.2 WS, AS, ES Red Hat Enterprise Linux 5.1 WS, AS, ES Red Hat Enterprise Linux 5.0 WS, AS, ES Red Hat Enterprise Linux 4.8 WS, AS, ES Red Hat Enterprise Linux 4.7 WS, AS, ES Red Hat Enterprise Linux 4.6 WS, AS, ES Red Hat Enterprise Linux WS 4.5 (formerly 4.0 Update 5) WS, AS,ES
SUSE Linux Enterprise Server 11 SUSE Linux Enterprise Server 10 SP1, SP2 SUSE Linux Enterprise Desktop 11 SUSE Linux Enterprise Desktop 10, SP1, SP2 Listed versions are also supported with no service pack. 28 VMware, Inc., Chapter 1 Introduction and System Requirements Table 1-2. Supported Linux Host Operating Systems (Continued) Operating System Type Operating System Edition 64‐bit openSUSE 11.2 openSUSE 11.1 openSUSE 11 openSUSE 10.3 openSUSE 10.2 (formerly known as SUSE Linux 10.2) Ubuntu Linux 9.04 Ubuntu Linux 8.10 Ubuntu Linux 8.04, 8.04.1, 8.04.2, 8.04.3 Ubuntu Linux 6.06 Note: On 64‐bit Ubuntu 6.x hosts, some 32‐bit compatibility libraries are required. Specifically, 32‐bit glibc and X11 are required.Virtual Machine Specifications
The following sections describe the devices that Workstation virtual machines support.Processor
Same processor as that on host computer. One virtual processor on a host with one or more logical processors. Up to four virtual processors (four‐way virtual symmetric multiprocessing, or Virtual SMP) on a host with at least two logical processors. The following are considered to have two logical processors: A multiprocessor host with two or more physical CPUs. A single‐processor host with a multicore CPU. A single‐processor host with hyperthreading enabled. See “Use Four‐Way Virtual Symmetric Multiprocessing” on page 368.Chip Set
Intel 440BX‐based motherboard NS338 SIO 82093AA IOAPIC VMware, Inc. 29,BIOS
Phoenix BIOS 4.0 Release 6 with VESA BIOSMemory
You can allocate up to 32GB of memory for a virtual machine, depending on host memory. No maximum limit for the total available for all virtual machines.Graphics
VGA and SVGA are supported.IDE Drives
Up to four devices—disks, CD‐ROM or DVD‐ROM (DVD drives can be used to read data DVD‐ROM discs; DVD video is not supported). Hard disks can be virtual disks or physical disks. IDE virtual disks up to 950GB. CD‐ROM can be a physical device or an ISO image file.SCSI Devices
Up to 60 devices. SCSI virtual disks up to 950GB. Hard disks can be virtual disks or physical disks. Generic SCSI support allows devices to be used without need for drivers in the host operating system. Works with scanners, CD‐ROM, DVD‐ROM, tape drives and other SCSI devices. LSI Logic LSI53C10xx Ultra320 SCSI I/O controller. Mylex (BusLogic) BT‐958 compatible host bus adapter (requires add‐on driver from VMware for Windows XP and Windows Server 2003). 30 VMware, Inc., Chapter 1 Introduction and System RequirementsFloppy Drives
Up to two 1.44MB floppy devices. Physical drives or floppy image files.Serial (COM) Ports
Up to four serial (COM) ports. Output to serial ports, Windows or Linux files, or named pipes.Parallel (LPT) Ports
Up to three bidirectional parallel (LPT) ports. Output to parallel ports or host operating system files.USB Ports
USB 1.1 UHCI controller. USB 2.0 EHCI controller. (Use the virtual machine settings editor to enable USB 2.0 support. See “Enable the USB 2.0 Controller for a Virtual Machine” on page 354.) Supports most devices, including USB printers, scanners, PDAs, hard disk drives, memory card readers, and digital cameras, as well as streaming devices such as webcams, speakers, and microphones.Keyboard
104‐key Windows 95/98 enhanced.Mouse and Drawing Tablets
PS/2 and USB mouse. Serial tablets supported. USB tablets supported. VMware, Inc. 31,Ethernet Card
Up to 10 virtual Ethernet cards. AMD PCnet‐PCI II compatible. For 64‐bit guests: Intel Pro/1000 MT Server Adapter compatible.Sound
Sound output and input. Emulates Creative Labs Sound Blaster AudioPCI. (Does not support MIDI input or game port controller/joysticks.)Virtual Networking
Support for 10 virtual Ethernet switches on Microsoft Windows host operating systems. Support for 255 virtual Ethernet switches on Linux hosts. Three switches are configured by default for bridged, host‐only, and NAT networking. Support for most Ethernet‐based protocols, including TCP/IP, NetBEUI, Microsoft Networking, Samba, Novell NetWare, and Network File System. Built‐in NAT supports client software using TCP/IP, FTP, DNS, HTTP, and Telnet, including VPN support for PPTP over NAT.Supported Guest Operating Systems
Table 1‐3 provides a simplified list of guest operating systems supported for virtual machines running in Workstation. For the most recent list, including details about specific operating system versions, service packs, and updates supported, see the online VMware Compatibility Guide. Go to the VMware Web site and select Resources > Compatibility Guides, and click the View the Guest/Host OS tab on the VMware Compatibility Guide Web site link. The guide also provides notes on installing the most common guest operating systems. 32 VMware, Inc., Chapter 1 Introduction and System RequirementsTable 1-3. Guest Operating Systems
Operating System Type Operating System Edition Windows 32‐bit Windows 7 Ultimate Edition Windows 7 Enterprise Edition Windows 7 Business Windows 7 Home Basic and Premium Windows Vista Home Basic and Premium Windows Vista Business Windows Vista Enterprise Windows Vista Ultimate Windows Server 2008 Standard Edition without Hyper‐V Windows Server 2008 Datacenter Edition without Hyper‐V Windows Server 2008 Enterprise Edition without Hyper‐V Windows Server 2003 Standard Edition Windows Server 2003 Small Business Edition Windows Server 2003 Web Edition Windows Server 2003 Enterprise Windows XP Professional Windows XP Home Edition Windows PE Windows RE Windows 2000 Professional Windows 2000 Server Windows 2000 Advanced Server Windows NT 4.0 Workstation with SP6 Windows NT 4.0 Server with SP6 Windows NT 4.0 Terminal Server Edition with SP6 Windows Me Windows 98 Windows 95 Windows 3.1 (with Windows for Workgroups) Microsoft MS‐DOS MS‐DOS VMware, Inc. 33,Table 1-3. Guest Operating Systems (Continued)
Operating System Type Operating System Edition Windows 64‐bit Windows 7 Ultimate Edition Windows 7 Enterprise Edition Windows 7 Business Windows 7 Home Basic and Premium Windows Vista Home Basic and Premium Windows Vista Business Windows Vista Enterprise Windows Vista Ultimate Windows Server 2008 x64 Standard Edition without Hyper‐V Windows Server 2008 Datacenter x64 Edition without Hyper‐V Windows Server 2008 Enterprise x64 Edition without Hyper‐V Windows Server 2003 Standard Edition Windows Server 2003 Small Business Edition Windows Server 2003 Web Edition Windows Server 2003 Enterprise Windows Server x64 Windows XP Professional Windows PE Windows RE 34 VMware, Inc., Chapter 1 Introduction and System RequirementsTable 1-3. Guest Operating Systems (Continued)
Operating System Type Operating System Edition Linux 32‐bit Asianux Server CentOS Mandrake Linux Mandriva Linux Mandriva Corporate Desktop Mandriva Corporate Server Novell Linux Desktop Oracle Enterprise Linux Red Hat Linux Red Hat Enterprise Linux Server Red Hat Enterprise Linux Advanced Server (AS) Red Hat Enterprise Linux Enterprise Server (ES) Red Hat Enterprise Linux Workstation Red Hat Enterprise Linux Desktop with or without the Workstation Option Red Hat Enterprise Linux Advanced Platform SUSE Linux openSUSE Linux SUSE Linux Enterprise Server SUSE Linux Enterprise Desktop Turbolinux Server Turbolinux Enterprise Server Turbolinux Workstation Turbolinux Desktop Ubuntu Linux VMware, Inc. 35,Table 1-3. Guest Operating Systems (Continued)
Operating System Type Operating System Edition Linux 64‐bit Asianux Server CentOS Mandriva Linux Mandriva Corporate Desktop Mandriva Corporate Server Oracle Enterprise Linux Red Hat Enterprise Linux Server Red Hat Enterprise Linux Advanced Server (AS) Red Hat Enterprise Linux Enterprise Server (ES) Red Hat Enterprise Linux Workstation Red Hat Enterprise Linux Desktop with or without the Workstation Option Red Hat Enterprise Linux Advanced Platform SUSE Linux openSUSE Linux SUSE Linux Enterprise Server SUSE Linux Enterprise Desktop Turbolinux Server Ubuntu Linux Novell NetWare 32‐Bit NetWare Novell Open Enterprise Open Enterprise Server 32‐bit Server 32‐bit FreeBSD 32‐bit FreeBSD 32‐bit Note: If you use SCSI virtual disks larger than 2GB with FreeBSD 4.0–4.3, the guest operating system does not boot. To work around this issue, see the VMware Guest Operating System Installation Guide. FreeBSD 64‐bit FreeBSD 64‐bit Sun 32‐bit Solaris x86 32‐bit Sun Java Desktop System (JDS) Sun 64‐bit Solaris x86 64‐bit 36 VMware, Inc., Chapter 1 Introduction and System RequirementsSupport for 64-Bit Guest Operating Systems
Workstation supports virtual machines with 64‐bit guest operating systems only on host machines that have one of the supported 64‐bit processors. When you power on a virtual machine with a 64‐bit guest operating system, Workstation performs an internal check. If the host CPU is not a supported 64‐bit processor, you cannot power on the virtual machine. Workstation supports virtual machines with 64‐bit guest operating systems, running on host machines with the following processors: Revision D or later of AMD Athlon 64, Opteron, Turion 64, and Sempron Intel Pentium 4 and Core 2, and Core i7 processors with EM64T and Intel Virtualization Technology Workstation supports virtual machines with 64‐bit guest operating systems only on host machines that have one of the supported 64‐bit processors. When you power on a virtual machine with a 64‐bit guest operating system, Workstation performs an internal check. If the host CPU is not a supported 64‐bit processor, you cannot power on the virtual machine. VMware also provides a standalone utility that you can use without Workstation to perform the same check and determine whether your CPU is supported for Workstation virtual machines with 64‐bit guest operating systems. Download the 64‐bit processor check utility from the downloads area of the VMware Web site. Workstation supports virtual machines with 64‐bit guest operating systems only in versions 6.0 and later. If your version of Workstation is 5.0 or earlier, upgrade to version 6.0 or later for 64‐bit guest operating system support. A virtual machine created in Workstation version 6.0 with a 64‐bit operating system cannot be powered on or resumed in Workstation versions 5.0 and earlier. VMware, Inc. 37, 38 VMware, Inc., Chapter 1 Introduction and System Requirements VMware, Inc. 39, 40 VMware, Inc.,Installing and Upgrading VMware Workstation 2
This chapter discusses how to install Workstation on your Linux or Windows host. This chapter contains the following topics: “Installation Prerequisites” on page 41 “Sharing a Workstation Host with Other VMware Products” on page 42 “Install Workstation on a Windows Host” on page 43 “Install Workstation on a Linux Host” on page 46 “Preparing for an Upgrade” on page 49 “Upgrade Workstation on a Windows Host” on page 50 “Upgrade Workstation on a Linux Host” on page 53Installation Prerequisites
Installing VMware Workstation is usually a simple process of running a standard installation wizard. Before you run the installation program, be sure you have the following: A compatible host – Verify that the computer and host operating system meet the system requirements for running Workstation. See “Host System Requirements” on page 23. Workstation installation software – If you have the packaged distribution of Workstation, the installation software is on the installation media in your package. If you have the electronic distribution, the installation software is in the file you downloaded. Workstation is available for Windows and Linux host computers. The installation files for both host platforms are included in the packaged distribution. VMware, Inc. 41, Workstation or VMware ACE serial number – Your serial number is on the registration card in your package. If you purchased Workstation or VMware ACE online, the serial number is sent by email. Your serial number allows you to use Workstation only on the host operating system for which you licensed the software. For example, if you have a serial number for a Windows host, you cannot run the software on a Linux host. You need one license for each user. To use Workstation on a different host operating system, purchase a license on the VMware Web site. You can also obtain an evaluation license at no charge for a 30‐day evaluation of the software. For more information, go to the VMware Web site. If you do not enter the Workstation serial number at installation time (an option available on a Windows host), you are prompted to enter it the first time you attempt to power on a virtual machine. A guest operating system – After Workstation is installed, you need the operating system installation CDs, DVDs, or ISO image files to set up a guest in a virtual machine. (Optional) Eclipse or Microsoft Visual Studio – To install the Integrated Virtual Debugger for Eclipse or Visual Studio plug‐ins included with Workstation, Eclipse or Visual Studio must be installed on the host before you run the Workstation installer. If you install one or both of these programs after you install Workstation, run the Workstation installer again and select the Modify option to install the plug‐ins at that time. For more information about supported versions of Visual Studio and Eclipse, see the following guides on the VMware Web site: Integrated Virtual Debugger for Eclipse Developer’s Guide Integrated Virtual Debugger for Visual Studio Developer’s GuideSharing a Workstation Host with Other VMware Products
You cannot have VMware Workstation installed on the same host machine with another VMware product, such as VMware Player, VMware Server, or the VMware Virtual Machine Console. The only VMware products that can share a host machine with Workstation are the VMware VirtualCenter client software and VMware Converter. If you plan to install VMware Workstation on a host machine that already contains another VMware product, you must uninstall that product first. 42 VMware, Inc., Chapter 2 Installing and Upgrading VMware Workstation After you complete the prerequisites and determine which computer you want to use for hosting Workstation, see the appropriate platform‐specific installation topic.Install Workstation on a Windows Host
Before you begin, make sure you have the items listed in “Installation Prerequisites” on page 41. Although you can enter the serial number after installation, VMware recommends entering it at installation time. This topic describes how to use an installation wizard to install Workstation. To instead use the command‐line interface to perform a silent installation on many computers, see “Install Workstation Silently” on page 44. To install Workstation on a Windows host 1 Log in to your Microsoft Windows host as the Administrator user or as a user who is a member of the Windows Administrators group. Log in as local administrator (that is, do not log in to the domain, unless your domain account is also a local administrator). Although an administrator must install Workstation, a user without administrative privileges can run the program after it is installed. 2 From the Start menu, choose Run and specify the path to either the CD/DVD drive or the downloaded installer file: If you are installing from the installation media, enter D:\setup.exe, where D: is the drive letter for your CD/DVD drive. If you are installing from a downloaded file, browse to the directory where you saved the downloaded installer file, and run the installer. The filename is similar to VMware-workstation-Install Workstation Silently
If you are installing Workstation on several Windows host computers and do not want to respond to wizard prompts, you can use the silent installation feature of the Microsoft Windows Installer (MSI). This feature is convenient, for example, in a large enterprise. Before you begin, ensure that the host computer has version 2.0 or higher of the MSI runtime engine. This version of the installer is available in versions of Windows beginning with Windows XP and is available separately from Microsoft. For additional details on using the Microsoft Windows Installer, see the Microsoft Web site. 44 VMware, Inc., Chapter 2 Installing and Upgrading VMware Workstation To install Workstation silently 1 Open a command prompt and enter the following command to silently extract the administrative installation image from the VMware Workstation installer: setup.exe /s /eUninstall Workstation from a Windows Host
Use the Windows Control Panel to uninstall Workstation. Workstation licenses, preference settings, and virtual machines are not removed, but virtual network settings are removed. To uninstall Workstation from a Windows host Do one of the following: On Windows Vista and Windows 7 hosts, go to Start > Control Panel > Programs > Programs and Features > Uninstall a program and uninstall VMware Workstation. On other Windows hosts, use the Add/Remove Programs item in the control panel and remove VMware Workstation.Install Workstation on a Linux Host
Before you begin, read the following notes and make adjustments to your host system: Make sure you have the items listed in “Installation Prerequisites” on page 41. The real‐time clock function must be compiled into your Linux kernel. 46 VMware, Inc., Chapter 2 Installing and Upgrading VMware Workstation Workstation for Linux requires that the parallel port PC‐style hardware option (CONFIG_PARPORT_PC) be built and loaded as a kernel module (that is, it must be set to m when the kernel is compiled). To use the Workstation Help system, you must have a Web browser installed on the host computer. The installation topic describes an installation from the installation media included in the Workstation media kit. If you downloaded the software, the steps are the same except that you start from the directory where you saved the downloaded installer file, not from the Linux directory on the installation media. The bundle installer lets you install the product in one step. If the GUI‐based installer fails, run the installer file with the -console option in your terminal. NOTE On Red Hat Enterprise Linux 5.1 hosts and possibly some other Linux distributions, the bundle‐based installer launches a command‐line wizard rather than a GUI wizard. VMware-Workstation-Using Command-Line Installation Options
You can also use command‐line installation options to install Workstation on a Linux host. To use the options, you must be logged in as root. After finishing the installation process, exit from the root account. The common command‐line installation options are the following: -gtk – Opens the GUI‐based VMware installer, which is the default option. -console – Allows you to use the terminal for installation. -custom – Shows all the installation questions. You can customize the installation directories, set or reset the Eclipse directories and hard limit for the number of open file descriptors. -regular – Shows installation questions that have not been answered before or are required. This is the default option. -required – Shows only the EULA, then proceeds to install Workstation. -ignore-errors or -I – Allows the installation to continue even if there is an error in one of the installer scripts. However, the section that has an error does not complete, so the component may not be properly configured. 48 VMware, Inc., Chapter 2 Installing and Upgrading VMware WorkstationUninstall Workstation from a Linux Host
When you uninstall Workstation 7.0, product licenses, preference settings, and virtual machines are not removed. A confirmation dialog box appears to check whether to remove or preserve your configurations. To uninstall Workstation from a Linux host If you used the bundle installer, enter the following command: vmware-installer -u vmware-workstation Select either Yes or No to confirm whether you want to preserve or remove your configuration files. If you used the RPM installer to install Workstation 4, 5.x, and 6.x, enter the following commands: rpm -qa | grep VM The VMware Workstation product installer name appears. rpm -ePreparing for an Upgrade
When you install a new version of Workstation, the previous version is uninstalled but the preferences you set, license files, and virtual machines are not removed. Virtual machines created with an earlier version of Workstation are not deleted, however VMware recommends that you make backup copies in preparation for the upgrade. VMware recommends that you complete the following tasks before upgrading: Make sure all virtual machines are Workstation 4, 5.x, or 6.x virtual machines. Direct upgrades from a Workstation 2 or 3 virtual machine are not supported in Workstation 6.x and 7.0. If a virtual machine was created with a version of Workstation earlier than Workstation 5.5 and it has a snapshot, delete the snapshot before upgrading. See “Delete a Snapshot or a Recording” on page 214. For upgrades from Workstation 4, 5.x, or 6.x, if you bridged (mapped) virtual networks to specific physical or virtual adapters, write down the settings you used. Although Workstation 7.0 generally preserves network settings during the upgrade, it cannot preserve bridge settings created with Workstation 4, 5.x, or 6.x. VMware, Inc. 49, If any virtual machines are suspended, resume them, shut down the guest operating systems, and power them off. If any virtual machines are running in the background, start them in Workstation and power them off. See “Start a Virtual Machine That Is Running in the Background” on page 151. Back up the virtual machines by making backup copies of all the files in the virtual machine directories. This includes .vmdk or .dsk files, .vmx or .cfg files, and .nvram files. Depending on your upgrade path, you might not be able to run your virtual machines under both Workstation 7.0 and your previous version of Workstation. Power off all running virtual machines. You can now use one of the following platform‐specific tasks to install Workstation: “Upgrade Workstation on a Windows Host” on page 50 “Upgrade Workstation on a Linux Host” on page 53Upgrade Workstation on a Windows Host
You can upgrade from Workstation version 4, 5.x, or 6.x to Workstation 7.0 by running the VMware Workstation 7.0 installation program. Before you begin, make sure that you have a Workstation 7.0 serial number. Also perform the tasks described in “Preparing for an Upgrade” on page 49. To upgrade Workstation and upgrade the host operating system to Windows Vista and Windows 7, see “Upgrading to a Windows Vista and Windows 7 Host” on page 51. To upgrade Workstation on a Windows host 1 Log in to your Microsoft Windows host as the Administrator user or as a user who is a member of the Windows Administrators group. 2 Launch the Workstation 7.0 installer from your download directory or CD/DVD drive. Workstation automatically uninstalls the previous version but saves all the network settings except for bridged settings used to map individual virtual networks to specific physical or virtual adapters. 50 VMware, Inc., Chapter 2 Installing and Upgrading VMware Workstation 3 Reboot your computer if you are prompted to do so, and log in again as the Administrator user or as a user who is a member of the Windows Administrators group. 4 Follow the installation wizard prompts to complete the installation. 5 Reboot your computer if you are prompted to do so. You can now log in as you normally do. You do not need to log in as an Administrator now that Workstation is installed. 6 If you used bridged settings to map virtual networks to specific physical or virtual adapters, re‐create the mappings. Although Workstation 7.0 generally preserves network settings during the upgrade, it cannot preserve mappings created with Workstation 4, 5.x, or 6.x. To use Workstation 7.0 to upgrade virtual machines, see “Change the Version of a Virtual Machine” on page 96.Upgrading to a Windows Vista and Windows 7 Host
This topic provides instructions for various upgrade scenarios that involve Windows Vista and Windows 7. During the upgrade from Windows XP to Windows Vista or Windows 7, the location of virtual machines might change. The Windows Vista and Windows 7 upgrade use the registry to map the virtual machines to a new location by using the following paths: On Windows XP, the default virtual machine location before the upgrade is: C:\Documents and Settings\Upgrade Workstation on a Linux Host
You can upgrade from Workstation version 4, 5.x, or 6.x to version 7.0 by running the VMware Workstation 7.0 installation program. Before you begin, complete the following: Make sure that you have a Workstation 7.0 serial number. You are prompted to enter the serial number after installation is complete, the first time you start Workstation after the upgrade. Also perform the tasks described in “Preparing for an Upgrade” on page 49. If your previous installation was from an RPM installer and you want to install Workstation 7.0, manually uninstall the previous version of Workstation. To manually uninstall Workstation, see “Uninstall Workstation from a Linux Host” on page 49. If you currently have Workstation 4, 5.x, or 6.x installed on your system, the older version will be uninstalled automatically before the latest version of Workstation is installed. Workstation 7.0 saves network settings except for bridged settings used to map individual virtual networks to specific physical or virtual adapters. NOTE Starting with Workstation 5.x, Samba is no longer automatically configured during installation. VMware, Inc. 53, To upgrade Workstation on a Linux host 1 Run the Workstation bundle installer as you would for a new installation. 2 If you used bridged settings to map virtual networks to specific physical or virtual adapters, re‐create the mappings. Although Workstation 7.0 generally preserves network settings during the upgrade, it cannot preserve mappings created with Workstation 4, 5.x, or 6.x. 3 (Optional) To upgrade the virtual machines, use the Change Version wizard in Workstation 7.0. See “Change the Version of a Virtual Machine” on page 96. 54 VMware, Inc.,Learning Workstation Basics 3
This chapter discusses launching the Workstation program and introduces the VMware Workstation window. This chapter includes the following topics: “Start Workstation on a Windows Host” on page 55 “Start Workstation on a Linux Host” on page 56 “Overview of the Workstation Window” on page 56 “Check for Product Updates” on page 67 “Quickly Create a Virtual Machine and Install an Operating System” on page 68 “Introduction to Workstation Preferences” on page 69 “Introduction to Virtual Machine Settings” on page 71 “Closing Virtual Machines and Exiting Workstation” on page 73 “Keyboard Shortcuts” on page 74 “Gathering Information for VMware Technical Support” on page 77Start Workstation on a Windows Host
Depending on the options you selected during installation, you might have a desktop shortcut, a Start menu item, a quick launch shortcut, or some combination of these for launching Workstation. To start Workstation on a Windows host 1 From the Start menu, choose Start > Programs > VMware > VMware Workstation. 2 If this is the first time you are launching Workstation, read and accept the end user license agreement (EULA). VMware, Inc. 55,Start Workstation on a Linux Host
Whether you can start Workstation from a Linux user interface depends on the Linux distribution. For example, on Red Hat Enterprise Linux 5.1, the VMware Workstation menu item is in the Applications > System Tools menu. You can always start Workstation from the command line. Although you must become root to install Workstation, you do not have to be root to start and run Workstation. To start Workstation on a Linux host 1 Open a terminal window. 2 Do one of the following: If /usr/bin is in your default path, enter the following command: vmware & If /usr/bin is not in your default path, enter the following command: /usr/bin/vmware & 3 Read and accept the end user license agreement (EULA).Overview of the Workstation Window
A Workstation virtual machine is like a separate computer that runs in a window on your physical computer. However, Workstation displays more than the screen of another computer. From the Workstation window, you can access and run virtual machines and teams of virtual machines. You can also switch easily from one virtual machine to another. 56 VMware, Inc., Chapter 3 Learning Workstation Basics Figure 3-1. VMware Workstation Window menus toolbar tabs , sidebar home page, summary, or console view message status log bar The VMware Workstation window contains the following sections: Home page, summary, console, or appliance view – Main part of the window that shows the virtual machines. Tabs – Each open virtual machine has a tab. Click a tab to make that virtual machine active. Click the Close button to close the tab. Depending on how you configure Workstation, the virtual machine is then either powered off or continues to run in the background. Sidebar – Bookmark your favorite virtual machines and teams of virtual machines for quick access. You can also see which virtual machines are powered on. Right‐click context menus enable you to perform many operations on a selected virtual machine. An additional section of the sidebar displays ACE Management Servers. Status bar – Displays Workstation messages and an icon for each removable device. You can click or right‐click an icon to disconnect it or edit its configuration. Message log— A note icon indicates whether any unread messages are present in the message log for the selected virtual machine. If the icon is dimmed, all messages were read. To open the message log, right‐click the icon and choose Open Message Log. Alternatively, from the menu bar, choose VM > Message Log. Messages include warning information about the virtual machine, such as Could not connect to the floppy drive. or No bootable device was detected. Select an item in the message log to see a detailed description of the message. VMware, Inc. 57,Home Page and Views
Workstation displays one of four views in the main part of the window: the home page, the summary view, the console view, or the appliance view. Home Page Click the Home tab to display the Workstation home page. Use the icons on the home page to start creating a new virtual machine or open an existing virtual machine. To close the home page, click the X to the right of the tabs on a Windows host or the X on the tab on a Linux host. To display the home page again, choose View > Go to Home Tab. Summary View When you select a tab for a powered‐off virtual machine or team of machines, Workstation displays only a summary of the configuration information about that item. Workstation also displays a summary for a suspended virtual machine or team. Click the Summary button in the toolbar at any time to examine settings in the summary view. Summary views appear only for virtual machines that are currently open. See “Starting a Virtual Machine” on page 150. The summary or console view remains visible as long as the virtual machine remains open. Figure 3‐2 shows an example of the summary view. 58 VMware, Inc., Chapter 3 Learning Workstation Basics Figure 3-2. Summary View for a Virtual Machine on a Windows Host Summary View button The Commands section gives you access to the most‐often used commands from the VM menu. On Windows hosts, for ACE‐enabled virtual machines, this includes commands for creating security policies and virtual machine packages to deploy to end users, as well as a command for previewing the ACE‐enabled virtual machine in VMware Player. The section that includes the Devices, Options, and (sometimes) ACE and Packages tabs enables you to review configuration settings quickly. Double‐click an item on the tab to display the item’s configuration panel and change a setting. VMware, Inc. 59, Console View The console view for an active virtual machine is like the monitor display of a physical computer. Figure 3-3. Console View on a Windows Host Console View button When a virtual machine is active, the name of the virtual machine or team of virtual machines appears in a tab at the top of the console. To switch from the active virtual machine or team, click the tab of another virtual machine or team. You can use the console tabs in the window mode and also in the quick switch mode. Appliance View If you set up the virtual machine to act as an appliance, such as a Web server with a browser‐based console, you can specify that the default view is an appliance view. The appliance view gives a brief description of the type of server or appliance. It also provides a link that opens the browser on the host system and connects to the appliance’s management console. The appliance view is available only for virtual machines that you designate as appliances. See “Configure the Appliance View for a Virtual Machine” on page 184. 60 VMware, Inc., Chapter 3 Learning Workstation Basics Displaying Multiple Virtual Machines at the Same Time To simultaneously view more than one virtual machine when they are not all on the same team, open multiple Workstation windows and launch one or more virtual machines in each Workstation window. Use a team of virtual machines to coordinate and use multiple virtual machines within a single console window. See “Summary and Console Views for Teams and Their Virtual Machines” on page 278.Toolbar Buttons
The toolbar area at the top of the VMware Workstation window contains buttons to power virtual machines on and off, change the Workstation display, manage snapshots, and record virtual machine activity. Figure 3-4. Workstation Toolbars Power toolbar Snapshot toolbar Replay toolbar View toolbar Figure 3-5. ACE Toolbar (Windows Hosts Only) ACE toolbar If you point to a toolbar button, a tooltip appears and displays the name of the button. To change which buttons appear, see “Customize the Toolbar on a Windows Host” on page 64 and “Customize the Toolbar on a Linux Host” on page 63. The Power toolbar contains the following buttons: Power Off – Turns off the active virtual machine or team like the power button on a physical PC. You can configure Workstation for a soft power off (called shut down) or a hard power off (called power off). See “Shut Down a Virtual Machine” on page 153 or “Power Off or Close a Team” on page 276. Suspend – Stops a virtual machine or team in a manner that allows you to resume your work later. See “Using the Suspend and Resume Features” on page 203. VMware, Inc. 61, Power On or Resume – Powers on a selected virtual machine or team that is powered off, or resumes a virtual machine or team that is suspended. See “Starting a Virtual Machine” on page 150, “Power On a Team” on page 281, and “Using the Suspend and Resume Features” on page 203. Reset – Resets a virtual machine or team like the reset button on a physical PC. See “Configure Power Off and Reset Options for a Virtual Machine” on page 154. The Snapshot toolbar contains the following buttons: Take Snapshot – Enables you to save the state of a virtual machine in the same manner you might save a word‐processing document. You can return to that state if you make a mistake by using the Revert button. See “Using Snapshots” on page 205. Revert – Allows you to return a virtual machine to the parent state, a state previously preserved by taking a snapshot. See “Using Snapshots” on page 205. Manage Snapshots – Opens the snapshot manager, where you can view the virtual machine’s existing snapshots, revert to a snapshot, take a new snapshot, and make a clone from a snapshot. See “Snapshot Manager Overview” on page 210. The View toolbar contains the following buttons: Show or Hide Sidebar – Toggles between showing and hiding the sidebar. See “View the Sidebar” on page 64. Quick Switch – Enlarges the Workstation console to cover the entire host monitor. Console tabs enable you to switch between virtual machines and teams with a single click. See “Use Quick Switch Mode” on page 167. Full Screen – Enlarges the virtual machine display to cover the entire host monitor. The virtual machine no longer appears in a window. See “Use Full Screen Mode” on page 164. Unity – Integrates your favorite guest applications with your host’s desktop so that guest application windows look just like host application windows, but with color‐coded borders. See “Using Unity Mode” on page 160. Summary View – Displays the summary view. See “Summary View” on page 58. Appliance View – Displays the appliance view. See “Appliance View” on page 60. Console View – Displays the console view. See “Console View” on page 60. 62 VMware, Inc., Chapter 3 Learning Workstation Basics The Replay toolbar contains the following buttons: Replay Last Recording – Plays the last recording made for this virtual machine. Record – Begins recording the activity of this virtual machine. For information about the record/replay feature, see Chapter 12, “Recording and Replaying Virtual Machine Activity,” on page 259. The ACE toolbar, which is available on Windows hosts only, contains the following buttons: Edit Policies – Opens the policy editor. Edit Deployment Settings – Opens the deployment settings editor. Create New Package – Opens the New Package wizard. Create Pocket ACE Package – Opens the Pocket ACE Package wizard. Preview in Player – Allows you to run an ACE instance as it will run on the user’s machine. Using preview mode also allows you to view the effects of changed policies as they will appear on the user’s machine. See Chapter 18, “Learning the Basics of VMware ACE,” on page 383. Customize the Toolbar on a Linux Host You can customize the Workstation toolbar by adding, removing, and rearranging toolbar buttons. On a Linux host, all the buttons are contained in a single toolbar. To customize the toolbar on a Linux host 1 Right‐click the far‐right side of the toolbar to display a Toolbar menu. 2 Click Power, Snapshot, View, or Replay to add or remove that toolbar. When a toolbar name is checked, the corresponding buttons appear in the interface. 3 In the Desktop Style part of the menu, choose the display style for toolbar buttons. VMware, Inc. 63, Customize the Toolbar on a Windows Host You can customize the Workstation toolbar by adding, removing, and rearranging toolbar buttons. To customize the toolbar on a Windows host 1 Right‐click any part of the toolbar to display a Toolbar menu. 2 Click Power, Snapshot, ACE, View, or Replay to add or remove that toolbar. When a toolbar is checked, it appears in the interface. To change which buttons appear in a toolbar or the order in which they appear, display that toolbar and continue with the following steps. 3 Right‐click the Power, Snapshot, ACE, View, or Replay toolbar to open the Customize Toolbar dialog box. Buttons listed under Current Toolbar Buttons appear in the toolbar, in the order shown in the Customize Toolbars dialog box. 4 Do any of the following: To add or remove a button from the toolbar, select the button and click Add or Remove. Add a separator to display a vertical line between the buttons. To change the order of the buttons, select any button under Current Toolbar Buttons and click Move Up or Move Down. To change the order of the currently displayed buttons without opening the Customize Toolbar window, hold down the Shift key while you drag a button to a different location in the toolbar. To restore the default setup, with all buttons displayed, click Reset. 5 Click Close.View the Sidebar
The sidebar contains a list of favorites and shows which virtual machines or teams of virtual machines are currently powered on. On Windows hosts, an additional section of the sidebar displays ACE Management Servers. For more information, see the VMware ACE Management Server Administrator’s Manual. To view the Sidebar Choose View > Sidebar. If the sidebar was hidden, it becomes visible. If it was visible, it is hidden. 64 VMware, Inc., Chapter 3 Learning Workstation BasicsFavorites List in the Sidebar
The Favorites list lets you organize and access frequently used items. The Favorites list provides the following benefits: Fast access – Quickly access frequently used items. With your virtual machines and teams on the Favorites list, you can open them without browsing the host file system. Also like browser bookmarks, Favorites list icons can be organized in folders, added, rearranged, or deleted. Status – Different icons indicate the status of virtual machines and teams. A Favorites list icon indicates whether the team or virtual machine is powered off, powered on, or suspended. A brown (rather than blue) virtual machine icon indicates that the virtual machine is a Workstation 4 virtual machine. Table 3-1. Icon Status in the Favorites List Powered off Workstation 5.x, 6.x, or 7.x virtual machine or full clone. To determine the exact version, use the summary view’s Version field. Powered off virtual machine created as a linked clone of another virtual machine. Powered off team of virtual machines. Powered off Workstation 4 virtual machine. Powered on indicator can appear for virtual machines and teams. Suspended indicator can appear for virtual machines and teams. Unavailable indicator can appear if a virtual machine or team gets corrupted or moved from the location that was used to create the favorites item. The indicator also appears if the virtual machine is already open in VMware Player or is opened by another user. VMware, Inc. 65, Right‐click commands – Right‐click on a Favorites icon to display a menu of commands you can use for that virtual machine or team. You can click elsewhere in the Favorites list (that is, not on a virtual machine or team) to display a context menu from which you can choose to create a new virtual machine, team, or folder. You can also open an existing virtual machine, team, Microsoft Virtual PC or Virtual Server virtual machine, StorageCraft, or Symantec Backup Exec System Recovery system image. Use Folders for Organizing Favorites You can organize favorites into folders and nest folders inside other folders. To use folders for organizing favorites 1 Right‐click Favorites (or any item in the Favorites list), and choose New Folder. 2 Complete the New Folder dialog box that appears. 3 (Optional) Drag and drop folders to place one inside another. 4 Drag and drop Favorites items in the desired folder. Add Virtual Machines and Teams to the Favorites List Virtual machines and teams are automatically added to the Favorites list when you complete the New Virtual Machine wizard. You can also add them manually. To add virtual machines and teams to the Favorites list 1 Choose File > Open and browse to the location of the virtual machine (.vmx file) or team (.vmtm file). 2 Click Open. 3 Choose File > Add to Favorites. Remove an Item from the Favorites List You can remove the name of a virtual machine or team from the Favorites list regardless of whether the virtual machine or team is open or powered on. Removing the name does not affect the virtual machine’s files or operation. To remove an item from the Favorites list 1 Click a name in the Favorites list to select it. 2 Choose File > Remove from Favorites. 66 VMware, Inc., Chapter 3 Learning Workstation Basics Rename an Item in the Favorites List Renaming an item in the Favorites list also renames the virtual machine or team. To rename a Favorite list entry for a virtual machine or a team 1 Right‐click the Favorites item to rename. 2 Choose Rename from the context menu. 3 Type the new name for the item and press Enter. Powered On List This list in the sidebar enables you to find out which virtual machines or teams are currently powered on. Right‐click items in the Powered On list to display a menu of commands you can use for that virtual machine or team.Check for Product Updates
Workstation automatically checks for product updates every three days. If an update check fails on two consecutive attempts, you receive a notification. NOTE Checking for product updates works only if the host computer is connected to the Internet. To check for product updates 1 (Optional) To check for updates immediately, choose Help > Check for Updates on the Web. 2 To configure Workstation to periodically check for updates, choose Edit > Preferences > Updates. 3 In the Software updates section, select Check for new version of VMware Workstation on startup and click OK. VMware, Inc. 67,Quickly Create a Virtual Machine and Install an Operating System
The instructions in this section get you started quickly with creating a virtual machine and installing a guest operating system. After you create a virtual machine, you will find the information in the rest of this chapter easier to understand. The instructions tell you to accept the default settings so that you can complete the New Virtual Machine wizard quickly. The purpose is to learn about Workstation. Later, when you want to create virtual machines that you actually use in your work or production environment, you can learn about all the options available. This information is provided in Chapter 4, “Creating and Upgrading a Virtual Machine,” on page 81. For simplicity, use a Windows installation CD or ISO image file for the operating system you install in the virtual machine. Most Windows operating systems fit on one CD, whereas Linux requires multiple CDs. If you want to use a Linux guest operating system, use installation media for one of the newer versions of Red Hat, SUSE Linux, or Ubuntu. The easy install feature is supported for these operating systems. To quickly create a virtual machine 1 To use an installation CD or DVD for the operating system, rather than an ISO image file, insert the CD or DVD in the host CD‐ROM drive. 2 Start VMware Workstation. For instructions, see “Start Workstation on a Windows Host” on page 55 or “Start Workstation on a Linux Host” on page 56. 3 Choose File > New > Virtual Machine. 4 On the Welcome page, select Typical and click Next. 5 On the Guest Operating system Installation page, select Installer disc or Installer disc image file, as appropriate, and click Next. 6 Complete the fields on the Easy Install Information page. Specifying a password is optional. On Windows, the password you enter here is used for an account with Administrator permissions. On Windows 2000, the password is used for the Administrator account. 7 Accept the defaults on the rest of the wizard pages. The virtual machine is created and its name is added to the Favorites list. 68 VMware, Inc., Chapter 3 Learning Workstation Basics The console view for the virtual machine appears. Soon the boot device (such as the CD‐ROM) is detected and installation of the operating system begins. On Windows 2000 guests, if you entered a password when completing the New Virtual Machine wizard, then when the operating system starts up, it might prompt you to enter an Administrator password. Use the password that you created when completing the New Virtual Machine wizard. After installation is finished, VMware Tools is automatically installed. Now that you have a virtual machine with a guest operating system installed, you can refer to it as you read the rest of the topics in this chapter.Introduction to Workstation Preferences
The Preferences dialog box appears when you choose Edit > Preferences. It lets you change a number of settings that apply to Workstation, no matter which virtual machine you are running. The default settings for Workstation preferences are correct for most cases. Do not change settings unless you are an experienced user. NOTE On a Linux host, you must be logged in as root to save global preference changes. Following is a list of the tabs in the Preferences dialog box, along with cross‐references to the sections of this manual that pertain to each tab: Workspace tab – Lets you configure the following settings: Location section – Lets you change the directory in which newly created virtual machines are stored. See “Virtual Machine Location” on page 85 and “Files That Make Up a Virtual Machine” on page 99. Virtual Machines section – Several of these options have to do with exiting Workstation while leaving some virtual machines powered on. See “Closing Virtual Machines and Exiting Workstation” on page 73. For information about enabling shared folders, see “Set Up Shared Folders” on page 193. Input tab – Lets you adjust the way the virtual machine captures control of keyboard and mouse. For example, by default the virtual machine grabs keyboard and mouse input when you click in the virtual machine window. VMware, Inc. 69, Hot Keys tab – Lets you specify the key combination that is used with hot‐key sequences for all your virtual machines. Use hot‐key combinations to enter and leave full screen mode, ungrab mouse and keyboard input, and so on. See “Keyboard Shortcuts” on page 74. Display tab – Lets you adjust the manner in which the console and the host display accommodate a different guest operating system display resolution. Also see “Fitting the Workstation Console to the Virtual Machine Display” on page 171 and “Use Full Screen Mode” on page 164. Memory tab – For details on adjusting memory settings in Workstation, click Help on this tab. On Linux, you must be running Workstation as root in order to change these settings. Priority tab – For information about the snapshot settings on this tab, see “Enable or Disable Background Snapshots” on page 208. On Linux, you must be running Workstation as root in order to change this setting. For information about the process priority settings available on Windows hosts, click Help on this tab. Updates tab – Lets you specify whether to automatically update VMware Tools and download other components on Windows and Linux guest systems when a new version becomes available. On Linux hosts, you must be running Workstation as root in order to change these settings. VMware Tools is a suite of utilities that enhances the performance of the virtual machine’s guest operating system and improves management of the virtual machine. See Chapter 5, “Installing and Using VMware Tools,” on page 103. Devices tab – (Windows hosts only) By default, the Autorun feature on the host is disabled. Therefore, when you insert a CD or DVD in the CD/ DVD‐ROM drive, the Autorun feature is not available. You can open the CD or DVD on the host using Windows Explorer. In addition to the cross‐references mentioned in this list, more information about the settings on each tab is available in the Workstation online help. Click Help in the Preferences dialog box. The settings on the following tabs apply only to the user currently logged on to the host computer: Workspace tab, Input tab, Hot Keys tab, Priority tab, and Tools tab. The settings on the following tabs apply no matter which virtual machine is running or which user is logged on to the host computer: Display tab, Memory tab, and Devices tab. 70 VMware, Inc., Chapter 3 Learning Workstation BasicsIntroduction to Virtual Machine Settings
Workstation configures a new virtual machine based on the guest operating system you select in the New Virtual Machine wizard. After the virtual machine is created, you can use the virtual machine settings editor to change many configuration options set by the wizard. The virtual machine settings editor appears when you select a virtual machine and choose VM > Settings. On guests with Windows XP and later versions, if you make changes to the virtual machine configuration after activating the guest you might have to reactivate it. To minimize the changes, set the final memory size for the virtual machine and install VMware Tools before you activate the guest.Hardware Tab
Use the Hardware tab to add, remove, and configure virtual devices for the selected virtual machine. Figure 3-6. Virtual Machine Settings Hardware Tab memory device Help button VMware, Inc. 71, When you select an item in the Hardware list, the options that correspond to the item appear on the right side of the dialog box. For example, in Figure 3‐6, memory options appear because the Memory item is selected. Topics and chapters related to each of the virtual devices in the Hardware list are provided later in this manual. To display online help for an item you select in the Hardware list, click Help.Options Tab
The Options tab lets you adjust characteristics of the selected virtual machine: Many options control interactions between the host and the guest operating system, such as how folders can be shared, how files are transferred, and what happens to a guest operating system when you exit Workstation. Some options let you override similar Preferences dialog box options, which are global preferences set for all virtual machines. For example, you can use the Advanced option to override the process priorities set on the Priority tab in the Preferences dialog box. Some options let you change settings you might initially make when running the New Virtual Machine wizard to create a virtual machine. For example, you can use the General options to change the name of the virtual machine. 72 VMware, Inc., Chapter 3 Learning Workstation Basics Figure 3-7. Virtual Machine Settings Options Tab General options The settings for the virtual machine Options tab are discussed later in this manual, in the task‐specific topics and procedures where you would use them. To display online help for an item you select in the Options list, click Help.Closing Virtual Machines and Exiting Workstation
When you close a virtual machine or team, and when you exit Workstation, if any virtual machines are still powered on, you are prompted to specify one of the following actions to take: Continue running the virtual machine in the background. If a virtual machine continues running after you exit Workstation, you can still interact with it through virtual network computing (VNC) or some other service. Suspend the virtual machine. The suspend operation saves the state of the virtual machine. See “Using the Suspend and Resume Features” on page 203. Power the virtual machine off. If you configured the power operation to do a “soft” power‐off, a VMware Tools script runs in order to cleanly shut down the guest operating system before powering off. See “Configure Power Off and Reset Options for a Virtual Machine” on page 154. VMware, Inc. 73, To avoid receiving a prompt every time you exit Workstation or close a virtual machine or team, set a preference for virtual machines to always run in the background when you exit.Set a Virtual Machine to Run in the Background
You can set a virtual machine that is powered on to continue running in the background when you close a virtual machine or team tab, or when you exit Workstation. You can still interact with it through VNC or another service. By default, when virtual machines run in the background, a status icon appears in the notification area of the taskbar. Point to the icon to displayaatooltip that shows the number of virtual machines and teams that are running in the background. These are the virtual machines and teams that belong to the user who is logged in. To set a virtual machine to run in the background Do one of the following: Click Run in Background at the prompt when you close the virtual machine or exit Workstation. Set a Workstation preference: a From the VMware Workstation menu bar, choose Edit > Preferences. b On the Workspace tab, select Keep VMs running after Workstation closes and click OK. When you close a tab or exit Workstation, you no longer receive a prompt.Keyboard Shortcuts
You can use keyboard shortcuts to interact with Workstation and with virtual machines. Most of the available keyboard shortcuts for Workstation are listed next to their associated commands in Workstation menus. Hot keys, or keyboard shortcuts for interactions with virtual machines, are shown in Table 3‐2. Hot‐key combinations can be used to do the following: Switch between virtual machines Enter and exit full screen mode Ungrab input Send Ctrl+Alt+Del to the virtual machine only (and not to the host) Send commands to the virtual machine only (and not to the host) 74 VMware, Inc., Chapter 3 Learning Workstation BasicsBy default, most hot‐key combinations include Ctrl+Alt, but you can change this
combination. See “Change the Hot‐Key Combination” on page 76.If you change the Preferences setting for the hot‐key combination, substitute your new
setting for Ctrl+Alt as needed in the shortcuts listed in Table 3‐2. For example, if you change the hot‐key combination to Ctrl+Shift+Alt, you must pressCtrl+Shift+Alt+spacebar to have Workstation not process a command. Table 3-2. Hot-Key Combinations
Shortcut Action Ctrl+G Grab input from keyboard and mouse. Ctrl+Alt Release the mouse cursor. If the virtual machine is in the type of full screen mode called exclusive mode, pressing Ctrl+Alt changes the virtual machine from exclusive mode to windowed mode. Ctrl+Alt+Insert Shuts down or (depending upon the guest operating system) logs out of the guest. This command is received solely by the virtual machine. Note: For this and all shortcuts that include Ctrl+Alt, changing the hot‐key combination changes the sequence you need to use. For instance, if you change the hot‐key combination to Ctrl+Shift+Alt, you must press Ctrl+Shift+Alt+Insert to end the guest operating system session. Ctrl+Alt+Delete Shuts down or (depending upon the operating system) logs out of the guest operating system. On Windows hosts, if you are not using the enhanced virtual keyboard feature, this command is received by both the host operating system and the virtual machine, even when Workstation has control of input. You can cancel the ending of the host operating system’s session and return to the virtual machine to log out or shut down or perform administrative tasks. Ctrl+Alt+spacebar Sends any command to the virtual machine so that Workstation does not process it. Hold down Ctrl+Alt as you press and release the spacebar, and continue to hold the Ctrl+Alt keys down as you press the next key in the combination. Ctrl+Alt+Tab Switch among open virtual machines while mouse and keyboard input are grabbed. Ctrl+Tab On Windows hosts, switch among open virtual machines while mouse Ctrl+Shift+Tab and keyboard input are not grabbed. Workstation must be the active application. Ctrl+Alt+right In full screen mode, switch to the next powered‐on virtual machine. arrow Ctrl+Alt+left In full screen mode, switch to the previous powered‐on virtual machine. arrow Ctrl+Shift+U In Unity mode, gives access to the virtual machine Start or Applications menu. VMware, Inc. 75,Change the Hot-Key Combination
Hot‐key combinations, or shortcut keys, are key combinations you press to interact with virtual machines. For a list of actions you can invoke by using hot keys, see Table 3‐2. By default, most hot‐key combinations include Ctrl+Alt, but you can change this combination. For example, you can change the setting so that all hot‐key combinations use Ctrl+Shift+Alt. This is useful if you want to prevent certain key combinations (such as Ctrl+Alt+Del) from being intercepted by Workstation instead of being sent to the guest operating system. The hot‐key preferences you set in the preferences editor apply to virtual machines you access from within Workstation. These settings do not affect virtual machines or ACE instances distributed to other users. To change the hot-key combination 1 Choose Edit > Preferences. 2 Click the Hot Keys tab. 3 Use the following information to help you choose a key combination: Custom key combinations involve using a combination of the Ctrl, Shift, Alt, and Windows keys. The Windows key is the key between the Ctrl and Alt keys on your keyboard. The modifiers for the custom combination are: Down – The key must be pressed to use the hot‐key sequence. Up – The key must not be pressed to use the hot‐key sequence. Either – The key can be up or down. This modifier is useful to allow users a variety of keystrokes to leave full screen mode. For example, selecting Either for the Shift key means that both Ctrl+Alt+Enter and Ctrl+Shift+Alt+Enter cause Workstation to exit full screen mode. If you select Either for all of the keys (Ctrl, Alt, Shift, and Win) in the custom combination, you can use the Esc key to release the cursor. 4 (Optional) To set a hot‐key preference for the Unity application menu, enter your custom key combination in the Unity applications menu hot key field, or use the default combination Ctrl + Shift + U. 5 Click OK. 76 VMware, Inc., Chapter 3 Learning Workstation BasicsGathering Information for VMware Technical Support
When you need help from VMware technical support, VMware recommends that you create a support request. For some problems, the representative will ask you to turn on debugging, run a script to collect log files, and send the logs to VMware.Register and Create a Support Request
Before you can report problems to the VMware support team, you must register for a VMware account. Before you begin, locate the serial number. It is on the registration card in your package. If you purchased Workstation online, the serial number is sent by email. To register and create a support request 1 From the Workstation menu bar, choose Help > VMware on the Web > Register Now! 2 Follow the instructions on the Web site. 3 To report problems, from the Workstation menu bar, choose Help > VMware on the Web > Request Support.Gather Debugging Information for a Virtual Machine
Workstation provides several levels of logging to help diagnose and troubleshoot various types of problems. You can use full debugging mode to gather the greatest amount of data, which is useful when a virtual machine freezes or powers off unexpectedly. You can use statistics mode to gather performance statistics when virtual machines run slowly. You can also increase logging without going into full debugging mode. A VMware technical support representative can tell you which level to use. After you gather debugging information, you can send the log files to VMware technical support. To gather debugging information for a virtual machine 1 Select the virtual machine. 2 Make sure the virtual machine is powered off or suspended. 3 Choose VM > Settings. 4 On the Options tab, select Advanced. VMware, Inc. 77, 5 Select from the Gather debugging information drop‐down menu or the Log virtual machine progress periodically check box, as directed by VMware technical support. Using full debugging mode and logging progress periodically cause a decrease in performance. 6 In the File locations section, note the directory path to the log file. To view the complete path, click in the read‐only text box and use the right arrow key to scroll through the path. 7 Click OK.Running the Support Script
To help diagnose a problem, the VMware support team might ask you to run a support script to gather information. For example, if a virtual machine exits abnormally or fails, run the support script to collect the appropriate log files and system information. In Workstation7.0, you can run the support script by selecting Help > Collect Support Data. You can also run the script from the command line. Run the Support Script from the Workstation User Interface Run the support script only when requested to do so by VMware technical support. The support collection script collects data from all of the virtual machines you select and from your host machine, and stores all of the data in a single file. On Windows hosts, after the script finishes running, it creates a .ZIP file of the collected data and displays the file in an open Windows Explorer window. The default location of the .ZIP file: On Windows XP is C:\Documents and Settings\Creating and Upgrading a Virtual Machine 4
This chapter describes how to create a virtual machine by using the New Virtual Machine wizard. It also provides general information about installing guest operating systems. This chapter includes the following topics: “Methods of Creating Virtual Machines” on page 81 “Configuration Options for the New Virtual Machine Wizard” on page 82 “Use the New Virtual Machine Wizard” on page 91 “Installing a Guest Operating System” on page 91 “Upgrade a Guest Operating System” on page 96 “Change the Version of a Virtual Machine” on page 96 “Using an Older‐Version Virtual Machine Without Upgrading” on page 98 “Files That Make Up a Virtual Machine” on page 99Methods of Creating Virtual Machines
Workstation gives you several options for creating virtual machines: Create a virtual machine. If you do not have any virtual machines or system images, you must use this method. Use the New Virtual Machine wizard to create a virtual machine. Next, you must install an operating system. The process is the same as installing it on a physical computer. The rest of this chapter describes this method of creating a virtual machine. VMware, Inc. 81, Clone a virtual machine from an existing VMware virtual machine or virtual machine template. Clones are useful when you must deploy many identical virtual machines to a group. Cloning is preferable to copying a virtual machine because a clone’s MAC address and UUID are different from the original virtual machine, to avoid network conflicts. Use the Clone Virtual Machine wizard to create a clone. See “Cloning a Virtual Machine” on page 221. On Windows hosts, convert a physical machine, virtual machine, or system image that was created by using another VMware product or a third‐party product. This process creates a clone of the original virtual machine or system image. Use the Conversion wizard to convert a physical or virtual machine or a system image. See Chapter 6, “Creating a Virtual Machine from a System Image or Another Virtual Machine,” on page 135.Configuration Options for the New Virtual Machine Wizard
As you complete the New Virtual Machine wizard, you are prompted to make decisions about many aspects of the virtual machine. The topics in this section provide information about the issues involved so that you can determine which choices you want to make before running the wizard.Easy Install Feature for Some Guest Operating Systems
The easy install features enable you to perform an unattended installation of the guest operating system after you complete the New Virtual Machine wizard. You can use this feature regardless of whether you choose a typical or a custom configuration in the wizard. On Windows guests, the easy install feature is available for the following operating systems: Windows Vista, Windows 7, Windows XP, and Windows 2000 Windows Server 2008, Windows Server 2003, and Windows 2000 Server On Linux guests, the easy install feature is available for the following operating systems: Ubuntu 7.10 and later Red Hat Enterprise Linux 3 through 5 82 VMware, Inc., Chapter 4 Creating and Upgrading a Virtual Machine If you specify an installer disc (DVD or CD) or ISO image file and if the wizard detects an operating system that supports the easy install feature, you are prompted to supply the following information: For Windows guests: (Optional) Windows product key – If you specify a product key, you are not prompted for it later, during installation of the operating system. Enter a product key unless the installation media already contains a volume license product key. Full name – This name is used for registering the operating system. Do not use the name Administrator or Guest. If you use one of these names, you will receive an error message during installation of the operating system and be prompted to enter a different name. (Optional) Password – On Windows operating systems other than Windows 2000, the password you enter here is used for an account with Administrator permissions. On Windows 2000, the password you enter here is used for the Administrator account. For Linux guests: Full name – This name is used for registering the operating system, if registration is required. The first name is used as the host name for the virtual machine. User name – You can use lowercase letters and numbers, with no spaces. Do not use the name root. Some operating systems set up sudo access for this user, and some require this user to use su to get root privileges. Password – The password you enter here is used for both the user name you supply and the root user. This feature also installs VMware Tools in the guest operating system. For more information about VMware Tools, see “Components of VMware Tools” on page 103. If you plan to use a CD, DVD, or ISO image that contains a product key number and is already set up to perform an unattended installation, the only benefit you gain by using the easy install feature is the automatic installation of VMware Tools. VMware, Inc. 83,Typical Compared to Custom Configurations
The New Virtual Machine wizard prompts you to choose between doing a typical configuration and a custom configuration. If you select Typical, the wizard prompts you to specify or accept defaults for the following choices: Medium for installing the guest operating system (CD, image file, or neither) Guest operating system Virtual machine name and the location of the virtual machine files Size of the virtual disk and whether to split the disk into 2GB files Hardware customization, for advanced users You are not prompted to specify the virtual machine version. The virtual machine version (Workstation 5.x, 6.x, or 7.0) is assumed to be the one specified in the preferences editor. From the Workstation menu bar, choose Edit > Preferences, and see the setting for Default hardware compatibility. On the last page of the wizard, you can click Customize Hardware to change the defaults for memory allocation, number of virtual CPUs, network connection type, and so on. Many circumstances require you to select a custom installation. Select Custom if you want to do any of the following: Make a different version of virtual machine than what is specified in the preferences editor. Specify the I/O adapter type for SCSI adapters: BusLogic, LSI Logic, or LSI Logic SAS. Specify whether you want to create an IDE or a SCSI virtual disk, regardless of the default that is usually used for the guest operating system. Use a physical disk rather than a virtual disk (for expert users). Use an existing virtual disk rather than create a virtual disk. Place the virtual disk file in a location other than the virtual machine directory. Allocate all virtual disk space rather than allowing the disk space to gradually grow to the maximum. 84 VMware, Inc., Chapter 4 Creating and Upgrading a Virtual MachineGuest Operating System Selection
If you specify that the source media for installing the operating system is Installer disc or Installer disc image file and if the wizard can detect the operating system, you might not see a wizard page for selecting the operating system. After you specify an operating system or after the wizard detects it from the installation media, Workstation uses this information to do the following: Select appropriate default values, such as the amount of memory to allocate. Name files associated with the virtual machine. Adjust settings for optimal performance. Work around special behaviors and bugs within a guest operating system. If the operating system you plan to use is not listed, select Other for both guest operating system and version. For some operating systems, the operating system and VMware Tools are installed automatically after the virtual machine is created. See “Easy Install Feature for Some Guest Operating Systems” on page 82. NOTE Workstation supports 64‐bit guest operating systems only in Workstation versions 5.5 and later, and only on host machines with supported processors. For the list of processors Workstation supports for 64‐bit guest operating systems, see “PC Hardware” on page 23.Virtual Machine Location
The following examples show the default locations suggested for virtual machines: On Windows XP and Windows Server 2003 hosts, the default folder for a Windows XP Professional virtual machine is: C:\Documents and Settings\Virtual Hardware Compatibility Levels
This option is available for custom configurations only. When you make a selection from the Hardware Compatibility list, you see a list of other VMware products and versions that are compatible with your selection. You also see a list of features that are not available for that version. If one of the feature compatibility check boxes is available for the version you select, you can select the check box to see a list of the additional limitations.Number of Processors
This option is available for custom configurations only. Setting the virtual machine to have multiple virtual CPUs (up to four for VMware Workstation 7) is supported only for host machines with at least two logical processors. (If you are creating a Workstation 4 virtual machine, you do not see this panel.) The following are all considered to have two logical processors: A single‐processor host with hyperthreading enabled A single‐processor host with a dual‐core CPU A multiprocessor host with two CPUs, regardless of whether they are dual‐core or have hyperthreading enabled 86 VMware, Inc., Chapter 4 Creating and Upgrading a Virtual MachineMemory Allocation
This option is available for custom configurations or if you click Customize Hardware on the last page of the New Virtual Machine wizard. A color‐coded icon corresponds to each value. To use one of these amounts, move the slider to the corresponding icon. The high end of the range that appears is determined by the amount of memory allocated to all running virtual machines. If you allow virtual machine memory to be swapped, this value changes to reflect the amount of swapping that was specified. To change the amount of memory available to all virtual machines, use the Workstation preferences editor (Edit > Preferences).Network Connection Type
This option is available for custom configurations or if you click Customize Hardware on the last page of the New Virtual Machine wizard. You have several options for connecting the virtual machine to the network: Bridged networking – If your host computer is on a network and you have a separate IP address for your virtual machine (or can get one automatically from a DHCP server), select Bridged. Other computers on the network can then communicate directly with the virtual machine. NAT (Network Address Translation) – If you do not have a separate IP address for your virtual machine but you want to be able to connect to the Internet, select NAT. The virtual machine and the host share a single network identity that is not visible outside the network. Host‐only – Host‐only networking provides a network connection between the virtual machine and the host computer, using a virtual network adapter that is visible to the host operating system. With host‐only networking, the virtual machine can communicate only with the host and other virtual machines in the host‐only network. Select Host‐only to set up an isolated virtual network. See “Common Networking Configurations” on page 288. VMware, Inc. 87,I/O Adapter Types
This option is available for custom configurations only. An IDE and a SCSI adapter are installed in the virtual machine. The IDE adapter is always ATAPI. For the SCSI adapter, you can choose BusLogic, LSI Logic, or LSI Logic SAS. BusLogic and LSI Logic adapters have parallel interfaces. LSI Logic SAS has a serial interface. The default for your guest operating system is already selected. Older operating systems, such as Windows XP and Red Hat Enterprise Linux 2, default to BusLogic. Only Windows Server 2008 defaults to LSI Logic SAS. NOTE The LSI Logic adapter has improved performance and works better with generic SCSI devices. The LSI Logic adapter is also supported by ESX Server 2.0 and higher. Your choice of SCSI adapter does not affect your decision to make your virtual disk an IDE or SCSI disk. However, some guest operating systems, such as 32‐bit Windows XP, do not include a driver for the LSI Logic or LSI Logic SAS adapter. You must download the driver from the LSI Logic Web site. NOTE Drivers for a Mylex (BusLogic) compatible host bus adapter are not obvious on the LSI Logic Web site. Search the support area for the numeric string in the model number. For example, search for “958” for BT/KT‐958 drivers. The VMware Guest Operating System Installation Guide includes driver support information where appropriate. For guest operating system support, known issues, and installation instructions, see the online VMware Compatibility Guide. Go to the VMware Web site and select Resources > Compatibility Guides, and click the View the Guest/Host OS tab on the VMware Compatibility Guide Web site link.Disk Types
This option is available for custom configurations only. The recommended disk for your guest operating system is already selected by default. On Linux hosts, and in the Add Hardware wizard, you can select a disk mode on the Select a Disk Type page. See “Normal and Independent Disk Modes” on page 89. 88 VMware, Inc., Chapter 4 Creating and Upgrading a Virtual MachineNormal and Independent Disk Modes
The option to select normal or independent mode is available on Linux hosts for custom configurations only. Normal mode means you want to include disks in any snapshots you take. If you do not want data on the disk to be recorded when you take a snapshot of the virtual machine, you can configure the disk to be independent. If you configure the disk to be independent, you can further specify whether changes you make to the disk are to persist or be discarded when you power off the virtual machine or restore it to a snapshot. Although for Windows hosts, this configuration setting is not available in the New Virtual Machine wizard, you can exclude virtual disks from snapshots by using the virtual machine settings editor. See “Exclude a Virtual Disk from Snapshots” on page 209.Virtual Disks and Physical Disks
This option is available for custom configurations only. If you use a typical configuration, a new virtual disk is created and used for the virtual machine. Virtual disks are the best choice for most virtual machines. They are easy to set up and can be moved to new locations on the same host computer or to different host computers. Even for custom configurations, you usually choose the option Create a New Virtual Disk. In some cases you might want to choose Use an Existing Virtual Disk, to use a virtual disk you created previously. The wizard displays a page for you to enter the path or browse to the existing virtual disk (.vmdk) file. It is possible to use a physical hard disk (a “raw” disk) or IDE disk partition in a virtual machine. Do not use a physical disk configuration unless you are an expert user. See “Using Physical Disks in a Virtual Machine” on page 246. VMware, Inc. 89,Disk Capacity
The wizard prompts you to set a size between 0.1GB and 950GB for a virtual disk. OnWindows hosts, the Pocket ACE size calculator control can help determine the disk size for an ACE instance that fits on a portable device. Select the option Split virtual disk into 2 GB files if your virtual disk is stored on a file system that does not support files larger than 2GB. For custom configurations, you are also given the option Allocate all disk space now. VMware recommends that you allow the disk to grow. Allocating all disk space now gives somewhat better performance, but it is a time‐consuming operation. Also it requires as much physical disk space as you specify for the virtual disk. If you allocate all the disk space now, you cannot use the shrink disk feature later.Pocket ACE Disk Size Calculator on Windows Only
The Pocket ACE feature allows you to store ACE instances on portable devices such as USB keys (flash memory drives), Apple iPod mobile digital devices, and portable hard drives. ACE users attach these portable devices to x86 host computers and run their ACE instances with VMware Player. On the Specify Disk Capacity page of the New Virtual Machine wizard, you can use the Pocket ACE size calculator button to determine what number to use in the Disk size text box. Disk size refers only to the size of the virtual hard disk. If you plan to create Pocket ACEs, you must also consider the amount of disk space required for memory, installers, and other files related to virtual machine overhead. Select the Fast synchronize cache check box to reserve space for writing changes from the Pocket ACE cache on the host. Having this space available reduces the time it takes to synchronize files with the host. To determine what number to enter in the Virtual hard disk size text box of the calculator, you need to know how much disk space is available on the device. Plug the USB device in to your host computer and use the My Computer item to display its properties. This number cannot be less than the amount shown for Space required on USB device in the calculator. If necessary reduce the number in the Virtual hard disk size text box until the amount of total space required is correct for the device. 90 VMware, Inc., Chapter 4 Creating and Upgrading a Virtual MachineUse the New Virtual Machine Wizard
The New Virtual Machine wizard guides you through the key steps for setting up a new virtual machine, helping you set various options and parameters. Many of the settings you specify in the New Virtual Machine can be changed later, if necessary. You can use the virtual machine settings editor if you need to make changes after the initial creation. (From the menu bar, choose VM > Settings.) Before you begin, determine what type of media to use for installing the operating system in the virtual machine and do one of the following: If you plan to use an installation CD or DVD for installing the guest operating system, insert the CD or DVD in the host’s CD‐ROM drive. If you plan to use an ISO image file, make sure the file is accessible to the host. To use the New Virtual Machine wizard 1 From the Workstation menu bar, choose File > New > Virtual Machine. 2 Follow the prompts. For more information about the fields on a wizard page, click Help on that page. After the wizard creates the virtual machine, the next step is installing the guest operating system. See “Installing a Guest Operating System” on page 91.Installing a Guest Operating System
Installation of a guest operating system can be automated or manual: If you specified an installer disc or image (.iso) file and if the wizard detected an operating system that supports the easy install feature, installation is automated. An unattended installation of the operating system and VMware Tools begins when the virtual machine is powered on. The installation process usually runs without requiring input from you. See “Respond to Easy Install Prompts” on page 92. If you did not use the easy install feature, see “Install a Guest Operating System Manually” on page 93. VMware, Inc. 91,Installation Requirements for the ESX Guest Operating System
You can use the easy install feature to install ESX 4.0 and ESXi 4.0 guests on Workstation. Before you begin, make sure you fulfill the following requirements: Hardware‐assisted virtualization must be enabled for the ESX 4.0 and ESXi 4.0 guests. The host system must have Intel EM64T processors with VT‐x or AMD64 Family 10H and later processors with AMD‐V. Where applicable, VT‐x or AMD‐V must be enabled in the BIOS (or other firmware). Power off and restart Intel hosts after changing the BIOS settings to enable hardware virtualization. ESX 4.0 guests must be configured with two or more cores. VMware recommends that the host system should have at least as many cores as the guest. Only 32‐bit guests may be installed to run as nested virtual machines inside an ESX guest. These virtual machines can only be configured to use binary translation. VMware Tools are not available for ESX 4.0 or ESXi 4.0 guests. Do not install the Linux version of VMware Tools in an ESX guest. For instructions on how to set the virtual Ethernet adapter on a Linux host to run in promiscuous mode, see the VMware knowledge base article 287 available on the VMware Web site. For more information on how to configure ESX 4.0 and ESXi 4.0, see the VMware vSphere documentation set available on the VMware Web site.Respond to Easy Install Prompts
Usually you are not prompted for input during operating system installation if the easy install feature runs. If, however, you did not enter all the easy install information in the New Virtual Machine wizard, you might be prompted for a product key, user name, or password. Also, if the operating system installation disc or image spans multiple CDs, DVDs, or image files, you might be prompted when the installer requires the next disk. To respond to easy install prompts 1 If you are prompted to supply a product key, user name, or password, do the following: a Click in the virtual machine window to allow mouse and keyboard input to be grabbed by the virtual machine. b Type in the required information. 92 VMware, Inc., Chapter 4 Creating and Upgrading a Virtual Machine 2 If you are using CDs or DVDs and are prompted to insert the next CD or DVD, use the CD or DVD drive attached to the host. 3 If you are using image files and are prompted to insert the next disc, do the following: On Windows hosts, click Change Disk, browse to the image file for the next CD, and click OK. On Linux hosts, from the Workstation menu bar, choose VM > Removable Devices > CD/DVD, browse to the image file for the next CD, check the Connected option, and click Save.Install a Guest Operating System Manually
You must install an operating system manually if you did not or were not able to use the easy install feature when completing the New Virtual Machine wizard. Before you begin, use the following documents to determine additional requirements for the specific operating system and version you plan to install: For guest operating system support, known issues, and installation instructions, see the online VMware Compatibility Guide. Go to the VMware Web site and select Resources > Compatibility Guides, and click the View the Guest/Host OS tab on the VMware Compatibility Guide Web site link. For information about installing a Linux operating system that has a VMware VMI (Virtual Machine Interface) enabled kernel in the guest operating system, see “Use a Paravirtualized Kernel in Linux Guests” on page 95. A new virtual machine is like a physical computer with a blank hard disk. Before you can use it, you need to partition and format the virtual disk and install an operating system. The operating system’s installation program might handle the partitioning and formatting steps for you. Installing a guest operating system inside a virtual machine is essentially the same as installing it on a physical computer. NOTE Workstation supports 64‐bit guest operating systems only in Workstation 5.5 and higher, and only on host machines with supported processors. For the list of processors Workstation supports for 64‐bit guest operating systems, see “PC Hardware” on page 23. VMware, Inc. 93, To install a guest operating system manually 1 Start Workstation. 2 Do one of the following so that the virtual machine can access the installation media for the guest operating system: For a CD or DVD, if necessary, configure the virtual machine to use the host’s CD‐ROM/DVD drive, and insert the operating system media in the drive. In some host configurations, the virtual machine cannot boot from the installation CD‐ROM. You can work around that problem by creating an ISO image file from the installation CD‐ROM. Use the virtual machine settings editor (choose VM > Settings) to connect the virtual machine’s CD drive to the ISO image file, and power on the virtual machine. For an ISO image, connect the CD‐ROM drive to an ISO image file of an installation disk. To use a PXE server to install the guest operating system over a network connection, you do not need the operating system installation media. When you power on the virtual machine, the virtual machine detects the PXE server. 3 Click the Power On button. 4 Follow the instructions provided by the operating system vendor. 5 If the operating system spans several CDs, follow these steps when you are prompted to insert the second CD: a Disconnect from the current image by choosing VM > Removable Devices > CD‐ROM > Disconnect. b Edit the CD settings by choosing VM > Removable Devices > CD‐ROM > Edit. c For Use ISO image file, click Browse, and select the ISO image for the second CD. d In the Device Status area, select the Connected check box and click OK. e In the guest operating system, click OK or respond to the prompt so that installation can continue. f Repeat this process for additional CDs. After the guest operating system is installed, you can use the standard tools within the operating system to configure its settings. VMware recommends that you install VMware Tools before you activate the license for the operating system. See “Installing VMware Tools” on page 106. 94 VMware, Inc., Chapter 4 Creating and Upgrading a Virtual MachineUse a Paravirtualized Kernel in Linux Guests
Since 2005, VMware has been collaborating with the Linux community to develop a common paravirtualization interface. In 2006, VMware released its VMI specification as an open specification. It allows VMware virtual machines to support various paravirtualized operating systems from popular Linux distributions. Before you begin, obtain installation media (CD or ISO image) for the operating system. Paravirtualized kernel support is available for 32‐bit versions of Ubuntu 7.04, 7.10, or 8.04 and SUSE Linux Enterprise Server 10 SP2. The 64‐bit version of SUSE Linux Enterprise Server 10 SP2 already contains paravirtualization. You do not need to use a Workstation setting to enable it. For more information about paravirtualization in general, see the following VMware Web site at: http://www.vmware.com/interfaces/paravirtualization.html If you have a VMware VMI (Virtual Machine Interface) enabled kernel in the guest operating system, you will see improved performance if you enable paravirtual support in the virtual machine. To use a paravirtualized kernel in Linux guests 1 Use the New Virtual Machine wizard to create virtual machine for one of the supported 32‐bit guest operating systems. 2 After you finish creating the virtual machine, enable paravirtual kernel support, as follows: a Choose VM > Settings. b On the Hardware tab, select Processors, and in the Execution Mode section, select the VMware kernel paravirtualization check box. VMware, Inc. 95,Upgrade a Guest Operating System
When you use the New Virtual Machine wizard to create a virtual machine, one of the settings you specify is the guest operating system type and version. Workstation chooses configuration defaults based on the guest type and version you choose. If you upgrade a guest operating system to a newer version, also update the guest operating system version for the virtual machine. To upgrade a guest operating system 1 Start Workstation and select the virtual machine. 2 Make sure the virtual machine is powered off. 3 Choose VM > Settings. 4 Click the Options tab. 5 On the General settings panel, in the Version field, select the version to which you plan to upgrade and click OK. The setting you specify here is written to the virtual machine’s configuration file. This setting does not actually change the guest operating system itself. 6 Power on the virtual machine. 7 To upgrade the guest operating system, follow the upgrade instructions provided by the operating system vendor.Change the Version of a Virtual Machine
If you created virtual machines with an earlier version of Workstation, you must upgrade to the latest version to use the newest features. For information about new features, see the release notes. If you created Workstation 6.5 or 7.0 virtual machines and you want to deploy those virtual machines to run on a different VMware product, you might need to downgrade to a version that is compatible with that product. Using Workstation 7.0, you can downgrade to versions 4, 5.x, 6, or 6.5. You can also determine which virtual hardware version to use. 96 VMware, Inc., Chapter 4 Creating and Upgrading a Virtual Machine Consider the following when changing the virtual hardware version of a virtual machine: For Workstation 4, 5.x, 6, 6.5 and 7.0 virtual machines, you can change the version of the original virtual machine or create a full clone, so that the original remains unaltered. For Workstation 4 virtual machines, Workstation changes the original virtual machine. If you upgrade a Workstation 4 or 5.x virtual machine that is compatible with ESX Server to Workstation 6, 6.5, or 7.0 you cannot use the Change Version wizard to later downgrade it again to an ESX‐compatible virtual machine. On Windows hosts, however, you can use the Conversion wizard (choose File > Import) to perform such a downgrade. When you upgrade a Windows XP, Windows Server 2003, Windows Vista, or Windows 7 virtual machine, the Microsoft product activation feature might require you to reactivate the guest operating system. To change the version of a virtual machine 1 Make backup copies of the virtual disks (.vmdk files). 2 If you are upgrading from a Workstation 4 or 5.x virtual machine, or downgrading to a Workstation 4 or 5.x virtual machine, make a note of the NIC settings in the guest. Specifically, if you specified a static IP address for this virtual machine, after the upgrade, that setting might be changed to automatic assignment by DHCP. To check the NIC settings, use the method appropriate for your operating system. For example, on Windows XP, you can use the Control Panel’s Network Connections item to find information about the TCP/IP address for the virtual machine. 3 Shut down the guest operating system and power off the virtual machine. 4 Select the virtual machine and choose VM > Upgrade or Change Version. 5 Follow the prompts. When you select a hardware compatibility version, you see a list of the VMware products that are compatible with that version. If you select Workstation 4, 5, or 6 you also see a list of Workstation 6.5 and 7.0 features that are not supported for that version. VMware, Inc. 97, 6 Power on the virtual machine. If you upgrade a virtual machine that contains a Windows 98 operating system to a Workstation 6.5 or 7.0 virtual machine, you are prompted to install a PCI‐PCI bridge driver when you power on the virtual machine. Because Workstation 6.5 and 7.0 has 32 more PCI‐PCI bridges than Workstation 6, you might need to respond to the prompt 32 or 33 times. 7 If applicable, in the guest operating system, check the NIC settings and adjust them if they changed, as described in Step 2. 8 If the virtual machine does not have the latest version of VMware Tools installed, update VMware Tools. Even if, for example, you upgraded a Workstation 5.x virtual machine to Workstation 6.x rather than 7.0, be sure to update VMware Tools to the version included with Workstation 7.0. See “VMware Tools Update Process” on page 117. Do not remove the older version of VMware Tools before installing the new version. If you are upgrading a virtual machine that runs from a physical (raw) disk, you can safely ignore the message, Unable to upgradeUsing an Older-Version Virtual Machine Without Upgrading
You might not want to upgrade a virtual machine because you want it to remain compatible with other VMware products you are using. Following is a brief summary of VMware product version compatibility. Version of Workstation Compatible VMware Products 4.x ACE 1.x, 2.0, 2.5, and 2.6, ESX 4.0, VMware Fusion 1.1, 2.0, and 3.0, GSX Server 3.x, VMware Server 1.x and 2.0, and Workstation 4.x, 5.x, 6.x, and 7.0 5.x ACE 2.0, 2.5, and 2.6, ESX 4.0, VMware Fusion 1.1, 2.0, and 3.0, GSX Server 3.x, VMware Server 1.x and 2.0, and Workstation 5.x, 6.x, and 7.0 6.x ACE 2.0, 2.5, and 2.6, ESX 4.0, VMware Fusion 1.1, 2.0, and 3.0, VMware Server 2.0, and Workstation 6.0, 6.5, and 7.0 7.0 ACE 2.5 and 2.6, ESX 4.0, VMware Fusion 2.0 and 3.0, VMware Server 1.x and 2.0, and Workstation 6.5 and 7.0 98 VMware, Inc., Chapter 4 Creating and Upgrading a Virtual Machine You can run older versions of virtual machines in Workstation 7.0, but you will not have the benefits of the new features of Workstation 7.0. For more information about compatibility between VMware products, see the VMware Virtual Machine Mobility Planning Guide. If you decide not to upgrade a virtual machine, you still need to upgrade VMware Tools to the new version. Follow the instructions for your guest operating system in “VMware Tools Update Process” on page 117. Do not remove the older version of VMware Tools before installing the new version.Files That Make Up a Virtual Machine
You might never need to know the filenames or locations for your virtual machine files. Virtual machine file management is performed by Workstation. A virtual machine typically is stored on the host computer in a set of files, usually in a directory created by Workstation for that specific virtual machine. See “Virtual Machine Location” on page 85. The key files are listed in Table 4‐1 by extension. In these examples,Table 4-1. Virtual Machine Files (Continued)
Extension File Name Description .vmdkTable 4-1. Virtual Machine Files (Continued)
Extension File Name Description .vmsdOther files might be present in the directory. Some are present only while a virtual
machine is running. See “Lock Files” on page 238. VMware, Inc. 101, 102 VMware, Inc.,Installing and Using VMware Tools 5
This chapter discusses how to install, update, and run VMware Tools. This chapter includes the following topics: “Components of VMware Tools” on page 103 “Installing VMware Tools” on page 106 “VMware Tools Update Process” on page 117 “Uninstall VMware Tools” on page 120 “Repair or Change Installed Modules in a Windows Guest” on page 120 “Open the VMware Tools Control Panel” on page 121 “Configure VMware Tools in a NetWare Guest” on page 125 “Customizations to VMware Tools” on page 127 “Use the VMware Tools Service Command‐Line Interface” on page 134Components of VMware Tools
VMware Tools is a suite of utilities that enhances the performance of the virtual machine’s guest operating system and improves management of the virtual machine. Although the guest operating system can run without VMware Tools, you lose important functionality and convenience. VMware Tools includes the following components: VMware Tools service VMware device drivers VMware user process VMware Tools control panel VMware, Inc. 103,VMware Tools Service
The program file is called vmtoolsd.exe on Windows guest operating systems and vmtoolsd on Linux, FreeBSD, and Solaris guests. This service starts when the guest operating system boots and performs various duties within the guest operating system: Passes messages from the host operating system to the guest operating system. Executes commands in the operating system to cleanly shut down or restart a Linux, FreeBSD, or Solaris system when you select power operations in Workstation. On Windows guests, allows the mouse cursor to move freely between the guest and host operating systems. On Windows guests, matches the guest’s screen resolution to the host’s screen resolution and the reverse. Synchronizes the time in the guest operating system with the time in the host operating system. Runs scripts that help automate guest operating system operations. The scripts run when the virtual machine’s power state changes. The VMware Tools service is not installed on NetWare operating systems. Instead, the vmwtool program is installed. It synchronizes time and allows you to turn the CPU idler on or off.VMware Device Drivers
These device drivers include: SVGA display driver that provides high display resolution and significantly faster overall graphics performance. An audio driver that is required for all 64‐bit Windows guests and 32‐bit Windows Server 2003, Windows Server 2008, Windows Vista, and Windows 7 guests. VMXNet networking drivers for some guest operating systems. BusLogic SCSI driver for some guest operating systems. VMware mouse driver. A kernel module for handling shared folders, called hgfs.sys on Windows and .vmhgfs on Linux and Solaris. 104 VMware, Inc., Chapter 5 Installing and Using VMware Tools The Virtual Machine Communication Interface (VMCI) driver for creating client‐server applications that are optimized for fast and efficient communication between virtual machines. A paravirtual SCSI driver for PVSCSI adapters, which enhance the performance of some virtualized applications.VMware User Process
The program file is called VMwareUser.exe on Windows guests and vmware-user on Linux, Solaris, and FreeBSD guests. On NetWare guests, the vmwtool program is installed instead of vmware-user. The VMware user process performs the following tasks within the guest operating system: Lets you copy and paste text and files between host operating systems and Windows, Linux, Solaris, and FreeBSD guest operating systems. Lets you drag and drop files between host operating systems and Windows, Linux, Solaris, and FreeBSD guest operating systems. Lets you use the Unity feature with Windows and Linux guests. On Linux, Solaris, and FreeBSD guests, grabs and releases the mouse cursor when the SVGA driver is not installed. On Linux, Solaris, and FreeBSD guests, matches the guest’s screen resolution to the host’s. This process starts when you begin an X11 session. To use a different mechanism to start the process, see “Start the VMware User Process Manually If You Do Not Use a Session Manager” on page 116. On NetWare operating systems, the vmwtool program controls the grabbing and releasing of the mouse cursor. It also lets you copy and paste text. You cannot drag and drop or copy and paste files between hosts and NetWare guest operating systems. VMware, Inc. 105,VMware Tools Control Panel
The VMware Tools control panel lets you modify settings, shrink virtual disks, and connect and disconnect virtual devices. See “Open the VMware Tools Control Panel” on page 121.Installing VMware Tools
The installers for VMware Tools are stored with Workstation as ISO image files. Workstation downloads the most recent version of these files from a VMware Web site. When you select VM > Install VMware Tools, Workstation determines whether it has downloaded the most recent version of the ISO file for the specific operating system. If Workstation does not have the most recent version, or if Workstation has never downloaded an image file for that operating system, you are prompted to download the file. When Workstation has the most recent version of the ISO image file, Workstation temporarily connects the virtual machine’s first virtual CD‐ROM drive to the correct ISO image file. The installation procedure varies depending on the operating system: “Install VMware Tools in a Windows Guest” on page 106 “Install VMware Tools in a Linux Guest” on page 111 “Install VMware Tools in a Solaris Guest” on page 113 “Install VMware Tools in a FreeBSD Guest” on page 114 “Install VMware Tools in a NetWare Guest” on page 115Install VMware Tools in a Windows Guest
VMware Tools is supported on all Windows guest operating systems. Before you use the menu command to install VMware Tools, perform the following tasks, as necessary: Make sure the virtual machine is powered on. If you are running Workstation on a Windows host and your virtual machine has only one CD‐ROM drive, make sure the CD‐ROM drive is configured as an IDE or SCSI CD‐ROM drive. It cannot be configured as a generic SCSI device. If necessary, add an IDE or SCSI CD‐ROM drive to the virtual machine. See “Adding DVD/CD‐ROM and Floppy Drives to a Virtual Machine” on page 252. 106 VMware, Inc., Chapter 5 Installing and Using VMware Tools Make sure the virtual CD‐ROM drive is configured to auto‐detect a physical drive. This task is necessary if you connected the virtual machine’s CD drive to an ISO image file when you installed the operating system. Change the connection from the ISO image to auto‐detect a physical drive. (With the virtual machine powered off, choose VM > Settings > CD/DVD > Use Physical Drive > Auto‐detect.) If the guest operating system is a Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, or Window 7 operating system, log in as an administrator. Any user can install VMware Tools in a Windows 95, Windows 98, or Windows Me guest operating system. To install VMware Tools 1 On the host, from the Workstation menu bar, choose VM > Install VMware Tools. If an earlier version of VMware Tools is installed, the menu item is Update VMware Tools. Depending on whether Autorun is enabled, one of the following occurs inside the guest operating system: If Autorun is enabled in the guest operating system, a dialog box appears after a few seconds. You receive a prompt to confirm whether you want to install VMware Tools. If Autorun is not enabled, the dialog box does not appear automatically. Click Start > Run and enter D:\setup\setup.exe where D: is your first virtual CD‐ROM drive. 2 Click Yes to launch the InstallShield wizard. 3 Follow the on‐screen instructions. On some Windows operating systems, after the SVGA driver is installed, you are prompted to reboot to use this new driver. 4 Reboot the virtual machine if necessary. To change the default configuration options, see “Open the VMware Tools Control Panel” on page 121.Configure the Video Driver on Older Versions of Windows
If you are installing VMware Tools in a virtual machine that has a Windows NT, Windows Me, Windows 98, or Windows 95 operating system, you might need to configure the video driver manually. When you click Finish in the VMware Tools installation wizard, a message appears indicating that VMware Tools failed to install the SVGA driver. VMware, Inc. 107, A Notebook window, the Display Properties/Settings dialog box, and a message box appear, prompting you to reboot the machine. To configure the video driver on older versions of Windows 1 In the message box that prompts you to reboot, click No. If you click Yes, after the virtual machine reboots, run the VMware Tools installer again (choose VM > Reinstall VMware Tools). Select the Repair option. The Repair option allows the Notebook window to appear again so that the installer can access the SVGA driver. 2 Follow the instructions in the Notebook file. The instructions are specific to each operating system. They provide steps for selecting the VMware SVGA driver, usually in the Display Properties/Settings dialog box, and installing it from the VMware Tools ISO image. The English version of the instructions from the Notebook file are reprinted in Knowledge Base article 1001819 at the VMware Web site.Automate the Installation of VMware Tools in a Windows Guest
If you are installing VMware Tools in a number of Windows virtual machines, you can automate its installation. This silent installation feature uses the Microsoft Windows Installer runtime engine. Make sure the Microsoft Windows Installer runtime engine version 2.0 or higher is installed in the guest operating system. Version 2.0 or higher is included with newer versions of Windows. If you are installing VMware Tools in older Windows guest operating systems, check the version of the %WINDIR%\system32\msiexec.exe file. If the file version is not 2.0 or higher, upgrade the engine by running instmsiw.exe (instmsia.exe for Windows 95 or Windows 98 guests), which is included with the VMware Tools installer. For more information about using the Microsoft Windows Installer, including command‐line options, go to the Windows Installer page on the MSDN Web site. 108 VMware, Inc., Chapter 5 Installing and Using VMware Tools To automate the installation of VMware Tools in a Windows guest 1 Make sure the virtual machine’s CD‐ROM drive is connected to the VMware Tools ISO image and that it is configured to connect whenever you power on the virtual machine: a Select the virtual machine and choose VM > Settings > Hardware > CD‐ROM. b In the Device status section, select the Connect at Power On check box. c In the Connection section, select Use ISO image and browse to the windows.iso file, located in the directory where you installed Workstation. d Click OK. 2 (Optional) In the guest operating system, suppress prompts about installing unsigned drivers. If you are installing VMware Tools from a beta or release candidate version of Workstation, you are asked to confirm the installation of unsigned drivers. Follow these steps to suppress these confirmation prompts. For all Windows systems except Windows Vista and Windows 7: a On the virtual machine’s desktop or Start menu, right‐click My Computer and choose Properties. b Click the Hardware tab and click Driver Signing. c In the Driver Signing Options dialog box, click Ignore and click OK. d Click OK in the System Properties dialog box. For Windows Vista: a On the Start menu, right‐click Computer and choose Properties. b Select Advanced system settings > Hardware > Windows Update Driver Settings. c Click Never check for drivers when I connect a device and click OK. d Click OK in the System Properties dialog box. VMware, Inc. 109,For Windows 7:
a On the Start menu, right‐click Computer and choose Properties. b Select Advanced system settings > Hardware > Device Installation Settings > No, let me choose what to do > Never install driver software fromWindows Update.
c Click Save Changes. d Click OK in the System Properties dialog box. 3 Open a command prompt and use the following command to install some or all of the VMware Tools components: msiexec -i "D:\VMware Tools.msi" ADDLOCAL=ALL [REMOVE=In this command, you can optionally use REMOVE= if you do not
want to install a particular component. Table 5-1. VMware Tools Component Values
Valid Component Values Description Toolbox VMware Tools control panel and its utilities. Excluding this feature prevents you from using VMware Tools in the guest operating system. VMware does not recommend excluding this feature. Drivers Includes the SVGA, mouse, BusLogic, and vmxnet drivers. SVGA – VMware SVGA driver. Excluding this feature limits the display capabilities of your virtual machine. Mouse – VMware mouse driver. Excluding this feature decreases mouse performance in your virtual machine. Buslogic – VMware BusLogic driver. If your virtual machine is configured to use the LSI Logic driver, you might want to remove this feature. VMXNet – VMware VMXnet networking driver. MemCtl VMware memory control driver. Use this driver if you plan to use this virtual machine with VMware ESX Server. Excluding this feature hinders the memory management capabilities of the virtual machine running on a VMware ESX Server system. Hgfs VMware shared folders driver. Use this driver if you plan to use this virtual machine with VMware Workstation. Excluding this feature prevents you from sharing a folder between your virtual machine and the Workstation host. 110 VMware, Inc., Chapter 5 Installing and Using VMware Tools For example, to install everything but the shared folders driver, type the following on the command line: msiexec -i "D:\VMware Tools.msi" ADDLOCAL=ALL REMOVE=Hgfs /qn The SVGA, Mouse, BusLogic, VMXnet, and MemCtl features are children of the Drivers feature. This means that the following command skips installation of the SVGA, mouse, BusLogic, vmxnet, and MemCtl drivers: msiexec -i "D:\VMware Tools.msi" ADDLOCAL=ALL REMOVE=Drivers /qn To include a feature, use it with the ADDLOCAL option. To exclude a feature, use it with the REMOVE option.Install VMware Tools in a Linux Guest
Before you begin, make sure the virtual machine is powered on and the guest operating system is running. To install VMware Tools in a Linux guest 1 On the host, select VM > Install VMware Tools. If an earlier version of VMware Tools is installed, the menu item is Update VMware Tools. If the current version is installed, the menu item is Reinstall VMware Tools. 2 On the guest, log in as root. 3 If your Linux distribution does not automatically mount CD‐ROMs, mount the VMware Tools virtual CD‐ROM image. a If necessary, create the /mnt/cdrom directory: mkdir /mnt/cdrom b Mount the CD‐ROM drive. Some Linux distributions use different device names or organize the /dev directory differently. If your CD‐ROM drive is not /dev/cdrom or if the mount point for a CD‐ROM is not /mnt/cdrom, modify the command to reflect the conventions used by your distribution. mount /dev/cdrom /mnt/cdrom 4 Change to a working directory (for example, /tmp): cd /tmp VMware, Inc. 111, 5 If a previous installation exists, delete the previous vmware-tools-distrib directory. The location of this directory depends on where you placed it during the previous installation. Often it is placed in /tmp/vmware-tools-distrib. 6 Uncompress the installer: tar zxpf /mnt/cdrom/VMwareTools-Install VMware Tools in a Solaris Guest
Before you begin, make sure the virtual machine is powered on and the guest operating system is running. To install VMware Tools in a Solaris guest 1 On the host, select VM > Install VMware Tools. If an earlier version of VMware Tools is installed, the menu item is Update VMware Tools. If the current version is installed, the menu item is Reinstall VMware Tools. 2 On the guest, log in as root. 3 If necessary, mount the VMware Tools virtual CD‐ROM image. Usually, the Solaris volume manager vold mounts the CD‐ROM under /cdrom/vmwaretools. If the CD‐ROM is not mounted, restart the volume manager using the following commands: /etc/init.d/volmgt stop /etc/init.d/volmgt start 4 Change to a working directory (for example, /tmp): cd /tmp 5 Extract VMware Tools: gunzip -c /cdrom/vmwaretools/vmware-solaris-tools.tar.gz | tar xf - 6 Run the VMware Tools installer: cd vmware-tools-distrib ./vmware-install.pl Respond to the configuration prompts. Press Enter to accept the default value. 7 Log out of the root account: exit 8 (Optional) Start your graphical environment. 9 In an X terminal, to start the VMware User process, enter the following command: vmware-user To change the default VMware Tools configuration options, see “Open the VMware Tools Control Panel” on page 121. VMware, Inc. 113,Install VMware Tools in a FreeBSD Guest
Before you begin, make sure the virtual machine is powered on and the guest operating system is running. To install VMware Tools in a FreeBSD guest 1 On the host, select VM > Install VMware Tools. If an earlier version of VMware Tools is installed, the menu item is Update VMware Tools. If the current version is installed, the menu item is Reinstall VMware Tools. 2 Make sure the guest operating system is running in text mode. You cannot install VMware Tools while X is running. 3 On the guest, log in as root. 4 If necessary, mount the VMware Tools virtual CD‐ROM image by entering a command similar to the following: mount /cdrom Some FreeBSD distributions automatically mount CD‐ROMs. If your distribution uses automounting, skip this step. 5 Change to a working directory (for example, /tmp): cd /tmp 6 Untar the VMware Tools tar file: tar zxpf /cdrom/vmware-freebsd-tools.tar.gz 7 If necessary, unmount the VMware Tools virtual CD‐ROM image: umount /cdrom If your distribution uses automounting, you do not need to unmount the image. 8 Run the VMware Tools installer: cd vmware-tools-distrib ./vmware-install.pl 9 Log out of the root account: exit 114 VMware, Inc., Chapter 5 Installing and Using VMware Tools 10 (Optional) Start your graphical environment. 11 In an X terminal, to start the VMware User process, enter the following command: vmware-user In minimal installations of the FreeBSD 4.5 guest operating system, sometimes VMware Tools does not start. To change the default VMware Tools configuration options, see “Open the VMware Tools Control Panel” on page 121.Install VMware Tools in a NetWare Guest
Before you begin, make sure the virtual machine is powered on and the guest operating system is running. To install VMware Tools in a NetWare guest 1 On the host, select VM > Install VMware Tools. If an earlier version of VMware Tools is installed, the menu item is Update VMware Tools. If the current version is installed, the menu item is Reinstall VMware Tools. 2 On the guest, load the CD‐ROM driver so the CD‐ROM device mounts the ISO image as a volume by doing one of the following: For a NetWare 6.5 virtual machine in the system console, enter: LOAD CDDVD For a NetWare 6.0 or NetWare 5.1 virtual machine, in the system console, enter: LOAD CD9660.NSS For a NetWare 4.2 virtual machine, in the system console, enter: load cdrom Mount the VMware Tools CD‐ROM image by entering: cd mount vmwtools VMware, Inc. 115, 3 In the system console, enter one of the following: For NetWare 5.1, 6.0, or 6.5: vmwtools:\setup.ncf For NetWare 4.2: vmwtools:\setup When the installation finishes, the message VMware Tools for NetWare are now running appears in the Logger Screen (NetWare 6.5 and NetWare 6.0 guests) or the Console Screen (NetWare 4.2 and 5.1 guests). 4 If you have a NetWare 4.2 guest, restart the guest operating system, as follows: a To shut down the system, in the system console, enter: down b To restart the guest operating system, in the system console, enter: restart server 5 Make sure the VMware Tools virtual CD‐ROM image (netware.iso) is not attached to the virtual machine. If it is attached, disconnect it. Right‐click the CD‐ROM icon in the status bar of the console window and choose Disconnect.Start the VMware User Process Manually If You Do Not Use a Session Manager
One of the executables used by VMware Tools in Linux, Solaris, and FreeBSD guests is vmware-user. This program implements the fit‐guest‐to‐window feature and Unity mode, among other features. Normally, vmware-user is started automatically after you configure VMware Tools and then log out of the desktop environment and log back in. You must start the vmware-user process manually in the following environments: If you run an X session without a session manager (for example, by using startx and getting a desktop and not using xdm, kdm, or gdm) If you are using certain older versions of GNOME without gdm or xdm If you are using any session manager or environment that does not support the Desktop Application Autostart Specification, available from http://standards.freedesktop.org 116 VMware, Inc., Chapter 5 Installing and Using VMware Tools To start the VMware User process manually if you do not use a session manager Do one of the following: To have vmware-user start when you start an X session, add vmware-user to the appropriate X startup script, such as the .xsession or .xinitrc file. The vmware-user program is located in the directory where you selected to install binary programs, which defaults to /usr/bin. The startup script that needs to be modified depends on your particular system. To start vmware-user after a VMware Tools software update or if you notice certain features are not working, open a terminal window and enter the following command: vmware-userVMware Tools Update Process
Workstation checks for VMware Tools updates when you power on a virtual machine. If a newer version is available, Workstation prompts you for permission to download the new version from a VMware Web site. When you update from a version of VMware Tools included with Workstation 4.x, 5.x, 6.x, the previous version of VMware Tools might be uninstalled. For VMware Tools updates on Linux and Windows guests, you can set the guest to update automatically, or you can perform a manual update. On other guests, you must manually update. When you update VMware Tools, any changes you made to the default scripts are overwritten. Any custom scripts you created remain untouched, but do not benefit from any underlying changes that enhance the default scripts.How Automatic Updates Occur
On Windows and Linux guest systems, you can set VMware Tools to update itself when the virtual machine is powered on. The status bar displays the message Installing VMware Tools .when an update is in progress. After the update is complete, if you are logged in to a Windows guest, a restart prompt appears for 30 seconds. If you are not logged in, the operating system restarts without prompting. VMware, Inc. 117, An auto‐update check is performed as part of the boot sequence when you power on a virtual machine. If the virtual machine was suspended and you resume it or restore it to a snapshot during the boot sequence before this check occurs, the automatic update occurs as planned. If you resume the virtual machine or restore it to a snapshot after the auto‐update check occurs, the automatic update does not occur. For more information about automatic updates, see “Use Global Settings to Update VMware Tools Automatically” on page 118 and “Set VMware Tools Update Options for Each Virtual Machine” on page 119.How You Are Notified to Do a Manual Update
On Windows and Linux guests, you can specify that you want to do manual updates. On other operating systems, performing manual updates is the only option. The status bar of the guest system displays a message when a new version is available. To install the update, use the same procedure that you used for installing VMware Tools the first time. On Linux guests, the VMware User process (vmware-user) does not restart following an update until you launch it manually or log out of your window manager and log in again. On Windows, you can alternatively open the VMware Tools control panel (double‐click the VMware Tools icon in the notification area of the taskbar), and on the Options tab, click Update.Use Global Settings to Update VMware Tools Automatically
To automatically update VMware Tools for most or all Windows or Linux guests when the virtual machine starts, configure the global preference first and then configure the per‐virtual‐machine update option to use that global preference. Before you begin, if you use a Linux host, become root before starting Workstation. On Linux systems, nonroot users are not allowed to modify the preference setting for VMware Tools updates. To use global settings to update VMware Tools automatically 1 Start Workstation. 2 Select Edit > Preferences and click the Updates tab. 3 Under the VMware Tools updates section, select the check box and click OK. 118 VMware, Inc., Chapter 5 Installing and Using VMware Tools 4 For each of your virtual machines, do the following: a Select the virtual machine. b Select VM > Settings. c Click the Options tab and select Tools. d Verify that the virtual machine is set to use the global preference and click OK.Set VMware Tools Update Options for Each Virtual Machine
Use this procedure to override global settings for automatically updating VMware Tools on Linux and Windows guests. Automatic updates work for versions of VMware Tools included in Workstation 5.5 and higher (build 29772 and above). Automatic updates do not work for versions of VMware Tools included in virtual machines created with VMware Server 1.x. To set VMware Tools update options for each virtual machine 1 Select the Linux or Windows virtual machine. 2 Select VM > Settings. 3 Click the Options tab and select Tools. 4 Select an update option and click OK. To install the update, use the same procedure that you used for installing VMware Tools the first time. For the platform‐specific installation instructions, see “Installing VMware Tools” on page 106.Update VMware Tools in Older Windows Virtual Machines
When a Microsoft installer performs an update, it updates only the components that it finds already installed. It does not add new components. If you update VMware Tools in a Windows virtual machine that was created with Workstation 5.x, some new components are not installed. Specifically, the Workstation 6.x and higher component for file sharing and dragging and dropping files is not installed. To get the new components, you must uninstall the old version of VMware Tools and install the new version of VMware Tools. VMware, Inc. 119, To update VMware Tools in older Windows virtual machines 1 To uninstall the old version of VMware Tools, use the Add/Remove Programs item in the guest’s Control Panel. 2 To install the new version of VMware Tools, see “Installing VMware Tools” on page 106.Uninstall VMware Tools
Occasionally, an update of VMware Tools is incomplete. You can usually solve the problem by uninstalling VMware Tools and then reinstalling. To uninstall VMware Tools Depending on the guest operating system, do one of the following: On most Windows guests, log in as an Administrator user use the guest operating system’s Add/Remove Programs item to remove VMware Tools. On Windows Vista, Windows 7, and Server 2008 guests, use the guest operating system’s Programs and Features > Uninstall a program item to remove VMware Tools. On Linux, Solaris, FreeBSD, and NetWare guests, log in as root and enter the following command: vmware-uninstall-tools.pl On a Linux guest where VMware Tools was installed by using an RPM installer, log in as root and enter the following command: rpm -e VMwareTools Workstation 4, 5, and 6 included RPM and tar installers for VMware Tools. Workstation 7 and later releases include only tar installers.Repair or Change Installed Modules in a Windows Guest
If features like enhanced file sharing do not work after a VMware Tools update, you might need to change or repair installed modules. Be sure to follow these steps. Do not use the guest’s Add/Remove Programs item in the Windows Control Panel. 120 VMware, Inc., Chapter 5 Installing and Using VMware Tools To repair or change installed modules 1 In Workstation, select the virtual machine and choose VM > Reinstall VMware Tools. 2 On the Welcome page, click Next and do one of the following: Click Change to repair or modify which modules of VMware Tools are installed. Click Modify to specify which modules are installed. Occasionally, some new modules are not installed during an update. You can manually install new modules by using the Modify option. 3 Complete the rest of the pages of the wizard. If features still do not work, uninstall VMware Tools and reinstall.Open the VMware Tools Control Panel
Use the VMware Tools control panel to modify VMware Tools configuration settings, shrink virtual disks, and connect and disconnect virtual devices. Before you begin, make sure VMware Tools is installed in the guest operating system. On Windows Vista and Windows 7 guests, log in to the operating system as an Administrator user. To open the VMware Tools control panel Do one of the following: On Windows guests, double‐click VMware Tools icon in the notification area of the guest’s Windows taskbar. If you cannot find the VMware Tools icon in the notification area, use the guest’s Windows Control Panel to display it. On Linux, FreeBSD, and Solaris guests, open a terminal window and enter the following command: /usr/bin/vmware-toolbox On NetWare guests, do one of the following: In a NetWare 5.1 or higher guest, choose Novell > Settings > VMware Tools for NetWare. In a NetWare 4.2 guest, use VMware Tools commands in the system console. The VMware Tools program is called vmwtool. VMware, Inc. 121,Use the Windows Control Panel to Display the Taskbar Icon
If VMware Tools is installed in a Windows guest operating system but the VMware Tools icon does not appear in the notification area of the Windows taskbar, you can use the Windows Control Panel to display it. To use the Windows Control Panel to display the taskbar icon 1 Go to Start > Control Panel. 2 Double‐click the VMware Tools icon. 3 On the Options tab, select Show VMware Tools in the taskbar and click Apply.Options Tab Settings
The Options tab of the VMware Tools control panel provides the following options: Time synchronization between the virtual machine and the host operating system – Sets the time of the guest operating system to be the same as the time of the host and then periodically (every minute) checks whether the guest operating system’s time matches that of the host’s. If not, the clock on the guest is synchronized to match the clock on the host. If the clock on the guest falls behind the clock on the host, VMware Tools moves the clock on the guest forward to match the clock on the host. If the clock on the guest is ahead of that on the host, VMware Tools causes the clock on the guest to run more slowly until the clocks are synchronized. If you use this option, disable all other time synchronization mechanisms. For example, some guests might have NTP or CMOS clock synchronization turned on by default. Regardless of whether you turn on VMware Tools periodic time synchronization, time synchronization occurs when the VMware Tools daemon is started (such as during a reboot or power on operation), when resuming a virtual machine from a suspend operation, after reverting to a snapshot, and after shrinking a disk. When the operating system starts or reboots, and when you first turn on periodic time synchronization, synchronization can be either forward or backward in time. For other events, synchronization is forward in time. To disable time synchronization completely, see “Disable Time Synchronization by Editing the Virtual Machine Configuration File” on page 123. Show VMware Tools in the taskbar – (Windows guests only) Displays the VMware Tools icon in the notification area of the taskbar. The icon indicates whether VMware Tools is running and whether an update is available. 122 VMware, Inc., Chapter 5 Installing and Using VMware Tools Notify if update is available – (Windows guests only) Displays the VMware Tools icon with a yellow caution icon when an update is available. Update button – (Windows guests only) Becomes enabled when an update is available. Clicking this button has the same effect as choosing VM > Update VMware Tools from the Workstation menu bar. Disable Time Synchronization by Editing the Virtual Machine Configuration File A virtual machine occasionally synchronizes time with the host even if you use the VMware Tools control panel (Options tab) to disable periodic time synchronization. You can disable time synchronization completely by editing the virtual machine configuration file. You can follow these steps to keep a fictitious time in your guest, so that the guest is never synchronized with the host. To disable time synchronization by editing the virtual machine configuration file 1 Power off the virtual machine. 2 Open the virtual machine’s configuration file (.vmx) in a text editor and set the following options to FALSE. Table 5-2. Time Synchronization Options Synchronization Occurs During the Option Name Following Event tools.syncTime Periodically (normally once per minute). Time synchronization is only forward in time. time.synchronize.continue Taking a snapshot. Time synchronization is only forward in time. time.synchronize.restore Reverting to a snapshot. Time synchronization is only forward in time. time.synchronize.resume.disk Resuming a suspended virtual machine. Time synchronization is only forward in time. time.synchronize.shrink Shrinking a virtual disk. Time synchronization is only forward in time. time.synchronize.tools.startup Booting the guest operating system. Time synchronization can be either forward or backward in time. 3 Save and close the file. VMware, Inc. 123,Devices Tab Settings
The Devices tab of the VMware Tools control panel provides options for enabling and connecting to removable devices such as floppy drives, DVD/CD‐ROM drives, ISO images, USB devices, sound adapters, and network adapters. By default, floppy drive is not connected when the virtual machine powers on. The controls for connecting and disconnecting devices might not be available, depending on whether your system administrator enabled them. You might not see a particular network adapter listed that should appear in the list. If this happens, edit the virtual machine settings to remove all network adapters from the list and then add them back to the list. Besides using the VMware Tools control panel to connect or disconnect a device, you can right‐click the device icon in the status bar of the virtual machine window. See “Use Removable Devices in a Virtual Machine” on page 183.Scripts Tab Settings
From the Scripts tab of the VMware Tools control panel, you can edit, disable, or run scripts that help automate guest operating system operations when you change the virtual machine’s power state. From this tab, you can also specify the location of custom scripts for the Suspend, Resume, Power On, Power Off, and Reset buttons. On Linux, Solaris, and FreeBSD guests, you must be logged in as root to use this tab. On most guest operating systems, if VMware Tools is installed and if you configure a virtual machine’s power controls to use the guest options, one or more default scripts run on the guest whenever you change the power state of the virtual machine. For example, if you use the virtual machine settings editor (choose VM > Settings > Options > Power) and set the Power Off control to use Shutdown Guest, then the poweroff-vm-default script runs when you click the Power Off button in the Workstation toolbar. This script causes the guest operating system to shut down gracefully. Scripts can be run on most guest operating systems, but not on Windows 95 and NetWare guests. See “Run or Disable a Script” on page 130. 124 VMware, Inc., Chapter 5 Installing and Using VMware ToolsShrink Tab Settings
The Shrink tab of the VMware Tools control panel provides options for reclaiming unused space in a virtual disk. If your virtual machine cannot be shrunk, this tab displays information explaining why you cannot shrink your virtual disks. Shrinking a disk is a two‐step process: a preparation step and the shrink step. In the first step, VMware Tools reclaims all unused portions of disk partitions (such as deleted files) and prepares them for shrinking. This step takes place in the guest operating system. The shrink process is the second step, and it takes place outside the virtual machine. The VMware application reduces the size of the disk based on the disk space reclaimed during the preparation step. If the disk has empty space, this process reduces the amount of space the virtual disk occupies on the host drive. See “Compact a Virtual Disk” on page 242. On Linux, Solaris, and FreeBSD guests, run VMware Tools as the root user to shrink virtual disks. If you shrink the virtual disk as a nonroot user, you cannot prepare to shrink the parts of the virtual disk that require root‐level permissions.About Tab
The About tab displays version (build number) and copyright information. In Windows guests, this tab also shows the status of the VMware Tools service.Configure VMware Tools in a NetWare Guest
In a NetWare virtual machine, using the system console, you can configure certain virtual machine options such as time synchronization, CPU idling, and device configuration with VMware Tools. The VMware Tools command‐line program is called vmwtool. To configure VMware Tools in a NetWare Guest 1 Open a terminal window (system console) in the NetWare guest. 2 Enter a command that uses the following format: vmwtoolTable 5-3. vmwtool Commands
vmwtool Command Description help Displays a summary of VMware Tools commands and options in a NetWare guest. partitonlist Displays a list of all disk partitions in the virtual disk and whether or not a partition can be shrunk. shrink [Customizations to VMware Tools
Customizations include modifying or writing scripts that run when a virtual machine’s power state changes, executing commands when you shut down or restart a Linux, Solaris, or FreeBSD guest, and passing commands in strings that run in startup scripts.How VMware Tools Scripts Affect Power States
When VMware Tools is installed, if you configure a virtual machine’s power controls to use the guest, or soft, power options, one or more default scripts run on the guest whenever you change the power state of the virtual machine. You change the power state by using menu commands or by clicking the Suspend, Resume, Power On, and Power Off buttons. What the default scripts do depends in part on the guest operating system: On most Microsoft Windows guests, but not windows NT and Windows Me, the default script executed when you suspend a virtual machine releases the IP address of the virtual machine. The default script executed when you resume a virtual machine renews the IP address of the virtual machine (this affects only virtual machines configured to use DHCP). Scripts cannot be run on Windows 95 guests. In Windows guests, the default scripts are located in the Program Files\VMware\VMware Tools folder. On most Linux, Solaris, and FreeBSD guests, the default script executed when you suspend a virtual machine stops networking for the virtual machine. The default script executed when you resume a virtual machine starts networking for the virtual machine. Scripts cannot be run on NetWare and FreeBSD guests. On Linux, Solaris, and FreeBSD guests, the default scripts are located in the /etc/vmware-tools directory. You can create your own scripts and use them instead of the default scripts shown in Table 5‐4. VMware, Inc. 127,Table 5-4. Default VMware Tools Scripts
Script Name Description poweroff-vm-default If you configured the power‐off operation to shut down the guest, this script runs when the virtual machine is being powered off. If you configured the reset operation to restart the guest, this script runs when the virtual machine is being reset. This script has no effect on networking for the virtual machine. poweron-vm-default If you configured the power‐on operation to start the guest, this script runs when the virtual machine is being powered on rather than resumed. If you configured the reset operation to restart the guest, this script runs after virtual machine restarts. This script has no effect on networking for the virtual machine. resume-vm-default If you configured the power‐on operation to start the guest, or the reset operation to restart the guest, this script runs when the virtual machine is resumed after it was suspended. On Windows guests, if the virtual machine is configured to use DHCP, this script renews the IP address of the virtual machine. On Linux, FreeBSD, and Solaris guests, this script starts networking for the virtual machine. suspend-vm-default If you configured the suspend operation to suspend the guest, this script runs when the virtual machine is being suspended. On Windows guests, if the virtual machine is configured to use DHCP, this script releases the IP address of the virtual machine. On Linux, FreeBSD, and Solaris guests, this script stops networking for the virtual machine.Create Scripts to Override Default VMware Tools Scripts You can create your own scripts to override the default VMware Tools scripts that
control power state changes.Scripts are run by the VMware Tools daemon (vmtoolsd.exe on Windows and
vmtoolsd on Linux, Solaris, and FreeBSD). Because vmtoolsd is run as root on Linux,Solaris, and FreeBSD and as System on Windows, the scripts are run in a separate
session from the logged‐in user’s session. The VMware Tools daemon has no knowledge of desktop sessions, which means that it cannot display graphical applications. Do not attempt to use custom scripts to display graphical applications. 128 VMware, Inc., Chapter 5 Installing and Using VMware Tools Before creating custom scripts, make sure that the following conditions are met in the guest operating system: The virtual machine is using the latest version of VMware Tools. The VMware Tools service is running in the virtual machine. Depending on the operation the script performs, the virtual machine has a virtual network adapter connected. If not, the power operation fails. (Linux, Solaris, and FreeBSD guests only) To edit a script by using the Edit button on the Scripts tab, xterm and vi must be installed in the guest operating system and must be in your PATH. You must be a root user to edit the script. To create scripts to override default VMware Tools scripts 1 Determine whether you want to create your custom script by making changes to the default script and saving it to a new location. In Windows guests, the default scripts are located in the Program Files\VMware\VMware Tools folder. On Linux, Solaris, and FreeBSD, the default scripts are located in the /etc/vmware-tools directory. 2 Modify the default script and save it with a different name or write a different script. On Windows guests, if you write a new script, create the script as a batch file. For Linux, Solaris, and FreeBSD, create the script in any executable format (such as shell or Perl scripts). You can also use the Edit button on the Scripts tab of the VMware Tools control panel to edit a custom script. You can also edit scripts manually using any text editor. 3 Associate each custom script with its particular power operation: a On the Scripts tab of the VMware Tools control panel, select the appropriate script event. b Select the Use Script check box, select Custom script, and use the Browse button to point to the script you want to use. c Click OK. When you reinstall VMware Tools after you update the Workstation software, any changes you made to the default scripts are overwritten. Any custom scripts you created remain untouched, but do not benefit from any underlying changes that enhance the default scripts. VMware, Inc. 129, Run or Disable a Script If you are creating a custom script, run the script before associating it with a power operation. To run or disable a script 1 On the Scripts tab of the VMware Tools control panel, select the appropriate script event. 2 Do one of the following: To disable the script, clear the Use Script check box and click OK. Default scripts for suspending and resuming work together. If you disable the script of one of these actions, disable the script for the other action as well. To run a script immediately, click Run Now. You can successfully run a script by clicking the Run Now button in the VMware Tools control panel, but this same script can fail when run as part of a Workstation power operation. This is because scripts run by clicking Run Now are run as the logged‐in user and have a different working directory than when scripts are run by the VMware Tools daemon during a power operation.Execute Commands After You Power Off or Reset a Virtual Machine
In a Linux, Solaris, or FreeBSD guest, you can use the VMware Tools service to execute specific commands when you shut down or restart the guest operating system. This is in addition to any script that you specified to run when you shut down the guest operating system. 1 Use a text editor to open the following file: /etc/vmware-tools/tools.conf 2 Add one or both of the following commands to the file: halt-command =Passing a String from the Host to the Guest at Startup
To pass a string from the host to the guest at startup, you pass the string from your virtual machine’s configuration file in the host to the guest operating system when you power on the virtual machine. You can pass items like the Windows system ID (SID), a machine name, or an IP address. Inside the guest operating system startup script, you can have the service retrieve this string. The string can then be used in another script to set your virtual machine’s system ID, machine name, or IP address. Use this strategy, for example, to make copies of the same configuration file, add a different string to each (either in the configuration file itself or at the command line), and use these variations of the same configuration file to launch the same virtual disk in nonpersistent mode multiple times in a training or testing environment. Passing a string is also useful when you want to deploy virtual machines on a network using a common configuration file while providing each machine with its own unique identity. You can pass strings to a virtual machine’s guest operating system in one of two ways: placing the string in the virtual machine’s configuration file or passing the string to the guest from the command line. Use this feature only if you have a good understanding of a scripting language (for example, Perl or NetShell) and know how to modify system startup scripts. String in a Configuration File Place a string in the virtual machine’s configuration file (.vmx file) by setting the string to the machine.id parameter. For example, you can set this string: machine.id = "Hello World." Following is an example of portions of two configuration files that point to the same virtual disk. Each configuration file contains its own unique string set for the machine.id parameter. config_file_1.vmx contains: ide0:0.present = TRUE ide0:0.fileName = "my_common_virtual_hard_drive.vmdk" machine.id = "the_string_for_my_first_vm" config_file_2.vmx contains: ide0:0.present = TRUE ide0:0.fileName = "my_common_virtual_hard_drive.vmdk" machine.id = "the_string_for_my_second_vm" VMware, Inc. 131, To prevent a string from being passed from the host to the guest through the service, set the following line in your virtual machine’s configuration file: isolation.tools.getMachineID.disable = "TRUE" String in a Startup Command Rather than setting the machine.id parameter in the configuration file, you can pass the string to the guest operating system from the command line when you power on the virtual machine. Following is an example of such a startup command (entered on one line): “C:\Program Files\VMware\VMware Workstation\vmware -s 'machine.id=Hello World' C:\Virtual Machines\win2000\win2000.vmx” Use this method to deploy virtual machines on a network using a common configuration file while providing each machine with its own unique identity. Launch each virtual machine with the vmware -s command. Each virtual machine disk file must be copied into its own directory if it shares its filename with another virtual machine disk file. On a Linux host, the machine ID passed on the command line takes precedence and is passed to the guest operating system if the following conditions are met: A virtual machine ID is specified in the virtual machine’s configuration (.vmx) file which is used to open the virtual machine. You specify a machine ID on the command line. Use a String in a Startup Script to Set a Name and IP Address The following example uses a Windows host to illustrate how you can use the service to retrieve a string containing what becomes the virtual machine’s machine name and IP address. In this example, W2K‐VM is the machine name and 148.30.16.24 is the IP address. 132 VMware, Inc., Chapter 5 Installing and Using VMware Tools To use a string in a startup script to set a name and IP address 1 Define the string by using one of the following methods: On the host machine, add the following line to your virtual machine’s configuration file (.vmx file): machine.id = "W2K-VM 148.30.16.24" Open the virtual machine using this configuration file. Open the virtual machine from the command line by entering the following on one line: “C:\Program Files\VMware\VMware Workstation\vmware -s 'machine.id=W2K-VM 148.30.16.24' C:\Virtual Machines\win2000\win2000.vmx” 2 Do one of the following to retrieve the string in the virtual machine: In a Windows guest, enter the following command to retrieve the string: vmtoolsd -cmd machine.id.get In a Linux guest, in the operating system’s startup script, add the following command before the network startup section. For example: /usr/sbin/vmtoolsd -cmd 'machine.id.get' The location of vmtoolsd depends on the directory you specify at the time of installation. 3 Further customize this startup script so that it uses the string the service retrieved during startup to set the virtual machine’s network name to W2K‐VM and its IP address to 148.30.16.24. 4 Place this string in the script before the command to start the network services. If you’re using a Windows 2000 guest operating system, for example, you can call the NetShell utility (netsh) and pass it the contents of the string, which uses the string accordingly. That is, it can set a new IP address for the virtual machine, if that is what was passed in the string originally.Passing Information Between the Guest and Another Program
The VMware Tools service allows you to use VMware programmatic interfaces to manage virtual machines from your own independent programs and from existing frameworks developed by partners and third parties. For more information about the VMware Infrastructure SDK, go to the VMware APIs and SDKs Documentation page of the VMware Web site. VMware, Inc. 133,Use the VMware Tools Service Command-Line Interface
The VMware Tools command‐line interface enables you to do the following: Configure time synchronization in your Linux guest operating system without running X. Upgrade and uninstall VMware Tools, determine the version, and so on. To use the VMware Tools command-line interface 1 On the guest operating system, change directories to the directory that contains the VMware Tools daemon. Depending on the operating system, the name and default location of the daemon are as follows: On Microsoft Windows systems, the daemon is called vmtoolsd.exe and the location is: C:\Program Files\VMware\VMware Tools\vmtoolsd.exe On Linux, Solaris, and FreeBSD systems, the daemon is called vmtoolsd. The location of vmtoolsd depends on the directory you specify at the time of installation. The default location is: /usr/sbin/vmtoolsd 2 To configure periodic time synchronization, use the vmx.set_option command. Use the following syntax:Creating a Virtual Machine
from a System Image orAnother Virtual Machine 6
This chapter describes how to convert a physical machine, virtual machine, or system image to a VMware virtual machine. On Windows hosts, you can convert a virtual machine that was created by using a third‐party product. This chapter includes the following topics: “Conversion Process for Importing from Other Formats” on page 135 “VMware Converter Compared to the Conversion Wizard” on page 137 “Supported Source Machines” on page 137 “Supported Destinations” on page 142 “Conversion Impact on Settings” on page 144 “Open a Third‐Party Virtual Machine or System Image” on page 145 “Import a Virtual Machine, Virtual Appliance, or System Image” on page 146Conversion Process for Importing from Other Formats
On Windows hosts, Workstation 7.0 incorporates the Conversion wizard from the VMware Converter product. Using the Conversion wizard to perform a conversion to VMware virtual machines enables you to do the following: Avoid reinstalling operating systems and applications for system configurations you use often. Overcome legacy migration barriers. Certain legacy systems might be impossible to recreate through reinstallation. Convert a physical machine into a virtual machine. VMware, Inc. 135, Use virtual machines or system images created with products from other companies such as Norton, Symantec, and StorageCraft. Convert virtual appliances that use open virtualization format (OVF). Workstation provides three ways to convert a virtual machine or system image: Using the File > Open command converts and opens a virtual machine or system image quickly. Workstation uses default settings to make the conversion automatically, with no input required from you. The original Microsoft Virtual PC, Symantec Backup Exec System Recovery, StorageCraft ShadowProtect, or Acronis True Image (.vmc, .spf, .sv2i, or .tib) file is unchanged. For all supported file types except .ovf and .ova files, the File > Open command creates a linked clone when it opens the file. If you open a virtual appliance that uses .ovf or .ova files, Workstation creates a full clone. If you attempt to open a virtual machine or system image that is password protected, you are prompted for the password, and Workstation creates a full clone. Using the File > Import or Export command starts the Conversion wizard. It lets you specify the converted virtual machine’s location, whether or not the converted virtual machine shares virtual disks with the original virtual machine or system image, and which versions of VMware products the converted virtual machine is to be compatible with. Using File > Import Windows XP Mode VM command imports a Windows XP Mode virtual machine on Windows 7 hosts. See “Import a Windows XP Mode Virtual Machine” on page 147. The wizard creates a completely new VMware virtual machine based on the input virtual machine or system image. The newly migrated VMware virtual machine retains the configuration of the original virtual machine or image. The migration process can be nondestructive, so you can continue to use the original virtual machine with Microsoft Virtual PC, or the original system image with Symantec Backup Exec System Recovery. However, to run a new VMware virtual machine on the same network as the original Virtual PC virtual machine, you must modify the network name and IP address on one of the virtual machines so the original and new virtual machines can coexist. For Microsoft Virtual PC and Microsoft Virtual Server virtual machines, you have the option of sharing the source virtual hard disk (.vhd) files. This means that the VMware virtual machine can write directly to the original .vhd files instead of VMware virtual hard disk (.vmdk) files. 136 VMware, Inc., Chapter 6 Creating a Virtual Machine from a System Image or Another Virtual MachineVMware Converter Compared to the Conversion Wizard
Workstation 7.0 incorporates the Conversion wizard from the VMware Converter product. VMware Converter is a separate downloadable application for Windows hosts that provides an easy‐to‐use, scalable solution for migrations of machines, both physical to virtual and virtual to virtual. In addition to the Conversion wizard, VMware Converter provides a task manager that lets you schedule migrations of many machines. The Conversion wizard included with Workstation lets you create VMware virtual machines from a local or remote physical machine or from virtual machines and system images that were originally created by using other products than VMware products. You can also use the wizard to change a virtual machine using one VMware format to that using another. For example, you can copy a VMware Server virtual machine and use it to create an ESX virtual machine. To use other features of VMware Converter, such as its task manager, or the ability to import more than one virtual machine at a time, download the VMware Converter.Supported Source Machines
The VMware Conversion wizard in Workstation allows you to import the following types of physical and virtual machines: Physical machines Windows Server 2003 32‐bit and 64‐bit Windows XP Professional 32‐bit and 64‐bit Windows Vista 32‐bit and 64‐bit Windows 7 Professional 32‐bit and 64‐bit Windows 7 Enterprise 32‐bit and 64‐bit Windows 7 Ultimate 32‐bit and 64‐bit VMware virtual machines (.vmx and .vmtn files) Workstation 4.5, 5.x, 6.x, and 7.0 VMware ACE 1.x, 2.x, and 2.6 VMware Fusion 1.x, 2.0.x, and 3.0 VMware Player 1.x, 2.x, and 3.0 ESX Server 3.x VMware, Inc. 137, ESX Server 2.5.x (if the virtual machine is managed with VirtualCenter 2.x) VMware Server 1.x and 2.0. x (if the virtual machine is on the local file system) VirtualCenter 2.x Virtual appliances Appliances that use open virtualization format (.ovf and .ova files) and that use VMware virtual hard disks (.vmdk files). Other virtual machines and system images Acronis True Image 9 (.tib files) StorageCraft ShadowProtect (.spf files) Microsoft Virtual PC 7.x and higher (.vmc files) Any version of Microsoft Virtual Server (.vmc files) Symantec Backup Exec System Recovery (formerly LiveState Recovery) 6.5 and 7.0, LiveState Recovery 3.0 and 6.0 (.sv2i files) Norton Ghost images 9.x and higher (.sv2i files) For guest operating system support, known issues, and installation instructions, see the online VMware Compatibility Guide. Go to the VMware Web site and select Resources > Compatibility Guides, and click the View the Guest/Host OS tab on the VMware Compatibility Guide Web site link. NOTE Virtual machines from Macintosh versions of Microsoft Virtual PC are not supported.Importing from Various Sources
Consider these points when using the Conversion wizard. Physical Machine Source To import a remote machine, you are prompted to supply the computer name or IP address and the user name and password for logging in to the machine with administrative privileges. The user name must take the formSupported Destinations
The Conversion wizard can create virtual machines that are compatible with the following products: Workstation 4.5, 5.x, 6.x, and 7.0 VMware ACE 1.x, 2.x, and 2.6 VMware Fusion 1.x, 2.x, and 3.0 VMware Player 1.x, 2.x, and 3.0 ESX Server 3.x (This destination is not supported if you are importing a remote physical machine.) ESX Server 2.5.x (This destination is supported only by importing through a VirtualCenter 2.x server that manages the 2.5.x ESX Server.) VMware Server 1.x and 2.0.x (if the virtual machine is on the local file system) VirtualCenter 2.x NOTE Workstation 4 virtual machines are compatible with VMware GSX Server 3.0, ESX Server 2.x, and ACE 1.x.Designating a Destination for a Virtual Machine
Consider these points when using the Conversion wizard to specify a destination for a newly created virtual machine. ESX Virtual Machine Destination You must supply the name of the ESX server and the user name and password for logging in. VirtualCenter Virtual Machine Destination You must provide the following information: Name of the VirtualCenter server and the user name and password for logging in. Name of the folder in the VirtualCenter inventory where you want to store the virtual machine. 142 VMware, Inc., Chapter 6 Creating a Virtual Machine from a System Image or Another Virtual Machine Name of the host, cluster, or resource pool within a host or cluster from which the virtual machine is to be run. If you select a cluster in manual mode, you must also choose a specific host. Name of the datastore for the virtual machine’s configuration files and disks. Use the advanced setting to distribute the virtual machine’s disks over multiple datastores. Network Adapters You are prompted to choose from the available networks at the destination location. For more information about networking choices for virtual machines used with Workstation rather than ESX or Virtual Center, see “Common Networking Configurations” on page 288. Optional Guest Operating System Customization You can make changes to the identity of the virtual machine (such as computer name and security ID), networking information, and so on with the wizard. For virtual machines that are converted to ESX virtual machines, you can have the wizard install VMware Tools if the guest operating system is Windows 2000 or later. You can make the following customizations: Computer information Computer name – Alphanumeric name up to 63 characters. Hyphens and underscores are allowed. Security ID (SID) – Optionally, generate a new security ID. Sysprep file location – If the wizard can detect the location, the wizard page displays it. Otherwise, you need to supply the location. Windows licensing information Product ID – Optional. Windows Server license information – For Microsoft Windows 2000 Server and 2003 Server only. Time zone VMware, Inc. 143, Network information Network adapter (interfaces) – Reset to default or make changes. DHCP – Choose between using DHCP to obtain IP addresses or entering them manually. You can also use DHCP to obtain a DNS server address or enter it manually. DNS – Enter DNS suffixes and customize their order to specify the order in which a virtual machine uses them to make connections. WINS – Specify primary and secondary WINS addresses. Workgroup or domain – For workgroups, specify the workgroup name, up to 15 characters. For domains, specify the Windows Server domain, along with the appropriate user name and password.Conversion Impact on Settings
The VMware virtual machine created by the Conversion wizard contains an exact copy of the disk state from your source virtual machine or system image, with the exception of some hardware‐dependent drivers and, sometimes, the mapped drive letters. The following settings from the source computer remain identical: Operating system configuration (computer name, security ID, user accounts, profiles and preferences, and so forth) Applications and data files Each disk partition’s volume serial number Because the target and the source virtual machines or system images have the same identities (name, SID, and so on), running both on the same network can result in conflicts. If you plan to redeploy the source virtual machine or system image, do not run both the source and target images or virtual machines on the same network at the same time. Alternatively, you can resolve the duplicate ID problem by using additional tools, such as the Windows XP System Preparation Tool (Sysprep). For example, if you use the Conversion to test the viability of running a Virtual PC virtual machine as a VMware virtual machine without first decommissioning the original Virtual PC machine, you need to resolve the duplicate ID problem. 144 VMware, Inc., Chapter 6 Creating a Virtual Machine from a System Image or Another Virtual MachineMigration Issues Caused by Hardware Changes
Most migrated applications function correctly in the VMware virtual machine because their configuration and data files have the same location as the source virtual machine. However, applications might not work if they depend on specific characteristics of the underlying hardware such as the serial number or the device manufacturer. When troubleshooting after virtual machine migration, consider the following potential hardware changes: The CPU model and serial numbers (if activated) can be different after the migration. They correspond to the physical computer hosting the VMware virtual machine. The network adapter can be different (AMD PCNet or VMXnet) with a different MAC address. Each interface’s IP address must be individually reconfigured. The graphics card can be different (VMware SVGA card). The numbers of disks and partitions are the same, but each disk device can have a different model and different manufacturer strings. The primary disk controllers can be different from the source machine’s controllers. Applications might not work if they depend on devices that are not available from within a virtual machine.Open a Third-Party Virtual Machine or System Image
The File > Open command lets you convert a virtual appliance, system image, or virtual machine created with software from another company into a VMware virtual machine. To open a third-party virtual machine or system image 1 From the Workstation menu bar, choose File > Open. 2 In the File name field, browse to and open the configuration (.vmx, .vmc, .spf, .ovf, .ova, or .sv2i) file for the virtual appliance, virtual machine, or system image to convert. You can use the field Files of type to filter the files displayed by file extension. VMware, Inc. 145, 3 Click Open. Workstation creates a VMware virtual machine, with a VMware configuration file (.vmx) for the converted virtual machine or system image. The converted virtual machine links to the virtual disks of the original virtual machine or system image unless the source uses open virtualization format (.ovf or .ova files). The original Virtual PC, Symantec Backup Exec System Recovery, or StorageCraft configuration (.vmc, .spf, or .sv2i) file is unchanged. If you open a virtual appliance that uses .ovf or .ova files, Workstation creates a full clone. If you attempt to open a virtual machine or system image that is password protected, you are prompted for the password, and Workstation creates a full clone.Import a Virtual Machine, Virtual Appliance, or System Image
The File > Import or Export command enables you to convert a system image or virtual machine into a VMware virtual machine. Before you begin, review the restrictions and requirements for source and destination virtual machines. See “Supported Source Machines” on page 137 and “Supported Destinations” on page 142. To import a virtual machine, virtual appliance, or system image 1 If you are importing a virtual machine, make sure the virtual machine is powered off. 2 Choose File > Import or Export to launch the VMware Conversion wizard. 3 Complete the wizard pages. The text on the wizard pages changes, depending on the selections you make. For example, on the Source Type page, when you select a source type from the drop‐down list, the text below the list changes to describe which types of virtual machines are included in that source type. As you proceed through the wizard, the navigation pane on the left side of the wizard helps track your progress. Whenever you start a new phase or step, a list expands to display the names of the wizard pages included in that step. When you complete an entire step, the next step expands. To go back to a previous page, click its name in the navigation pane. 146 VMware, Inc., Chapter 6 Creating a Virtual Machine from a System Image or Another Virtual MachineImport a Windows XP Mode Virtual Machine
When you import a Windows XP Mode virtual machine, Workstation creates a linked clone from the parent virtual machine. You cannot use the linked clone if you delete the parent Windows XP Mode virtual machine. For more information on cloning, see “Cloning a Virtual Machine” on page 221. Changes made to the original Windows XP Mode virtual machine through Virtual PC do not affect the virtual machine imported in VMware Workstation. Before you begin, make sure you complete the following tasks: Review the restrictions and requirements for source and destination virtual machines and importing from different sources. See “Supported Source Machines” on page 137 and “Supported Destinations” on page 142. You must have Windows 7 Professional, Enterprise, or Ultimate version of operating system running on your host. Windows XP Mode does not work on unsupported hosts. Download and install the Windows XP Mode virtual machine. To import a Windows XP Mode virtual machine Select File > Import Windows XP Mode VM. A virtual machine is created in the default virtual machine directory. You can power on only one Windows XP Mode virtual machine at a time. VMware, Inc. 147, 148 VMware, Inc.,Getting Started with Virtual Machines 7
This chapter includes the following topics: “Starting a Virtual Machine” on page 150 “Shut Down a Virtual Machine” on page 153 “Download Components” on page 155 “Pausing a Virtual Machine” on page 156 “Encrypting a Virtual Machine” on page 157 “Delete a Virtual Machine” on page 160 “Controlling the Virtual Machine Display” on page 160 “Configuring Video and Sound” on page 174 “Install New Software in a Virtual Machine” on page 181 “Use Host Printers in a Virtual Machine” on page 182 “Use Removable Devices in a Virtual Machine” on page 183 “Configure the Appliance View for a Virtual Machine” on page 184 “Create a Screenshot of a Virtual Machine” on page 185 “Create and Play Back a Movie of a Virtual Machine” on page 186 “Advanced Options for Application Developers” on page 187 VMware, Inc. 149,Starting a Virtual Machine
Starting a virtual machine means displaying its running console so that you can interact with it. Depending on the situation, starting a virtual machine can involve any of the following: To start a virtual machine from the Workstation user interface, you must open the virtual machine and power it on. To start a virtual machine that is running in the background when Workstation is not running, you must open its console from the taskbar on the host. To start a virtual machine that is available from a Web server, you must use a command‐line command to begin streaming the virtual machine and then start it from the Workstation window. To start a virtual machine from the command line, you must use the platform‐specific program and startup options. See “Startup Options for Workstation and Virtual Machines” on page 487.Start a Virtual Machine from the Workstation User Interface
Before you begin, make sure that all of the virtual machine files are accessible to the host where Workstation is installed. You can add the name of the virtual machine to the Favorites list so that you do not need to browse to the file to open the virtual machine. See “Favorites List in the Sidebar” on page 65. To start a virtual machine from the Workstation user interface 1 Start Workstation. For instructions, see “Start Workstation on a Windows Host” on page 55. 2 Choose File > Open and browse to the configuration file (.vmx file) for the virtual machine. See “Virtual Machine Location” on page 152. 3 Choose VM > Power > Power On. If you need to enter the BIOS setup for the guest operating system, choose VM > Power > Power On to BIOS. 150 VMware, Inc., Chapter 7 Getting Started with Virtual Machines 4 Click anywhere inside the virtual machine console to give the virtual machine control of your mouse and keyboard. 5 To log on to the operating system in the virtual machine, type your name and password just as you would on a physical computer.Start a Virtual Machine That Is Running in the Background
If you do not power off a virtual machine when you exit Workstation, the virtual machine continues to run in the background. To start the virtual machine, use the power status icon on the host to open the virtual machine’s console. By default Workstation is configured to display a power status icon in the notification area of the host’s taskbar even when Workstation is not running. If this icon is not visible, before you begin, use the Workspace tab of the Workstation preferences editor to display it. See “Introduction to Workstation Preferences” on page 69. To start a virtual machine that is running in the background 1 Click the power status icon in the notification area of the host’s taskbar. 2 Select a virtual machine from the list that appears in the tooltip. The list contains the virtual machines and teams that belong to the user who is logged in. Workstation starts and displays the console view of the virtual machine.Start a Virtual Machine by Using VM Streaming
Beginning with Workstation 7.0, you can now stream a virtual machine from a Web server. You can start the virtual machine shortly after the download process begins. Before you begin, determine the URL of the virtual machine and verify that the Web server on which it resides is correctly configured. See “Make Virtual Machines Available for Streaming from a Web Server” on page 232. VMware, Inc. 151, To start a virtual machine by using VM streaming 1 Open a command prompt or terminal window. 2 Use the platform‐specific command with the URL of the virtual machine: On Windows hosts, use vmware.exe http://Virtual Machine Location
By default, virtual machine files are stored in the virtual machine’s working directory: On Windows hosts, Workstation stores virtual machines in the My Documents folder of the user who is logged in at the time the virtual machine is created. On Windows Server 2003 and Windows XP, the default folder is: C:\Documents and Settings\Shut Down a Virtual Machine
As with physical computers, you can shut down a guest operating system before you power off the virtual machine or team. You are not required to shut down the guest before you exit Workstation. To exit Workstation but leave the virtual machine running in the background, see “Closing Virtual Machines and Exiting Workstation” on page 73. To shut down a virtual machine 1 In the guest system, shut down the operating system as you would if you were using a physical machine rather than a virtual machine. For example, in Windows XP, click Start > Shut Down. 2 In the Workstation menu bar, choose VM > Power Options > Power Off to turn off the virtual machine. If you use the Power Off command before you shut down the guest operating system, the virtual machine is powered off abruptly. The effect is like using the power button on a physical machine. You can, however, configure the Power Off button in the toolbar to shut down the operating system before powering off. See “Configure Power Off and Reset Options for a Virtual Machine” on page 154. VMware, Inc. 153,Configure Power Off and Reset Options for a Virtual Machine
You can configure the Power Off toolbar button to power off the virtual machine abruptly or to send a signal that gracefully shuts down the guest operating system. Before you begin, make sure VMware Tools is installed in the guest operating system. To perform a graceful shutdown, the VMware Tools service component issues a Shutdown Guest command and runs a script to shut down gracefully. CAUTION Powering off abruptly works the same way a power switch works on a power supply. The power is cut off with no consideration for work in progress. If a virtual machine is writing to disk when it receives a Power Off command, data corruption might occur. Similarly, you can configure the Reset button to work the same way as a reset switch, so that it resets the virtual machine abruptly. Or you can configure the Reset button so that the VMware Tools service sends a restart signal to the guest operating system. It then shuts down gracefully and restarts. Not all guest operating systems respond to a shutdown signal from the Power Off button or to a restart signal from the Reset button. If your operating system does not respond to the signal, shut down or restart from the operating system, as you would with a physical machine. To configure the Power Off and Reset options for a virtual machine 1 Select the virtual machine. The virtual machine can be powered on or off. 2 Choose VM > Settings. 3 Click the Options tab and select Power. 4 In the Power Controls section of the dialog box, set the Power Off button to shut down the guest gracefully or to abruptly power the virtual machine off. The selection you make is reflected in the tooltip you see when you point to the Power Off button. 5 Specify how you want the Reset button to work. 6 If you want to change any of the other settings and need more information, click Help. For UNIX guests, to pass X toolkit options when you power on a virtual machine, see Appendix A, “Appendix: Workstation Command‐Line Reference,” on page 487. 154 VMware, Inc., Chapter 7 Getting Started with Virtual MachinesDownload Components
Workstation lists the components that must be installed to improve the user experience of the product. Before you begin, upgrade to the latest version of Workstation. Check to make sure you have network connectivity. 1 Power on the virtual machine. The Software Updates dialog box appears with a list of components ready for download. If you are connected to the Internet you can decide whether to download the updates or receive a reminder to download later. 2 If you are using a proxy to connect to the Internet, complete the following tasks: a Select VM > Install VMware Tools. The Software Updates dialog box appears. b Complete the proxy credentials to continue, and click OK. The Software Updates dialog box appears with a list of components ready for download. 3 Download the component. Select Download to download the component. Click Hide to minimize the Downloads dialog box in the Workstation status bar. You can click the arrow in the status bar to open the download progress window. Select Do Not Download to bypass the download. Select Remind Later to bypass the download now and receive a reminder later to download the component. 4 (Optional) Click the Always do the selected action check box to apply your preference for future component downloads. Your preference is saved under Edit > Preferences > Updates. VMware, Inc. 155, 5 Power on and log in to the virtual machine. If you have not downloaded the component yet, VMware recommends that you do so at this time. On Windows, an info bar appears to remind you to install the component. If the component you downloaded is a new or upgraded version of VMware Tools, click either Update Tools, Install Tools, or Re‐install Tools and proceed with your installation based on your guest operating system requirements. For more information on installing VMware Tools on various guest operating systems, see “Installing VMware Tools” on page 106.Pausing a Virtual Machine
The pause feature causes a virtual machine to cease operation temporarily, without powering off or suspending. Use the pause feature when a virtual machine is engaged in an lengthy, processor‐intensive activity that prevents you from using your computer to do a more immediate task. When you pause a virtual machine, the display dims and a play button appears, which you can click to unpause the virtual machine. On paused virtual machines that are configured to display on more than one monitor, each monitor has a play button. For virtual machines that belong to a team, you must pause and unpause each virtual machine separately, while it is active. The play button appears just as it does in virtual machines that do not belong to a team. The play button also appears in the thumbnail images of paused team virtual machines that are not currently active.Pause Feature Limitations
The pause feature has the following restrictions: The pause feature does not work when a virtual machine is in Unity mode. You cannot switch to Unity mode when a virtual machine is paused. You cannot switch to exclusive mode when a virtual machine is paused. The pause feature does not work when you are using the record/replay feature or when the replay debugger is attached. The record/replay feature does not work when a virtual machine is paused. When paused, a virtual machine does not send or receive network packets. If a virtual machine is paused for more than a few minutes, some network connections might be interrupted. 156 VMware, Inc., Chapter 7 Getting Started with Virtual Machines If you take a snapshot when the virtual machine is paused, the virtual machine is not paused when you restore that snapshot. Similarly, if you suspend a virtual machine while it is paused, it is not paused when you resume the virtual machine. If you initiate soft power operations when a virtual machine is paused, those operations do not take effect until the virtual machine is unpaused. While a virtual machine is paused, LEDs and devices remain enabled, but device connection changes do not take effect until the virtual machine is unpaused.Pause and Unpause a Virtual Machine
You can pause a virtual machine multiple times ranging from a few seconds to several minutes. Before you begin, make sure you read the feature limitations. For more information, see “Pause Feature Limitations” on page 156. To pause and unpause a virtual machine Select VM > Pause to pause the virtual machine. The virtual machine display dims and a play button appears over the display. Click the play button on the virtual machine display, or deselect VM > Pause to unpause the virtual machine.Encrypting a Virtual Machine
You can secure a virtual machine from unauthorized use by encrypting it and assigning a password to it. After the virtual machine is encrypted, you must enter the password to open the encrypted virtual machine, or to remove encryption from it. CAUTION Be sure to record the password you assign to an encrypted virtual machine. To ensure the security of encrypted virtual machines, Workstation does not provide a way to retrieve a password. In the virtual machine summary tab and in Favorites, encrypted virtual machines are displayed with a lock icon until you enter the password to open the virtual machine. Encryption applies to all snapshots in a virtual machine. If you restore a snapshot in an encrypted virtual machine, the virtual machine remains encrypted, whether or not it was encrypted when the snapshot was taken. If you change the password for an encrypted virtual machine, the new password applies to any snapshot you restore, regardless of the password in effect when the snapshot was taken. VMware, Inc. 157,Restrictions on Encryption
The encryption feature has the following restrictions: A virtual machine must be powered off before you can add or remove encryption, or change the encryption password. The encryption feature works only with virtual machines of virtual hardware version 5.x or later. You can create a linked clone from an encrypted virtual machine, but you cannot encrypt or remove encryption from a virtual machine that is the parent of a linked clone. There is one exception to this restriction. If you use the Conversion wizard (File > Import or Export) to create a linked clone, you can create a linked clone without disabling the encryption feature for the parent virtual machine. If you create a linked clone this way and then encrypt the parent virtual machine, the linked clone cannot read data from the virtual disk of the encrypted parent virtual machine. To fix this problem, unencrypt the parent virtual machine. If you plan to use the encryption feature, VMware recommends that you avoid this potential problem by using VM > Clone to create a linked clone. Workstation disables the encryption feature for the parent of a linked clone that is created with the VM > Clone option. You cannot encrypt virtual machines that are members of a team, and you cannot add an encrypted virtual machine to a team. If more than one unencrypted virtual machines share the same virtual disk, and you encrypt one of the virtual machines, the virtual disk becomes unusable for the unencrypted virtual machines. You cannot encrypt a virtual machines that has a recording. You cannot encrypt ACE virtual machines. If you have an encrypted virtual machine you cannot enable ACE features.Encrypt a Virtual Machine
If you forget your password, Workstation does not provide a way to retrieve it. Before you begin, power off the virtual machine. Make sure you read the feature limitations. For more information, see “Restrictions on Encryption” on page 158. 158 VMware, Inc., Chapter 7 Getting Started with Virtual Machines To encrypt a virtual machine 1 Select VM > Settings. 2 Click the Options tab, and select Encryption. 3 Select Encrypt. 4 Enter the password, and enter the password again to confirm it. Be sure to record the password. 5 Select Encrypt.Remove Encryption from a Virtual Machine
Removing encryption from a virtual machine authorizes users who log in to the host with your credentials to start the virtual machine. Before you begin, power off the virtual machine. Make sure that you remove any sensitive information from the virtual machine. To remove encryption from a virtual machine 1 Select VM > Settings. 2 Click the Options tab, and select Encryption. 3 Select Remove Encryption. 4 Enter your password. 5 Select Remove Encryption.Change the Password for an Encrypted Virtual Machine
If you forget your new password, Workstation does not provide a way to retrieve it. Before you begin, power off the virtual machine. To change the password for an encrypted virtual machine 1 Select VM > Settings. 2 Click the Options tab, and select Encryption. 3 Select Change Password. 4 Enter your current password and the new password, and enter the new password again to confirm it. Be sure to record the new password. VMware, Inc. 159,Delete a Virtual Machine
You can use a Workstation command to delete a virtual machine and all of its files from the host file system. If, instead of deleting the virtual machine altogether, you want to remove it from the Favorites list or from a team, see “Remove an Item from the Favorites List” on page 66 or “Remove a Virtual Machine from a Team” on page 279. CAUTION Do not delete a virtual machine if it was used to make a linked clone virtual machine and you still want to use the linked clone. If the linked clone cannot find the virtual disk files from the parent virtual machine, the linked clone stops working. To delete a virtual machine 1 Select the virtual machine. 2 Make sure the virtual machine is powered off. 3 Choose VM > Delete from Disk.Controlling the Virtual Machine Display
You can control the way Workstation displays virtual machines and their applications. For example, you can use full screen mode to hide the host user interface altogether, or you can use Unity mode so that applications from the virtual machine appear on the host desktop and hide the rest of the virtual machine user interface.Using Unity Mode
In virtual machines with Linux or Windows 2000 or later guest operating systems, you can switch to Unity mode to display applications directly on the host desktop. The taskbar displays items for open applications in Unity mode just as it does for open host applications. The virtual machine console view is hidden, and you can minimize the Workstation window. 160 VMware, Inc., Chapter 7 Getting Started with Virtual Machines You can use keyboard shortcuts to copy, cut, and paste images, plain text, formatted text, and email attachments between applications on your host machine and virtual machine applications displayed in Unity mode. You can also drag and drop and copy and paste files between host and guest. See “Using the Copy and Paste Feature” on page 191 and “Using the Drag‐and‐Drop Feature” on page 189. NOTE If you save a file or attempt to open a file from an application in Unity mode, the file system you see is the file system inside the virtual machine. You cannot open a file from the host operating system or save a file to the host operating system. When a virtual machine is in Unity mode, you can access the virtual machine’s Start menu (for Windows virtual machines) or Applications menu (for Linux virtual machines) by pointing to one of the following locations: On Windows hosts, point to the Start menu. On Linux hosts, point to the upper‐left corner of the primary monitor. For some guest and host operating systems, if you have multiple monitors, application windows in Unity mode can appear only on the monitor that is set as the primary display. If the host and guest are Windows XP or later, the application windows can appear on additional monitors On Windows, Unity mode is not available in the full screen mode. When you cycle through virtual machines, all the virtual machines that are in Unity mode do not appear. NOTE On Linux guests, Unity mode is supported experimentally. Set Preferences for Unity Mode You can configure Unity mode so that you can access a virtual machine’s Start or Applications menu from the host’s desktop. You can also specify the border color around applications that run in Unity mode on the desktop. Accessing a virtual machine’s Start or Applications menu from the host’s desktop enables you to start applications in the virtual machine that are not open in Unity mode. If you do not enable this feature, you must exit Unity mode to display the virtual machine’s Start or Applications menu in the console view. VMware, Inc. 161, To help distinguish between the application windows that belong to various virtual machines, you can give them different colors. For example, you can set the applications for one virtual machine to have a blue border and set the applications for another virtual machine to have a yellow border. You can also set a Workstation preference to minimize the Workstation window when you enter Unity mode. To set preferences for Unity mode 1 Select the virtual machine. 2 Choose VM > Settings. 3 Click the Options tab and select Unity. 4 Complete the settings panel and click OK. Use the following information to determine which features to enable: To identify the application as belonging to this virtual machine rather than the host, use the Show borders check box to set a window border. Use the Show badges check box to display a logo in the title bar. To use a custom color, click the colored rectangle to access the color chooser on Linux hosts. On Windows hosts, click Choose color. If you select the Enable applications menu check box, one of the following menus appears when you point to correct location on the host’s desktop: A Start menu appears on Windows guests. An Applications menu appears on Linux guests. On Windows hosts, point to the Start menu. On Linux hosts, point to the upper‐left corner of the primary monitor. The menu has the same color border as the virtual machine application windows. 5 Repeat this process for each virtual machine that you plan to use in Unity mode. 6 (Optional) To automatically minimize the Workstation window when you enter Unity mode, do the following: a Choose Edit > Preferences. b Click the Display tab. c Select Minimize Workstation when entering Unity and click OK. This Workstation preference is used for all virtual machines. 162 VMware, Inc., Chapter 7 Getting Started with Virtual Machines Enter and Exit Unity Mode In Unity mode, a virtual machine’s applications look like other application windows on the host, except that they have a colored window border and a VMware logo in the window’s title bar. Before you begin, make sure the virtual machine meets these requirements: The virtual machine must be a Workstation 6.x or higher virtual machine. VMware Tools must be installed and running in the virtual machine’s guest operating system. The version of VMware Tools must be the version included in Workstation 7.0. For instructions, see “Installing VMware Tools” on page 106. The guest operating system in the virtual machine must be Linux or Windows 2000 or later. For Linux guests and hosts, VMware recommends that you use a modern version of Metacity or KDE. Performance on Linux depends on a combination of variables such as the system, the applications that are running, and the amount of RAM. To enter and exit Unity mode 1 In the virtual machine, open the applications to use in Unity mode. 2 From the Workstation menu bar, choose View > Unity. A check mark appears next to Unity in the menu. The virtual machine’s console view in the Workstation window is hidden, and the guest’s open applications appear in application windows on the host’s desktop. 3 To exit Unity mode, display the Workstation window and choose View > Unity to remove the check mark next to Unity, or click Exit Unity in the virtual machine’s console view. Access a Virtual Machine’s Start or Applications Menu in Unity Mode If configured to do so, a virtual machine in Unity mode can display a Start or Applications menu above the host’s Start or Applications menu. This feature enables easy access to applications in the virtual machine that are not open in Unity mode. Before you begin, verify that the virtual machine is configured to use this feature. See “Set Preferences for Unity Mode” on page 161. VMware, Inc. 163, To access a virtual machine’s Start or Applications menu in Unity mode 1 To enter Unity mode, power on a virtual machine, open one or more applications, and choose View > Unity from the Workstation menu bar. 2 To display the virtual machine’s Start or Applications menu on the host, do one of the following: Point to the Start menu on Windows hosts or to the upper‐left corner of the primary monitor on Linux hosts. Press Ctrl+Shift+U. If you have multiple virtual machines in Unity mode, you can navigate between multiple Start and Applications menus by using standard navigation keys such as arrow keys, Tab, and Shift+Tab. You can select one by using standard keys such as Enter and the space bar.Use Full Screen Mode
In full screen mode, the virtual machine display fills the screen, so that you cannot see the borders of the Workstation window. Figure 7-1. Full Screen Toolbar on a Windows Host Cycle multiple monitors button Next VM button System menu Selector arrow Before you begin, make sure the guest operating system has VMware Tools installed. See “Installing VMware Tools” on page 106. NOTE If you plan to run the virtual machine in full screen mode on a laptop computer, also set the guest to report battery information. See “Report Battery Information in the Guest” on page 182. To use full screen mode 1 Select the virtual machine and make sure it is powered on. 2 If you have multiple monitors, move the Workstation window into the monitor to use for full screen mode. 164 VMware, Inc., Chapter 7 Getting Started with Virtual Machines 3 Choose View > Full Screen. If you cannot enter full screen mode when the guest’s display mode is smaller than the host’s display mode, try adding the following line to the virtual machine’s configuration (.vmx) file: mks.maxRefreshRate=1000 For more information about the configuration file, see “Files That Make Up a Virtual Machine” on page 99. 4 (Optional) You can perform the following optional tasks: To switch from full screen mode back to windowed mode, which shows the virtual machine inside a Workstation window again, press Ctrl+Alt+Enter. To hide the full screen toolbar and menus while you are using full screen mode, click the push pin icon and move the mouse pointer off of the toolbar. This action unpins the toolbar. The toolbar slides up to the top of the monitor and disappears. To display the toolbar again, point to the top of the screen until the toolbar appears. If you cannot display the full screen toolbar, see “Set Preferences for Autofit, Full Screen Mode, and Unity Mode” on page 166. To switch from one powered‐on virtual machine to another while in full screen mode, do one of the following: To go to a specific powered‐on virtual machine, click the virtual machine arrow, as shown in Figure 7‐1, and select the virtual machine. To go to the next virtual machine, press Ctrl+Alt+right arrow, or press Ctrl+Alt+left arrow to go to the previous virtual machine. Use the VM menu on the toolbar to access the Workstation VM menu commands. Use the System menu to switch to exclusive mode or to use the autofit command to adjust screen resolution on Windows hosts. Use the View menu to switch to Unity mode or exclusive mode, or to use the autofit command to adjust screen resolution on Linux hosts. To display the virtual machine across two or more monitors in full screen mode, see “Use Multiple Monitors for One Virtual Machine” on page 168. VMware, Inc. 165, Set Preferences for Autofit, Full Screen Mode, and Unity Mode You can set preferences for how the display settings of all virtual machines adjust to fit the Workstation window. These adjustments occur when you resize the Workstation window or when you change the display settings inside the guest. You can also configure how the host and guest display settings interact when you enter full screen mode and Unity mode. Before you begin, make sure that VMware Tools is installed in the guest operating systems in the virtual machines. To set preferences for autofit, full screen mode, and Unity mode 1 Choose Edit > Preferences. 2 Click the Display tab. 3 Select one or more check boxes in the Autofit section. 4 Use the following information to help you complete the Full Screen section: Select Autofit guest to change the guest’s resolution settings to match the display settings of the host while you are in full screen mode. Select Stretch guest to retain the guest’s resolution settings but still have the display fill the full screen. This setting is useful if you need to retain a guest’s low‐resolution settings. For example, use this setting to play older computer games that run only at low resolutions. Select Center guest to have both host and guest retain their own display settings while you are in full screen mode. If you deselect Show toolbar edge when unpinned, the edge of the full screen toolbar does not appear. When you place your pointer cursor near the top of the screen the full screen toolbar appears for a few seconds. To display the edge of the full screen toolbar, use the preferences editor and select Show toolbar edge when unpinned again. 5 If you plan to have multiple virtual machines running, with some in Unity mode and some accessible only in the Workstation window, do not select the Minimize Workstation when entering Unity check box. 6 Click OK. 166 VMware, Inc., Chapter 7 Getting Started with Virtual MachinesUse Quick Switch Mode
In quick switch mode, the virtual machine’s screen is resized to fill the screen completely, except for the space that the tabs occupy. Before you begin, make sure the guest operating system has VMware Tools installed. See “Installing VMware Tools” on page 106. Quick switch mode is similar to full screen mode with the addition of tabs at the top of the screen for switching from one virtual machine to another. The other difference is that you can use quick switch mode with virtual machines that are powered on or off. To use quick switch mode 1 Select the virtual machine. 2 Choose View > Quick Switch. 3 (Optional) To view the Workstation menu and toolbar while using quick switch mode, point to the top of the screen. 4 (Optional) To resize a guest operating system’s display so that it fills as much of the screen as possible in quick switch mode, choose View > Fit Guest Now. 5 To exit quick switch mode, point to the top of the screen and choose View > Quick Switch.Use Exclusive Mode
You might want to use exclusive mode to run graphics‐intensive applications, such as games, in full screen mode. Before you begin, make sure the guest operating system has VMware Tools installed. See “Installing VMware Tools” on page 106. Like full screen mode, exclusive mode causes the Workstation virtual machine display to fill the screen. Drawbacks to using exclusive mode include the following: The full screen toolbar is not available in exclusive mode. To configure any virtual machine settings, you need to exit exclusive mode (press Ctrl+Alt). On Windows, exclusive mode does not use multiple monitors. Exclusive mode causes the host resolution to resize, which can cause items on the host desktop to be moved. VMware, Inc. 167, To use exclusive mode 1 Select the virtual machine. 2 Make sure the virtual machine is powered on. 3 If you have multiple monitors, move the Workstation window onto the monitor you want to use. 4 Press Ctrl+Alt+Enter. 5 On the full screen toolbar, do one of the following: On Windows hosts, click the Workstation icon to display the system menu and choose Exclusive Mode. On Linux hosts, click the View menu on the full screen toolbar and choose Exclusive Mode. 6 To exit exclusive mode and return to windowed mode, do the following: a Press Ctrl+Alt to exit exclusive mode and return to full screen mode. b Press Ctrl+Alt+Enter to exit full screen mode and return to the windowed mode.Use Multiple Monitors for One Virtual Machine
If your host has a multiple‐monitor display, you can configure a virtual machine to use two or more monitors. On Windows guests, you do not need to use the Windows display properties settings to configure multiple monitors. Before you begin, make sure the virtual machine meets these requirements: The virtual machine is a Workstation 6.x or higher virtual machine. VMware Tools is installed and running in the virtual machine’s guest operating system. The version of VMware Tools must be the version included in Workstation 7.0. For instructions, see “Installing VMware Tools” on page 106. The guest operating system in the virtual machine is Windows XP, Windows Vista, Windows 7, or Linux. 168 VMware, Inc., Chapter 7 Getting Started with Virtual Machines On the host, the display settings for monitors must be set in a compatible topology. For example, the left‐most monitor cannot be placed lower than any other monitor in the display topology. It does not matter if the monitors have different resolutions or orientations. When entering full screen mode, the monitor that contains the Workstation window cannot be lower than another monitor. Put another way: When you use the Windows display properties controls, if you select a monitor icon and begin to drag it to a new location, a tooltip displays the coordinates. If a coordinate shown for the new location of the icon is a negative number, that location will not work. To use multiple monitors for one virtual machine 1 Choose Edit > Preferences. 2 Click the Display tab and in the Full Screen section, select Autofit guest and click OK. 3 Select a virtual machine. 4 Make sure the virtual machine is powered off. 5 Choose VM > Settings. 6 On the Hardware tab, select Display. If Display does not appear in the list on the Hardware tab, it probably means that the virtual machine is a Workstation 4 or 5.x virtual machine. Only Workstation 6.x or higher virtual machines have this feature. 7 On the settings panel for the Display tab, specify how to determine the number of monitors. In most cases, select Use host setting for monitors. If the virtual machine is run on a host that is using one monitor, the virtual machine detects only one monitor. But if the same virtual machine is moved to a host that is using two monitors, the virtual machine detects two monitors. The number of monitors depends on the number of monitors that the host recognizes at startup. For example, if you power on a laptop that is undocked, the host setting is one monitor, even if you later place the running laptop in a docking station that uses two monitors. VMware, Inc. 169, Similarly, if the host has one monitor and you suspend the virtual machine and change the host to have two monitors, when you resume the virtual machine, it is still configured to use one monitor. You must restart the virtual machine to detect the new settings. You might want to set a specific number of monitors if, for example, you are writing an application to be displayed on multiple monitors but the host you are using has only one monitor. 8 If you set a specific number of monitors, specify a sufficient maximum resolution. The resolution of a host monitor that you use to display the virtual machine must not exceed the Maximum resolution setting that you specify. 9 Power on the virtual machine and choose View > Full Screen. For more information, see “Use Full Screen Mode” on page 164. Make sure the virtual machine is completely powered on. If when you power on the virtual machine, it is set to be restored from a snapshot and if background snapshots are enabled, powering on might take longer. In this case, displaying the virtual machine to two monitors might not work correctly at first. If you see this issue, go to Edit > Preferences > Priority and deselect the check box called Take and restore snapshots in the background. 10 On the full screen toolbar, click the Cycle Multiple Monitors button. This button is available only if the host has multiple monitors. This button is shown in Figure 7‐1, “Full Screen Toolbar on a Windows Host,” on page 164. Clicking the Cycle Multiple Monitors button causes the guest operating system’s desktop to extend to the additional monitor or monitors. If the virtual machine does not appear correctly, use the system menu (on Windows hosts) or the View menu (on Linux hosts) and select Autofit Guest. 11 If you have more than two monitors, and you want the virtual machine to use them, click the Cycle Multiple Monitors button again. The order in which the monitors are used depends on the order in which the monitors were added to the host operating system. 12 To return to using only one monitor, click the Cycle Multiple Monitors button until the display returns to one monitor. 170 VMware, Inc., Chapter 7 Getting Started with Virtual MachinesUse Multiple Monitors for Multiple Virtual Machines
If your host has a multiple‐monitor display, you can run a different virtual machine on each monitor. Before you begin, make sure the guest operating system has VMware Tools installed. See “Installing VMware Tools” on page 106. To use multiple monitors for multiple virtual machines 1 To open multiple Workstation windows, choose File > New > Window. On Linux hosts, although you can have multiple Workstation windows, the windows operate in a single Workstation process, which saves memory and allows preferences and Favorites list items to be shared. 2 (Optional) On Linux hosts, to run separate Workstation processes in different X servers, start the second instance of Workstation with the -W flag. In a terminal window, enter the following command: vmware -W & 3 Start one or more virtual machines in each Workstation window. If you have a virtual machine running in one window and you want to run that virtual machine in another Workstation window, close the virtual machine in the first window before you attempt to open it in another. 4 Drag each Workstation window to the monitor on which you want to use it. 5 To switch mouse and keyboard input from the virtual machine on the first monitor to the virtual machine on the second monitor, move the mouse pointer from one screen to the other and click inside the second monitor.Fitting the Workstation Console to the Virtual Machine Display
The Autofit and Fit commands in the View menu allow you to match the Workstation console with the guest operating system display size. With both Autofit commands toggled off, Workstation does not automatically match window sizes as you work. Scroll bars appear in the console when the Workstation console is smaller than the guest operating system display. A black border appears in the console when the console is larger than the guest operating system display. The Autofit and Fit commands are described in Table 7‐1. VMware, Inc. 171, Table 7-1. Autofit and Fit Commands View Menu Command Description Autofit Window Causes the Workstation console to maintain the size of the virtual machine’s display resolution. If the guest operating system changes its resolution, the Workstation console resizes to match the new resolution. Autofit Guest Causes the virtual machine to resize the guest display resolution to match the size of the Workstation console. Fit Window Now Causes the Workstation console to match the current display size of the guest operating system. Fit Guest Now Causes the guest operating system display size to match the current Workstation console. An Autofit command is toggled on or off each time you select it. If Autofit Window and Autofit Guest are toggled on, you can manually resize the Workstation console, but the guest operating system can also resize the Workstation console. The Fit Window Now or Fit Guest Now command is redundant if the corresponding Autofit command is active because the console and the guest operating system display are the same size. Display Resizing in Linux Guests For Linux guests, the following considerations apply to display resizing: If you have virtual machines that were suspended under a version of VMware Tools earlier than version 5.5, display resizing does not work until the virtual machines are completely powered off and powered on again. (Rebooting the guest operating system is not sufficient.) Update VMware Tools to the latest version in the guest for the display resizing options to work. Before you can use the Autofit Guest and Fit Guest Now options, VMware Tools must be running. 172 VMware, Inc., Chapter 7 Getting Started with Virtual Machines All the restrictions for resizing that the X11 Windows system imposes on physical hosts apply to guests: You cannot resize to a mode that is not defined. The VMware Tools configuration script can add a large number of mode lines, but you cannot resize in 1‐pixel increments as you can in Windows. VMware Tools adds modelines in 100‐pixel increments. This means you cannot resize a guest larger than the largest mode defined in your X11 configuration file. If you attempt to resize larger than that mode, a black border appears and the guest stops increasing. The X server always starts up in the largest resolution that is defined. You cannot avoid this restriction. The XDM/KDM/GDM login screen always appears at the largest size. But Gnome and KDE allow you to specify your preferred resolution, so that you can reduce the guest display size after you log in. Display Resizing in Solaris Guests For Solaris 10 guests, the following considerations apply to display resizing: Update VMware Tools to version 7.0 in the guest for the display resizing options to work. Before you can use the Autofit Guest and Fit Guest Now options, VMware Tools must be running. Solaris 10 guests must be running an Xorg X server and JDS/Gnome.Working with Nonstandard Resolutions
A guest operating system and its applications might react unexpectedly when the Workstation console size is not a standard VESA resolution (640×480, 800×600, 1024×768, and so on). For example, the Autofit Guest and Fit Guest Now commands allow your guest operating system screen resolution to be set smaller than 640×480, but some installers do not run at resolutions smaller than 640×480. Programs might refuse to run. Error messages might include such phrases as VGA Required to Install or You must have VGA to install. VMware, Inc. 173, Use one of the following strategies to work around this problem with nonstandard resolutions: If your host computer’s screen resolution is high enough, you can enlarge the window and choose Fit Guest Now. If your host computer’s screen resolution does not allow you to enlarge the Workstation console sufficiently, you can manually set the guest operating system’s screen resolution to 640×480 or larger.Configuring Video and Sound
For best color and graphics display, you must coordinate host and guest color settings. Workstation also supports games and applications that use DirectX 9 accelerated graphics, but you must perform some 3‐D preparation tasks on the host and guest. With regards to sound support, Workstation usually installs the necessary drivers, but on some of the oldest and newest guest operating systems, you must manually install a driver.Setting Screen Color Depth
The number of screen colors available in the guest operating system depends on the screen color setting of the host operating system. Virtual machines support: 16‐color (VGA) mode 8‐bit pseudocolor 16 bits per pixel (16 significant bits per pixel) 32 bits per pixel (24 significant bits per pixel) If the host is in 15‐bit color mode, the guest operating system’s color setting controls offer 15‐bit mode in place of 16‐bit mode. If the host is in 24‐bit color mode, the guest operating system’s color setting controls offer 24‐bit mode in place of 32‐bit mode. If you run a guest operating system set for a greater number of colors than your host operating system is using, you can encounter problems. In some cases, for example, the colors in the guest are not correct. In others, the guest operating system cannot use a graphical interface. 174 VMware, Inc., Chapter 7 Getting Started with Virtual Machines You can try either of the following solutions: Increase the number of colors available on the host. Decrease the number of colors used in the guest. For best performance, use the same number of colors in the guest and on the host. Changing Screen Color Depth on the Host If you choose to change the color settings on the host operating system, shut down all guest operating systems, power off the virtual machines, and close Workstation. Follow standard procedures for changing the color settings on your host operating system and restart Workstation and the virtual machines. Changing Screen Color Depth in the Guest The approach you take to change the color settings in the guest operating system depends on the guest operating system. Follow the process for changing screen colors in the guest operating system: In a Windows guest, the Display Properties control panel offers only those settings that are supported. In a Linux or FreeBSD guest, you must change the color depth before you start the X server, or you must restart the X server after making the changes.Support for Direct3D Graphics
To take advantage of the 3‐D capabilities of Workstation, the virtual machine must be running the version of VMware Tools included with Workstation 7.0. If you move the virtual machine and want to use the 3‐D capabilities, be sure you have the correct version of VMware Tools installed. Accelerated 3-D Restrictions Support for applications that use DirectX 9 accelerated graphics applies only to Windows XP guests, on hosts running Windows XP, Windows Vista, Windows 7, or Linux. This feature currently has the following restrictions: Workstation now offers support for DirectX games and applications with DirectX versions 9 and lower. Support for 3‐D applications is not optimized for performance. VMware, Inc. 175, OpenGL applications run in software emulation mode. You cannot use the record/replay feature to record a 3‐D application. Prepare a Host for Accelerated 3-D By default, Direct3D technology is enabled for Workstation 6.x and later virtual machines. You must prepare the host first, the virtual machine second, and the guest operating system last. Before you begin, make sure the host operating system is Windows XP, Windows Vista, Windows 7, or Linux. For Windows hosts, make sure you have a video card that supports DirectX 9 and the latest DirectX Runtime. For Linux hosts, make sure the host has a video card that can run accelerated OpenGL 2.0. If you are unsure, check with your hardware manufacturer. To prepare a host for accelerated 3-D 1 Upgrade the host’s video drivers to the latest version available: a ATI Graphics drivers are available from the AMD Web site. b NVIDIA drivers are available from the NVIDIA Web site. 2 If you are using a Windows host, turn up hardware acceleration in the display properties: On Windows XP, right‐click the desktop and choose Properties > Settings > Advanced > Troubleshoot. On Windows Vista, right‐click the desktop and choose Personalize > Display Settings > Advanced Settings > Troubleshoot > Change settings. On Windows 7, right‐click the desktop and choose Personalize > Screen resolution > Advanced Settings> Troubleshoot > Change settings. Move the Hardware Acceleration slider all the way to the Full position. 3 If you are using Linux, test your Linux host for compatibility: a To verify that direct rendering is enabled, run: glxinfo | grep direct b To ensure that 3‐D applications work on your host, run: glxgears After your host is configured, configure a virtual machine for accelerated 3‐D. 176 VMware, Inc., Chapter 7 Getting Started with Virtual Machines Prepare a Virtual Machine for Accelerated 3-D Before you begin, make sure the guest operating system is Windows XP, Windows Vista, or Windows 7. To prepare a virtual machine for accelerated 3-D 1 Select the virtual machine. 2 Make sure the virtual machine is powered off rather than suspended. 3 Choose VM > Settings. 4 On the Hardware tab, select Display. 5 In the Monitors section, if the virtual machine is set to use more than one monitor, set it to use only one monitor. 6 In the 3D Graphics section, make sure the check box is selected and click OK. Prepare the Guest Operating System for Accelerated 3-D Before you begin, make sure the guest operating system is Windows XP, Windows Vista, or Windows 7 and make sure the latest version of VMware Tools is installed. See “Installing VMware Tools” on page 106. To prepare the guest operating system for accelerated 3-D 1 Power on the virtual machine. 2 Install DirectX 9.0c End User Runtime. This download is available from Microsoft Download Center. 3 Install and run your 3‐D applications.Configuring Sound
Workstation provides a sound device compatible with the Sound Blaster AudioPCI and supports sound in Windows 95, Windows 98, Windows Me, Windows NT, Windows XP, Windows Vista, Windows 7, Windows Server 2003, and Linux guest operating systems. The Workstation sound device is enabled by default. Sound support includes pulse code modulation (PCM) output and input. For example, you can play .wav files, MP3 audio, and Real Media audio. MIDI output from Windows guests is supported by the Windows software synthesizer. MIDI input is not supported, and no MIDI support is available for Linux guests. VMware, Inc. 177, Workstation 7.0 for Linux supports Advanced Linux Sound Architecture (ALSA). Windows XP, Windows Vista, Windows 7 and most recent Linux distributions detect the sound device and install appropriate drivers for it. For Windows Vista or Windows 7, when you install VMware Tools in a 64‐bit Windows Vista or Windows 7 guest operating system, a sound driver is installed. For 32‐bit Windows Vista and Windows 7 guests and Windows 2003 Server guests, use Windows Update to install a 32‐bit driver. Installing Sound Drivers in Windows 9x and NT Guests Windows 95, Windows 98, Windows 98SE, and Windows NT 4.0 do not have drivers for the Sound Blaster AudioPCI adapter. To use sound in these guest operating systems, download the driver from the Creative Labs Web site and install it in the guest operating systems. Creative Labs has Web sites that serve different regions of the world. The adapter name varies, depending on the region, but usually includes PCI 128. Using Advanced Linux Sound Architecture (ALSA) Workstation 7.0 supports Advanced Linux Sound Architecture (ALSA). Earlier versions of Workstation used the Open Sound System (OSS) interface for sound playback and recording in virtual machines running on Linux hosts. Unlike OSS, ALSA does not require exclusive access to the sound device. The host machine and multiple virtual machines can play sound at the same time. Before you can use ALSA in a VMware virtual machine, your system must meet the following requirements. The ALSA library version on the host system must be version 1.0.16 or later. The sound card on your host machine must support ALSA.The alsa‐project.org Web site maintains a current listing of sound cards and chipsets that support ALSA. The current user must have the appropriate permissions to access the sound device. The sound device on the host must not be muted. You can use the alsamixer graphical mixer program to ensure that the sound device is not muted. Enter alsmixer from a command prompt. Documentation for the alsamixer program is available on the Internet. 178 VMware, Inc., Chapter 7 Getting Started with Virtual Machines Obtaining Sound Card Information You can obtain information about the sound cards on your Linux host system from the command line. To obtain sound card information by using the command line At a command prompt, enter one of the following commands. Command Description lspci | grep -i audio To list the name and type of the sound chipset on your host machine cat /proc/asound/cards To list the sound cards on your host machine alsamixer To determine whether the current user has the appropriate permissions to access the sound device If the current user does not have permissions, an error similar to the following message appears: alsamixer: function snd_ctl_open failed for default: No such device. Give the user read, write, and execute permissions to the directory containing the ASLA sound device. Typically, the ALSA sound device is found in /dev/snd/, but this location may vary, depending on your distribution of Linux. Using ALSA in a Virtual Machine You can configure your virtual machine to use ALSA in the Virtual Machine Settings dialog box. To use ALSA in a virtual machine 1 Select VM > Settings. 2 On the Hardware tab, select Sound Card. 3 Make sure that the Connected and Connect at power on check boxes are checked. 4 Select one of the Connection check boxes. Command Description Use default host sound card To have Workstation detect the host sound card Specify host sound card To choose a sound card. Make a selection from the drop‐down menu. The drop‐down menu displays PCM devices for every sound card on the host system. 5 Click Save. VMware, Inc. 179, Using an ALSA Sound Device that Does Not Appear in Virtual Machine Settings Follow this procedure to use an ALSA sound device that does not appear in Virtual Machine Settings. To use an ALSA sound device that does not appear in Virtual Machine Settings 1 Determine the name of the ALSA sound device. Using the alsa-utils package, at a command prompt, enter aplay -L to list ALSA sound devices on your system. 2 Select VM > Settings. 3 On the Hardware tab, select Sound Card. 4 Make sure the Connected and Connect at power on check boxes are checked. 5 Select Specify host sound card and enter the name of the ALSA sound device to use, for example front:CARD=Intel,DEV=0 6 Click Save. Overriding the ALS Library Version Requirement If your host system does not meet ALSA requirements or for some other reason cannot use ALSA, Workstation uses the OSS API for sound playback and recording. Depending on the sound card in the host computer, the sound quality might not be as good with an older version of the ALSA library. VMware recommends that you upgrade the host system to use newer sound drivers and libraries. If the host system has an older version of the ALSA library, you can override the requirement for version 1.0.16. To override the ALSA library version requirement 1 Open the .vmx virtual machine configuration file with a text editor. 2 Add the option sound.skipAlsaVersionCheck = "TRUE". 180 VMware, Inc., Chapter 7 Getting Started with Virtual MachinesInstall New Software in a Virtual Machine
Installing new software in a virtual machine is like installing it on a physical computer. Only a few additional steps are required. To install new software in a virtual machine 1 Select the virtual machine. 2 Choose VM > Removable Devices and verify that the virtual machine has access to the CD‐ROM drive, ISO image file, or floppy drive where the installation software is located. For more information, see “Add DVD or CD Drives to a Virtual Machine” on page 252. 3 Choose VM > Settings and use the Memory settings panel on the Hardware tab to set the final memory size for the virtual machine. Some applications use a product activation feature that creates a key based on the virtual hardware in the virtual machine where it is installed. Changes in the configuration of the virtual machine might require you to reactivate the software. To minimize the number of significant changes, set the memory size. 4 Install VMware Tools in the guest operating system. See “Installing VMware Tools” on page 106. Installing VMware Tools before installing the new application also minimizes the likelihood of requiring you to reactivate the software. 5 Install the new application according to the manufacturer’s instructions.Disable Acceleration If a Program Does Not Run
Occasionally, when you install or run software inside a virtual machine, Workstation appears to stop responding. In many cases, you can get past the problem by temporarily disabling acceleration in the virtual machine. If this problem occurs, it usually occurs early in the program’s execution. To disable acceleration 1 Select the virtual machine. The virtual machine can be powered off or on. 2 Choose VM > Settings. VMware, Inc. 181, 3 On the Hardware tab, select Processors. 4 In the Execution Mode section, select Disable acceleration for binary translation and click OK. This setting slows down virtual machine performance. VMware recommends that you use the setting only for getting past the problem with running the program. 5 After you pass the point where the program encountered problems, repeat Step 2 through Step 4 and deselect Disable acceleration for binary translation.Report Battery Information in the Guest
If you run a virtual machine on a laptop in full screen mode, configure the option to report battery information in the guest. This way, you can determine when the battery is running low. To report battery information in the guest 1 Select the virtual machine. 2 Make sure the virtual machine is powered off. 3 Choose VM > Settings. 4 Click the Options tab and select Power. 5 Select the Report battery information to guest check box and click OK.Use Host Printers in a Virtual Machine
You can print from the virtual machine to any printer available to the host computer without installing additional drivers in the virtual machine. The Workstation virtual printer feature uses ThinPrint technology to replicate the host machine printer mapping in the virtual machine. When you enable the virtual printer, Workstation configures a virtual serial port to communicate with the host printers. 182 VMware, Inc., Chapter 7 Getting Started with Virtual Machines To use host printers in a virtual machine 1 Select the virtual machine. 2 Select VM > Settings. 3 On the Hardware tab, select Add. 4 In the Add Hardware Wizard dialog box, select Virtual Printer and Finish. The default device setting is to connect the virtual printer when the virtual machine is powered on. When the ACE Virtual Printer policy is enabled, Virtual Printer is available and cannot be removed until the ACE Virtual Printer policy is disabled.Use Removable Devices in a Virtual Machine
You can configure a number of removable devices for use in a virtual machine, including floppy drives, DVD/CD‐ROM drives, USB devices, smart card readers, and network adapters. Some devices cannot be used by the host and guest or by multiple guests at the same time. For example, if the host is using a floppy drive, you must connect it to the virtual machine before you can use it in the virtual machine. To use it on the host again, you must disconnect it from the virtual machine. By default, floppy drive is not connected when the virtual machine powers on. For information about how to add or configure specific devices, see Chapter 16, “Connecting Devices,” on page 333 and Chapter 11, “Using Disks and Disk Drives,” on page 237. To use removable devices in a virtual machine 1 Select the virtual machine. 2 Make sure the virtual machine is powered on. 3 Choose VM > Removable Devices >Configure the Appliance View for a Virtual Machine
To have a virtual machine function as an appliance, such as a Web server with a browser‐based interface, set the virtual machine to display its appliance view when starting up. Before you begin, verify that the virtual machine is a Workstation 6.x or higher virtual machine. For instructions on upgrading, see “Change the Version of a Virtual Machine” on page 96. The appliance view does the following: Displays a brief description of the type of server or appliance Provides a link that opens the browser on the host system and connects to the appliance’s management console NOTE The appliance view cannot be displayed for virtual machines that are part of a team, just as the summary view is not displayed for individual members of a team. To configure the appliance view for a virtual machine 1 (Optional) To use a logo in the appliance view, create a PNG or BMP image file that is no larger than 256 x 256 pixels and place it in the directory that contains the .vmx file for the virtual machine. 2 Select the virtual machine. The virtual machine can be powered on or off. 3 Choose VM > Settings. 4 Click the Options tab and select Appliance View. 5 Select the Enable appliance view check box. 184 VMware, Inc., Chapter 7 Getting Started with Virtual Machines 6 Complete the fields on this settings panel to create the text and images that users see when the virtual machine starts up. Use the following information to configure the settings on this panel: Only the Name field is required. Specify the TCP/IP port number for the appliance to use to serve HTTP content. If you do not select Switch to appliance view at power on, the console view appears instead of the appliance view. Often the console view shows only a simple display of the virtual machine’s IP address and tells the user to open a browser. 7 Click OK. When a user starts this virtual machine, the appliance view appears. A “powering on” message appears, followed by a link to access the appliance’s management console.Create a Screenshot of a Virtual Machine
You can capture a screenshot of a virtual machine and save it to the clipboard, to a file, or both. On Linux hosts, saving to the clipboard works only on systems running Gnome 2.12 or higher. By default, the image is saved as a portable network graphics (.png) file. On Windows hosts, you can also save it as a bitmap (.bmp) file. To create a screenshot of a virtual machine 1 Specify your preferences for taking screenshots: a From the Workstation menu bar, choose Edit > Preferences. b On the Workspace tab, use the Save screenshots to check boxes to specify whether to save the screenshot to the clipboard, a file, or both. c If you select File, specify whether to save the file to your desktop or to be prompted for the location when you take the screenshot. If you select Save to desktop, the filename is generated automatically from the virtual machine name and the time at which the screenshot is taken. The file format is .png file. On Windows hosts, if you select Ask for location, when you are prompted for the filename and path, you can also change the file format to bitmap. d Click OK. VMware, Inc. 185, 2 To take the screenshot, do one of the following: From the Workstation menu bar, choose VM > Capture Screen. Press Ctrl+Alt+PrtScr (on Windows hosts) or Shift+Ctrl+PrtScr (on Linux hosts). The keyboard shortcut works regardless of whether mouse and keyboard input is currently grabbed by the virtual machine or the host. The key combination Ctrl+Alt+PrtScr assumes that your virtual machine is configured to ungrab keyboard and mouse input if you press Ctrl+Alt. If you configured a different shortcut for ungrabbing input, use that shortcut with the PrtScr key. See “Change the Hot‐Key Combination” on page 76.Create and Play Back a Movie of a Virtual Machine
You can capture a movie of your screen activity within a virtual machine. Before you begin, make sure you have the VMware movie decoder. Although you can capture a movie on Linux, you need to play it back on a Windows machine. The VMware CODEC (coder‐decoder) is automatically installed with Workstation on Windows hosts. A separately downloadable installer is also available to play back movies on Windows machines without Workstation. Go to the Downloads page on the VMware Web site and click the Tools & Drivers tab on the VMware Workstation download page. NOTE To actually record the execution of the virtual machine instead of creating a movie, see Chapter 12, “Recording and Replaying Virtual Machine Activity,” on page 259. You might want to record virtual machine execution for debugging purposes or to exactly reproduce the steps that cause a certain behavior. To create and play back a movie of a virtual machine 1 Select the virtual machine. 2 Make sure the virtual machine is powered on. 3 Choose VM > Capture Movie. 186 VMware, Inc., Chapter 7 Getting Started with Virtual Machines 4 In the Save File dialog box, enter information for your movie and click Save. Use the following guidelines: The Quality setting determines the compression and therefore the file size of the resulting movie. If you select Omit frames in which nothing occurs, the movie includes only those periods when something is actually happening in the virtual machine. This reduces the file size and length of the movie. While movie capture is active, a red circle (a virtual LED) appears in the notification area of the taskbar. 5 In the virtual machine, perform the actions to appear in the movie. 6 To stop the movie, choose VM > Stop Movie Capture. If you do not want to use the menu bar or if you are using the virtual machine in full screen mode, right‐click the movie capture icon and choose Stop Movie Capture. Workstation saves this image as an .avi file on the host. 7 Play the movie back in any compatible media player.Advanced Options for Application Developers
Application developers can use the following APIs, SDKs, and IDEs when writing and debugging applications that run in virtual machines: VIX API for writing programs to automate virtual machine operations – The API is high‐level, easy to use, and practical for both script writers and application programmers. API functions allow you to register, power on or off virtual machines, and run programs in the guest operating systems. Additional language bindings are available for Perl, COM, and shell scripts (vmrun). For more information, see the VMware VIX API Release Notes. VAssert API for inserting replay‐only code to debug applications – The experimental VAssert feature enables you to use virtual assertions as you would regular assertions in the applications you develop. VAsserts appear only when you replay a recording of using the application and so are overhead free. This API is currently available only for Windows guests. See the VAssert Programming Guide. VMware, Inc. 187, VProbes tool for investigating guest behavior – You can write VProbes scripts that inspect and record activities in the guest, VMM, VMX, and virtual device state, without modifying that state. For example, VProbes can track which applications are running or indicate which processes are causing page faults. See the VProbes Programming Reference. VMCI Sockets interface – This feature is a sockets interface for the Virtual Machine Communication Interface, which provides a faster means of communication among applications running on the host and in virtual machines. This feature is well‐suited for developers who want to write client‐server applications. See the VMCI Sockets Programming Guide. Integrated Virtual Debuggers for Visual Studio and Eclipse – The integrated development environment (IDE) plug‐ins provide a configurable interface between virtual machines and Visual Studio or Eclipse that lets you test, run, and debug programs in virtual machines. See the Integrated Virtual Debugger for Eclipse Developer’s Guide and Integrated Virtual Debugger for Visual Studio Developer’s Guide. 188 VMware, Inc.,Transferring Files and Text Between the Host and Guest 8
This chapter discusses how to transfer files between the host and guest. This chapter includes the following topics: “Using the Drag‐and‐Drop Feature” on page 189 “Using the Copy and Paste Feature” on page 191 “Using Shared Folders” on page 192 “Using a Mapped Drive” on page 200Using the Drag-and-Drop Feature
Using the drag‐and‐drop feature, you can move files and directories, email attachments, plain text, and formatted text between Linux and Windows hosts and Linux, Windows, and Solaris 10 guests. You can also move images between Windows hosts and guests. To use the drag‐and‐drop feature, VMware Tools must be installed on the virtual machine. This feature requires Linux hosts and guests to run X Windows and Solaris 10 guests to run an Xorg X server and JDS/Gnome. You can drag files or directories between the following locations: A file manager, such as Windows Explorer, on the host to a file manager in the virtual machine and the reverse. A file manager to an application that supports drag‐and‐drop. Applications such as zip file managers that support drag‐and‐drop extraction of individual files. One virtual machine to another. VMware, Inc. 189, When you drag a file or folder from host to virtual machine or the reverse, Workstation copies the file or folder to the location where you drop it. For example, if you drop a file on the desktop icon of a word processor, the word processor opens with a copy of the original file. The original file does not reflect any changes you make to the copy. Initially, the application opens using a copy of the file that is stored in your temp directory. On Windows, this is the directory specified in the %TEMP% environment variable, and on Linux and Solaris, it is the /tmp/VMwareDnD directory. To protect any changes you make, select File > Save As from the application menu and save the file in a different directory. You can drag images between applications on Windows hosts and applications only on Windows guests, in either direction. You can also drag plain text, formatted text, and email attachments between applications on Windows and Linux hosts and guests in any combination, in either direction. Dragging email attachments is especially useful in Unity mode. The drag‐and‐drop feature has the following restrictions: Dragging email attachments is restricted to images or files smaller than 4MB. Dragging plain text and formatted text (including the formatting) is restricted to amounts less than 4MB. Dragging text is restricted to text in languages that can be represented by Unicode characters. Workstation uses the PNG format to encode images that are dragged. Dragging images is restricted to images smaller than 4MB after conversion to PNG format. Dragging images is not supported for Linux hosts or guests. On Windows 95 and Windows 98 guests, the drag‐and‐drop feature is supported only for files and directories.Enable or Disable the Drag-and-Drop Feature
To prevent dragging and dropping between virtual machines and the host, disable the drag‐and‐drop feature. Before you begin, make sure VMware Tools is installed on the virtual machine. To enable or disable the drag-and-drop feature 1 Start Workstation and select the virtual machine. 2 Choose VM > Settings. 190 VMware, Inc., Chapter 8 Transferring Files and Text Between the Host and Guest 3 Click the Options tab and select Guest Isolation. 4 Select or deselect the Enable drag and drop check box and click OK.Using the Copy and Paste Feature
To use the copy and paste feature, VMware Tools must be installed on the virtual machine. This feature requires Linux hosts and guests to run X Windows and Solaris 10 guests to run an Xorg X server and JDS/Gnome. The copy and paste feature works with Linux and Windows hosts and Linux, Windows, and Solaris 10 guests. You can cut, copy, and paste text from one virtual machine to another, and you can cut, copy, and paste text between applications in two virtual machines. You can also cut, copy, and paste images, plain text, formatted text, and email attachments between applications on Windows and Linux hosts and guests in any combination, in either direction. Copying and pasting email attachments is especially useful in Unity mode. Use the normal hot keys or menu choices to cut or copy and paste. The copy and paste feature has the following restrictions: Copying and pasting email attachments is restricted to images or files smaller than 4MB. Copying and pasting plain text and formatted text (including the formatting) is restricted to amounts less than 4MB. Copying and pasting text is restricted to text in languages that can be represented by Unicode characters. Workstation uses the PNG format to encode images that are copied and pasted. Copying and pasting images is restricted to images smaller than 4MB after conversion to PNG format. You cannot copy and paste files between virtual machines. On Windows 95 and Windows 98 guests, copying and pasting is restricted to plain text in amounts less than 64KB. VMware, Inc. 191,Enable or Disable the Copy and Paste Feature
To prevent copying and pasting between virtual machines and the host, disable the copy and paste feature. Before you begin, VMware Tools must be installed on the virtual machine. To enable or disable the copy and paste feature 1 Select the virtual machine. 2 Select VM > Settings. 3 Click the Options tab and select Guest Isolation. 4 Select or deselect the Enable copy and paste check box and click OK.Using Shared Folders
With shared folders you can share files among virtual machines and the host computer. You choose a directory on the host or on a network directory that is accessible to the host, and you give it the name you want to use on the guest. You can use shared folders with virtual machines running the following guest operating systems and on all supported host systems: Windows Server 2003 Windows XP Windows 2000 Windows NT 4.0 Windows Vista Windows 7 Linux with a kernel version of 2.6 or higher Solaris x86 10 Solaris x86 10 Update 1 and higher 192 VMware, Inc., Chapter 8 Transferring Files and Text Between the Host and GuestSet Up Shared Folders
Shared folders provide an easy way to share files among virtual machines, and between virtual machines and the host. The directories you add as shared folders can be on the host computer or they can be network directories accessible from the host computer. Before you begin, make sure the following prerequisites are satisfied: Make sure the virtual machines use a guest operating system that supports shared folders. For a list of supported guest operating systems, see “Using Shared Folders” on page 192. Verify that the current version of VMware Tools is installed in the guest. See “Installing VMware Tools” on page 106. Check permission settings. Access to files in the shared folder is governed by permission settings on the host computer. For example, if you are running Workstation as a user named User, the virtual machine can read and write files in the shared folder only if User has permission to read and write them. For information about how permission setting are mapped between Linux and Windows, see “Improved Handling of Permissions” on page 200. To set up a folder for sharing between virtual machines, configure each virtual machine to use the same directory on the host system (or on the network). To set up shared folders 1 Start Workstation and select a virtual machine. 2 Choose VM > Settings. 3 Click the Options tab and select Shared Folders. 4 Select Always enabled or Enabled until next power off or suspend. You can select Enabled until next power off or suspend only when the virtual machine is powered on. This setting enables folder sharing temporarily, until you shut down, suspend, or restart the virtual machine. You must select this option or Always enabled to enable or disable specific folders in the Folders section. 5 (Optional) For easy access, select the Map as a network drive in Windows guests check box to map a drive to the Shared Folders directory. This directory contains all the shared folders you enable. The drive letter is selected automatically. VMware, Inc. 193, 6 Click Add. On Windows, clicking Add starts the Add Shared Folder wizard. On Linux, it opens the Shared Folder Properties dialog box. 7 Use the following information to complete the wizard or Properties dialog box: Name – Name that appears inside the virtual machine. Characters that the guest operating system considers illegal in a share name appear differently when viewed inside the guest. For example, if you use an asterisk in a share name, you see %002A instead of * in the share name on the guest. Illegal characters are converted to their ASCII hexadecimal value. Host folder – Path on the host to the directory that you want to share. If you specify a directory on a network share, such as D:\share, Workstation always attempts to use that path. If the directory is later connected to the host on a different drive letter, the shared folder cannot be located. Enabled or Enable this share – Deselect this option to disable a shared folder without deleting it from the virtual machine configuration. You can enable the folder by selecting the check box next to its name in the list. To enable a folder at a later time select its name in the list, click Properties, and enable the folder in the Properties dialog box. Read‐only – Select this option to prevent the virtual machine from changing the contents of the shared folder in the host file system. Access to files in the shared folder is also governed by permission settings on the host computer. To change these properties, use the Properties dialog box. On Windows, after you select Shared Folders on the Options tab, click Properties. 8 (Optional) To enable shared folders for a virtual machine after a shared folder is created, on the Shared Folders settings panel, use the Folder Sharing section: Select Enabled until next power off or suspend to enable folder sharing temporarily, until you power off or suspend the virtual machine. If you select Enabled until next power off or suspend and restart the guest or use the guest operating system to shut down, shared folders are not disabled when you restart the virtual machine. Select Always enabled to enable or disable specific folders in the Folders section. 194 VMware, Inc., Chapter 8 Transferring Files and Text Between the Host and Guest 9 Access the enabled shared folder: For Windows guests, see “View Shared Folders in a Windows Guest” on page 197. On Linux guests, shared folders appear under /mnt/hgfs. On Solaris guests, shared folders appear under /hgfs.Enabling and Disabling Shared Folders
You can enable shared folders for virtual machines created by other users, enable or disable all folder sharing for a specific virtual machine, and enable a specific shared folder for a virtual machine. CAUTION Enabling all shared folders can pose a security risk because a shared folder might enable existing programs inside the virtual machine to access the host file system without your knowledge. Enable Shared Folders for Virtual Machines Created By Other Users A shared folder is disabled by default if it was not created by the user who powers on the virtual machine. This is a security precaution. Folder sharing is also disabled by default for Workstation 4 and 5.x virtual machines regardless of who created the folder. To enable shared folders for virtual machines created by other users 1 Choose Edit > Preferences. 2 On the Workspace tab, in the Virtual Machines section, select Enable all shared folders by default. This setting applies to shared folders on all virtual machines that are created by other users, such as appliance developers. You can now specify which virtual machines can share folders and which folders can be shared. Enable or Disable Folder Sharing for Specific Virtual Machines To reduce the security threat of enabling all shared folders, you must specify whether a specific virtual machine is allowed to share folders and then specify which folders to share. VMware, Inc. 195, To enable or disable folder sharing for specific virtual machines 1 Select a virtual machine. 2 Choose VM > Settings. 3 Click the Options tab and select Shared Folders. 4 Use the buttons in the Folder Sharing section to enable or disable shared folders and click OK. You can select Enabled until next power off or suspend only when the virtual machine is powered on. This setting enables folder sharing temporarily, until you shut down, suspend, or restart the virtual machine. You must select this option or Always enabled to enable or disable specific folders in the Folders section. 5 If the virtual machine has a Windows operating system, select whether to map a network drive. On Windows, if you disable shared folders, after you power on a virtual machine and attempt to select a mapped drive to the shared folder, you receive a message that the connection cannot be made. After you enable folder sharing for a virtual machine, specify which folders can be shared. Specify Which Folders to Share Before you begin, make sure the virtual machine is allowed to share folders. See “Enable or Disable Folder Sharing for Specific Virtual Machines” on page 195. To specify which folders to share 1 Select the virtual machine. 2 Choose VM > Settings > Options > Shared Folders. 3 In the Folders list for the virtual machine, select the check box next to the name of the shared folder that you want to enable. 4 (Optional) To make the shared folder read‐only, select the shared folder and click Properties, select the read‐only check box and click OK. 196 VMware, Inc., Chapter 8 Transferring Files and Text Between the Host and GuestViewing a Shared Folder
Viewing shared folders in a guest varies based on whether the guest operating system is Windows, Solaris, or Linux. You can use shared folders to share any type of files. To determine which folders on the host are being shared with a virtual machine, choose VM > Settings > Options > Shared Folders to see a list of the shared folders and the directory paths to them. CAUTION Do not open a file in a shared folder from more than one application at a time. For example, do not open the same file using an application on the host operating system and another application in the guest operating system. If one of the applications writes to the file, data corruption can occur. View Shared Folders in a Windows Guest In a Windows guest operating system, you can view shared folders using desktop icons. NOTE If your guest operating system has VMware Tools from Workstation 4.0, shared folders appear as folders on a designated drive letter. To view shared folders in a Windows guest Look in My Network Places > Entire Network (Network Neighborhood for a Windows NT guest, or Network for Windows Vista and Windows 7) under VMware Shared Folders. If you have trouble finding a shared folder using the desktop icon, open Windows Explorer and look in My Network Places (or Network Neighborhood). To view a specific shared folder, do one of the following: Navigate to it on the guest system by opening My Network Places > Entire Network > VMware Shared Folders > vmware‐host > Shared Folders >Permissions and Folder Mounting for Shared Folders on Linux Guests
The version of VMware Tools included in Workstation 7.0 contains performance improvements, support for symbolic links if you use a Linux host, a new mechanism for mounting shared folders, and permissions enhancements. Performance Improvements Host‐guest file sharing is integrated with the guest page cache. Files in shared folders are cached for reading and can be written to asynchronously. However, you do not experience the read caching benefits on files that are being actively written to from the guest. To speed performance, use the ttl (time to live) option to the mount command. Use this option to specify the interval used by the hgfs (host‐guest file system) driver for validating file attributes. For example, if you use the following command, attributes are validated every 3 seconds instead of every 1 second, which is the default: mount -o ttl=3 -t vmhgfs .host:/Using a Mapped Drive
You can map a virtual disk to a host instead of using shared folders or copying data between a guest and host. In this case, you can map a virtual disk in a host file system as a separate mapped drive. Using a mapped drive lets you connect to the virtual disk without going into a virtual machine. After you map the virtual disk to a drive on the host, you cannot power on any virtual machine that uses that disk until you disconnect it from the host. You can use Workstation to map the disk to a drive on the host, and to disconnect the drive. On Windows, if you attempt to use the host’s My Computer > Tools > Disconnect Network Drive command, you will not see the mapped drive letter in the list of network drives. 200 VMware, Inc., Chapter 8 Transferring Files and Text Between the Host and GuestMap or Mount a Virtual Disk to a Drive on the Host
Before you begin to map a virtual disk, make sure that all virtual machines that use the disk are powered off. Also, take the following considerations into account: You can mount volumes formatted with FAT (12/16/32) or NTFS only. If the virtual disk has a mix of partitions (volumes) where, for example, a partition is unformatted or is formatted with a Linux operating system and another partition is formatted with a Windows operating system, you can mount the Windows partition only. You can mount a virtual disk that has a snapshot, but if you write to the disk, you can irreparably damage a snapshot or linked clone previously created from the virtual machine. You cannot mount a virtual disk if any of its .vmdk files are compressed or have read‐only permissions. Change these attributes before mounting the virtual disk. You cannot map or mount a virtual disk that is encrypted. CAUTION VMware recommends that you leave the check box Open file in read‐only mode selected in the Map a Virtual Disk dialog box. This setting prevents you from accidentally writing data to a virtual disk that might be the parent of a snapshot or linked clone. Writing to such a disk might make the snapshot or clone unusable. To map or mount a virtual disk to a drive on the host 1 Open the menu to mount a virtual disk to a drive on the host. On Windows, select File > Map or Disconnect Virtual Disks. On Linux, select File > Mount or Unmount Virtual Disks. 2 Map or mount a virtual disk. On Windows, in the Map or Disconnect Virtual Drives dialog box, click Map. On Linux, in the Mount or Unmount Virtual Drives dialog box, click Mount Disk. 3 In the dialog box, click Browse, navigate to a disk file (.vmdk file), select it, and click Open. VMware, Inc. 201, 4 Select the volume to map or mount, and select a drive letter that is not being used on your host. 5 Click OK or Mount. The drive appears on your host. From the host, you can read from or write to files on the mapped virtual disk. 6 (Optional) To view a mapped drive, do one of the following: On Windows, select File > Map or Disconnect Virtual Disks. On Linux, select File > Mount or Unmount Virtual Disks When you are ready to unmap or unmount the drive, see “Disconnect the Host from the Virtual Disk” on page 202.Disconnect the Host from the Virtual Disk
To access the mapped virtual disk from a virtual machine again, you must disconnect it. You can disconnect the host from the virtual disk using two different methods. To disconnect the host from the virtual disk Do one of the following: Use the File menu in Workstation: a Choose File > Map or Disconnect Virtual Disks or Mount or Unmount Virtual Disks. b In the dialog box, select a volume to disconnect and click Disconnect or Unmount. c If you receive an error message asking whether to forcibly disconnect, click Yes. d Click OK. Use the VM menu for a selected virtual machine: a Choose VM > Settings > Hardware. b Select the hard disk and click Utilities > Disconnect or Unmount. You can now power on any virtual machine that uses this disk. 202 VMware, Inc.,Preserving the State of a Virtual Machine 9
Suspending a virtual machine lets you save the current state so that you can continue work later from the same state. Taking a snapshot lets you preserve the state of the virtual machine so you can return to the same state repeatedly. This chapter includes the following topics: “Using the Suspend and Resume Features” on page 203 “Using Snapshots” on page 205Using the Suspend and Resume Features
You can use the suspend and resume features to save the current state of a virtual machine. When you resume, any applications you were running when you suspended the virtual machine are resumed in their running state, and the content is the same as when you suspended the virtual machine. The speed of the suspend and resume operations depends on how much data changed since the virtual machine started. In general, the first suspend operation takes longer than later suspend operations. When you resume and do additional work in the virtual machine, you cannot return to the state the virtual machine was in at the time you suspended. To preserve the state of the virtual machine so that you can return to the same state repeatedly, take a snapshot, as described in “Using Snapshots” on page 205.Use Hard Suspend or Soft Suspend
You can configure the Suspend button or menu command to run a VMware Tools script in the guest operating system before doing the suspend operation. This configuration is called a soft suspend. VMware, Inc. 203, Before you begin, make sure VMware Tools is installed in the guest operating system. See “Installing VMware Tools” on page 106. On Windows guests, when you do a soft suspend, a script releases the IP address if the guest operating system is using DHCP. On Linux, FreeBSD, and Solaris guests, the script stops networking for the virtual machine. When you use the Resume command on Windows guests, a script gets a new IP address from DHCP. On Linux, FreeBSD, and Solaris guests, networking restarts. To use hard suspend or soft suspend 1 Select the virtual machine. 2 Choose VM > Settings. 3 Click the Options tab, and select Power. 4 In the Power controls section, specify a hard suspend (Suspend) or a soft suspend (Suspend Guest) operation. 5 Click OK.Suspend or Resume a Virtual Machine
The suspend and resume features let you save the current state of your virtual machine and continue work later from the same state. Before suspending a virtual machine, specify whether to stop networking before suspending. See “Use Hard Suspend or Soft Suspend” on page 203. To suspend or resume a virtual machine Do one of the following: To suspend a virtual machine, choose VM > Power > Suspend. If the virtual machine is running in exclusive full screen mode, which hides the toolbar, return to windowed mode by pressing the Ctrl+Alt+Enter key combination. When you suspend a virtual machine, a file with a .vmss extension is created in the working directory. To resume a suspended virtual machine, select the virtual machine and choose VM > Power > Resume. When you resume the virtual machine, its state is restored from the .vmss file. 204 VMware, Inc., Chapter 9 Preserving the State of a Virtual MachineUsing Snapshots
Taking snapshots lets you preserve the state of the virtual machine so that you can return to the same state repeatedly.Scenarios for Using Multiple Snapshots
You can take multiple snapshots of a virtual machine. Snapshots in a Linear Process Taking snapshots in a linear process means taking a snapshot, continuing to use the virtual machine from that point, taking another snapshot at a later point, and so on. Each snapshot is a restoration point in a single long sequence. Figure 9-1. Snapshots as Restoration Points in a Linear Process Windows lesson 1 lesson 2 lesson 3 lesson 4 lesson 5 operating system Workstation supports more than 100 snapshots for each linear process. Use snapshots in a linear process for the following situations: You plan to make risky changes in a virtual machine, such as by testing new software or examining a virus. Before adding new, untested code to a project, take a snapshot. You can always revert to a previous known working state of the project if the new code does not work as expected. If the new code causes no problems, you can take another snapshot of the virtual machine in its new state. NOTE You can configure a virtual machine to take a snapshot any time it is powered off, preserving a virtual audit trail as work progresses. See “Take or Revert to a Snapshot at Power Off” on page 215. You create a training course and want to save the state of the virtual machine in a snapshot at each lesson’s starting point. You can use the snapshots to skip lengthy computer preparation time. You can also configure the virtual machine to revert to a snapshot any time it is powered off. Each time a new class begins a lesson, the previous student’s work is discarded. See “Revert at Power Off” on page 213. VMware, Inc. 205, Snapshots in a Process Tree You can save a number of sequences as branches from a single baseline, as Figure 9‐2 shows. This strategy is often used in testing software. You can take a snapshot before installing different versions of a program to ensure that each installation begins from an identical baseline. Figure 9-2. Snapshots as Restoration Points in a Process Tree Windows IE base operating baseline system Firefox base SP1 IE base1 You AreHere Firefox base1 SP2 IE base2 Firefox base2 Although Workstation supports more than 100 snapshots for each branch in a process tree, keeping more than 99 might cause the guest operating system to have problems booting. Delete some snapshots or make a full clone of the virtual machine. Snapshot Relationships The relationship between snapshots is like a parent‐child relationship: In a linear process, each snapshot has one parent and one child, except for the last snapshot, which has no children. In a process tree, each snapshot has one parent, but one snapshot can have more than one child. Many snapshots have no children. 206 VMware, Inc., Chapter 9 Preserving the State of a Virtual Machine The parent snapshot of a virtual machine is the snapshot on which the current state (the You Are Here position in Figure 9‐3) is based. After you take a snapshot, that stored state is the parent snapshot of the virtual machine. If you revert or go to an earlier snapshot, the earlier snapshot becomes the parent snapshot of the virtual machine. Figure 9-3. Parent-Child Relationship Between Snapshots Snapshots 2, 3, and 4 are all children of Snapshot1. Snapshot 4 is the parent of the You Are Here position and therefore the parent of the virtual machine.Information Captured by Snapshots
A snapshot captures the entire state of the virtual machine at the time you take the snapshot which includes the following configurations. Memory state – Contents of the virtual machine memory Settings state – Virtual machine settings Disk state – State of all the virtual disks The state of a physical disk is not preserved when you take a snapshot. However, the state of an independent disk is not affected by snapshots. Snapshots operate on individual virtual machines. If you select a team of virtual machines and take a snapshot, only the state of the active virtual machine is preserved. See “Summary and Console Views for Teams and Their Virtual Machines” on page 278. When you revert to a snapshot, you return the memory, settings, and virtual disks of the virtual machine to the state they were in when you took the snapshot. To suspend, power on, or power off the virtual machine when you launch it, be sure it is in that state when you take the snapshot. VMware, Inc. 207,Snapshot Conflicts
Avoid taking a snapshot when applications in the virtual machine are communicating with other computers, especially in production environments. Suppose you take a snapshot while the virtual machine is downloading a file from a server on the network. After you take the snapshot, the virtual machine continues downloading the file, communicating its progress to the server. If you revert to the snapshot, communications between the virtual machine and the server are confused and the file transfer fails. Or consider a case in which you take a snapshot while an application in the virtual machine is sending a transaction to a database on a separate machine. If you revert to that snapshot after the transaction starts but before it is committed, the database is likely to be confused.Enable or Disable Background Snapshots
When you set a preference to take snapshots in the background, you can continue working while the state of the virtual machine is being preserved. A progress indicator for the background snapshot is displayed in one of the corners of the Workstation window. Before you begin, on Linux hosts, run Workstation as the root user. Only root users are allowed to change this preference setting. If you take another snapshot or revert to a snapshot before Workstation completes a pending snapshot operation, a progress dialog box appears. You must wait for the pending snapshot operation to finish before the next snapshot or resume operation begins. Enabling background snapshots for a host with slow hard disks can adversely affect performance. If you experience significant performance problems when taking or restoring snapshots, disable background snapshots. To enable or disable background snapshots 1 Choose Edit > Preferences. 2 Click the Priority tab. 3 Use the check box in the Snapshots section to enable or disable background snapshots. 4 Click OK and restart the virtual machine. 208 VMware, Inc., Chapter 9 Preserving the State of a Virtual MachineExclude a Virtual Disk from Snapshots
In certain configurations, you might want to revert some disks to a snapshot while other disks retain all changes. For example, you might want a snapshot to preserve a disk with your operating system and applications, while always keeping the changes to a disk with your documents. You can exclude virtual disks from a snapshot by changing the disk mode. Before you begin, power off the virtual machine and delete any existing snapshots. To exclude a virtual disk from snapshots 1 Select the virtual machine. 2 Choose VM > Settings. 3 On the Hardware tab, select the drive to exclude and click Advanced. 4 Select Independent and select one of the following options: Persistent – Disks in persistent mode behave like conventional disks on a physical computer. All data written to a disk in persistent mode is written permanently to the disk. Nonpersistent – Changes to disks in nonpersistent mode are discarded when you power off or reset the virtual machine. Nonpersistent mode enables you to restart the virtual machine with a virtual disk in the same state every time. Changes to the disk are written to and read from a redo log file that is deleted when you power off or reset. VMware, Inc. 209,Snapshot Manager Overview
You can review all snapshots for the active virtual machine and act on them directly in the snapshot manager. Table 9‐1 identifies the icons that you might see in the snapshot tree of the snapshot manager. Table 9-1. Snapshot Manager Icons Snapshot of a virtual machine that is powered off Snapshot of a virtual machine that is powered on Snapshot used to create a linked clone Recording of a virtual machine AutoProtect snapshot You Are Here icon The snapshot tree shows all snapshots for the virtual machine and the relationship between snapshots. The You Are Here icon is not a snapshot. It shows the current state of the virtual machine. See “Snapshot Relationships” on page 206. NOTE Point to a snapshot (without clicking) to display the complete name of that snapshot. 210 VMware, Inc., Chapter 9 Preserving the State of a Virtual Machine Most snapshot manager actions are available as menu commands from the VM > Snapshot menu. The following actions, however, are available only from the snapshot manager: Renaming a snapshot – The Name text box is editable. If you rename a snapshot for a cloned virtual machine, use the Description field for future identification. Changing or adding a description – The Description text box is editable. Deleting a snapshot – See “Delete a Snapshot or a Recording” on page 214. On Linux hosts, the snapshot manager has a slightly different appearance. On Linux hosts, right‐click the toolbar to change the icon style. You can display icons and text, icons only, text only, and so on. Open and Use the Snapshot Manager Use the snapshot manager to review all snapshots for the active virtual machine and work on them directly. To open and use the snapshot manager 1 Select the virtual machine. 2 Choose VM > Snapshot > Snapshot Manager. 3 Select a snapshot or recording and click the button for the needed action. To select more than one snapshot or recording, Ctrl+click the needed snapshots and recordings. If the Take Snapshot button is disabled, it might be because the virtual machine has multiple disks in different disk modes. For example, if you have a special purpose configuration that requires you to use an independent disk, you must power off the virtual machine before taking a snapshot.Take a Snapshot
You can usually take a snapshot while a virtual machine is powered on, powered off, or suspended. Following are the prerequisites for taking a snapshot: Any suspend operations must be complete. The virtual machine is not communicating with another computer. See “Snapshot Conflicts” on page 208. VMware, Inc. 211, If your use of virtual machines is strongly performance oriented, the guest operating system’s drives are defragmented. See “Defragment Virtual Disks” on page 241. If the virtual machine has multiple disks in different disk modes, the virtual machine is powered off. For example, if a special purpose configuration requires you to use an independent disk, you must power off the virtual machine before taking a snapshot. If the virtual machine was created with Workstation 4 delete any existing snapshots or upgrade the virtual machine to Workstation 5.x or higher. See “Change the Version of a Virtual Machine” on page 96. To take a snapshot 1 Choose VM > Snapshot > Take Snapshot. 2 Enter a unique name. 3 (Optional) Enter a description. Use this field to record notes about the virtual machine state captured in the snapshot. 4 Click OK.Rename a Snapshot or Recording
Use the snapshot manager to change the name of a snapshot or its description at any time. To rename a snapshot or recording 1 Choose VM > Snapshot > Snapshot Manager. 2 Select the snapshot or recording. 3 Edit the text in the Name text box and click Close. If you rename a snapshot for a cloned virtual machine, use the Description field to specify which virtual machine was cloned. 212 VMware, Inc., Chapter 9 Preserving the State of a Virtual MachineRestore an Earlier State from a Snapshot
Restore a snapshot in Workstation by using the Revert and Go to commands. The Revert command has the same effect as using the Go to command and selecting the parent snapshot of the virtual machine. It reverts to the parent snapshot of the current state. This state corresponds to the You Are Here position in the snapshot manager. See “Snapshot Relationships” on page 206. The Go to command is not limited to the parent snapshot of the current state. You can choose any existing snapshot of the virtual machine. CAUTION If you add an independent disk to a virtual machine and take a snapshot, reverting to the snapshot will not affect the state of the independent disk. But if you take a snapshot of a virtual machine and then add any kind of disk, reverting to the snapshot will remove the disk from the virtual machine. If associated disk (.vmdk) files are not used by another snapshot, the disk files are deleted. To restore an earlier state from a snapshot Do one of the following: To revert to the parent snapshot, choose VM > Snapshot > Revert to Snapshot. To revert to a snapshot that is not the parent, choose VM > Snapshot and select the snapshot name. To set the virtual machine to revert to the parent snapshot every time the virtual machine is powered off, see “Revert at Power Off” on page 213. NOTE The list of snapshots in VM > Snapshot does not show an AutoProtect snapshot until you restore that snapshot in the snapshot manager. Use the snapshot manager (VM > Snapshot > Snapshot Manager) to display and restore AutoProtect snapshots. Revert at Power Off You can set the virtual machine to revert to the parent snapshot any time it is powered off. The parent snapshot of a virtual machine is the snapshot on which the current state (the You Are Here position) is based. To set a virtual machine to revert to a snapshot at power off 1 Select the virtual machine. 2 Choose VM > Settings. VMware, Inc. 213, 3 Click the Options tab and select Snapshot/Replay. 4 In the When powering off section, select Revert to snapshot.Delete a Snapshot or a Recording
In most cases, deleting a snapshot or recording does not affect other snapshots, recordings, or the current state of the virtual machine. Use the snapshot manager to delete a snapshot. CAUTION If a snapshot is used to create a clone, the snapshot becomes locked. If you delete a locked snapshot, the clones created from that snapshot no longer operate. You cannot delete a snapshot if the associated virtual machine is designated as a template for cloning. See “Enable Template Mode for a Parent Virtual Machine of Linked Clones” on page 223. To delete a snapshot or recording 1 Select VM > Snapshot > Snapshot Manager. 2 (Optional) To delete AutoProtect snapshots, make sure that Show AutoProtect snapshots is selected. 3 Select an option to delete a snapshot or recording: To delete a single snapshot or recording, select it and click Delete. To delete a snapshot or recording and all of its children, right‐click it and select Delete Snapshot/Recording and Children. If the children of the snapshot include AutoProtect snapshots, the AutoProtect snapshots are deleted only if Show AutoProtect snapshots is selected. To delete all snapshots and recordings, right‐click a snapshot or recording, select Select All, and click Delete. 4 When prompted to confirm the deletion, click OK, and click Close in the snapshot manager. 214 VMware, Inc., Chapter 9 Preserving the State of a Virtual MachineTake or Revert to a Snapshot at Power Off
You can set a virtual machine to automatically revert to a snapshot or to take a new snapshot whenever you power off the virtual machine. To take a snapshot or revert to one at power off 1 Select the virtual machine. 2 Choose VM > Settings. 3 Click the Options tab and select Snapshot/Replay. 4 Select an option in the When powering off section: Just power off – Powers off without making any changes to snapshots. Revert to snapshot – Reverts to the parent snapshot of the current state of the virtual machine (that is, the parent snapshot of the You Are Here position in the Snapshot Manager window). An instructor might use this setting to discard student answers for a computer lesson when a virtual machine is powered off at the end of class. Take a new snapshot – Takes a snapshot of the virtual machine state after it is powered off. This is useful to preserve milestones automatically. The snapshot appears in the snapshot manager. The name of this snapshot is the date and time the virtual machine was powered off. The description is “Automatic snapshot created when powering off.” Ask me – Prompts you, every time you power off a virtual machine, to choose to power off, revert, or take a snapshot. 5 Click OK. VMware, Inc. 215,Using AutoProtect Snapshots
The AutoProtect feature preserves the state of your virtual machine by taking snapshots at regular intervals that you specify. This process is in addition to manual snapshots, which you can take at any time. You can set AutoProtect options in the Options tab of the Virtual Machine Settings window (VM > Settings). You select the interval of time between AutoProtect snapshots and the maximum number of snapshots that will be retained. After the maximum number of AutoProtect snapshots is reached, Workstation deletes the oldest AutoProtect snapshot each time a new AutoProtect snapshot is taken. Based on the settings you enter, Workstation retains a selection of AutoProtect snapshots over a range of time. Workstation displays this selection in the Virtual Machine Settings window, along with an estimate of the minimum amount of disk space taken by AutoProtect snapshots. This minimum is affected by the Memory setting in Virtual Machine Settings. The more virtual memory your virtual machine has, the more disk space is available for AutoProtect snapshots. The interval between AutoProtect snapshots is measured only when the virtual machine is powered on. For example, suppose you set AutoProtect to take snapshots hourly, and then power off the virtual machine five minutes later. The next AutoProtect snapshot takes place 55 minutes after you power on the virtual machine again, regardless of the length of time the virtual machine was powered off. AutoProtect Restrictions The AutoProtect feature has the following restrictions: Because AutoProtect takes snapshots only while a virtual machine is powered on, AutoProtect snapshots cannot be cloned. You can clone a virtual machine only if it is powered off. AutoProtect snapshots are not taken in VMware Player, even if AutoProtect was enabled for the virtual machine in Workstation. AutoProtect snapshots are not taken while you are using the Record/Replay feature. 216 VMware, Inc., Chapter 9 Preserving the State of a Virtual Machine Set Up Automatic Snapshots with AutoProtect You can set Workstation to take snapshots of your virtual machine at regular intervals, with the AutoProtect feature. To set up automatic snapshots with AutoProtect 1 Select the virtual machine. 2 Select VM > Settings. 3 On the Options tab, under Settings, select AutoProtect. 4 Select Enable AutoProtect. 5 Select the interval between snapshots. 6 Select the maximum number of AutoProtect snapshots to retain. This setting does not affect the number of regular snapshots you can take and keep. 7 Select OK. Preserve AutoProtect Snapshots from Being Deleted After Workstation has taken the maximum number of AutoProtect snapshots that you specify when you set up AutoProtect, Workstation deletes the oldest AutoProtect snapshot each time a new AutoProtect snapshot is taken. In the snapshot manager, you can preserve AutoProtect snapshots from this deletion. To preserve AutoProtect snapshots from being deleted 1 Select VM > Snapshot Manager. 2 Select Show AutoProtect snapshots. 3 Select the AutoProtect snapshot to preserve. 4 Select Keep.Snapshots and Workstation 4 Virtual Machines
Workstation 4 virtual machines do not support multiple snapshots. For full Workstation 7 functionality, you must upgrade. See “Change the Version of a Virtual Machine” on page 96. If a Workstation 4 virtual machine has a snapshot, you must remove the snapshot before you upgrade. Use your earlier, Workstation 4 application to remove the snapshot, and then upgrade to Workstation 7. VMware, Inc. 217, 218 VMware, Inc.,Cloning, Moving, and Sharing Virtual Machines 10
Cloning a virtual machine is faster and easier than copying it. This chapter provides instructions and information on how to move your virtual machines from one host to another, or elsewhere on the same host, plus recommendations on how to share virtual machines with other users. This chapter includes the following topics: “The Virtual Machine’s Universal Unique Identifier” on page 219 “Cloning a Virtual Machine” on page 221 “Moving a Virtual Machine” on page 225 “Moving an Older Virtual Machine” on page 228 “Moving Linked Clones” on page 229 “Sharing Virtual Machines with Other Users” on page 229 “Using VNC for Remote Connections to a Virtual Machine” on page 230 “Make Virtual Machines Available for Streaming from a Web Server” on page 232 “Sharing Virtual Machines with VMware Player” on page 233The Virtual Machine’s Universal Unique Identifier
To ensure all virtual machines are identified properly, each virtual machine is automatically assigned a universal unique identifier (UUID). Use the UUID of a virtual machine for system management in the same way you use the UUID of a physical computer. The UUID is stored in the SMBIOS system information descriptor. It can be accessed by standard SMBIOS scanning software, such as SiSoftware Sandra or the IBM utility smbios2. VMware, Inc. 219, This UUID is generated when you initially power on the virtual machine. As long as you do not move or copy the virtual machine to another location, the UUID remains constant. To set a specific UUID, see “Specify a UUID for a Virtual Machine” on page 220.UUID Options When You Move a Virtual Machine
When you power on a virtual machine that was moved or copied to a new location, a message appears, asking whether you moved or copied the virtual machine. If you indicate that you copied the virtual machine, a new UUID is generated. Suspending and resuming a virtual machine does not trigger the process that generates a UUID. The UUID in use at the time the virtual machine was suspended remains in use when the virtual machine is resumed, even if it was copied or moved. The next time the virtual machine is rebooted, the message appears. Set the Virtual Machine to Always Keep or Always Create a UUID If a virtual machine is set to always keep or always create a UUID, users are not prompted when a virtual machine is moved or copied. You can set this property by editing the virtual machine’s configuration file. To set the virtual machine to always keep or always create a UUID 1 Power off the virtual machine. 2 Open the configuration (.vmx) file with a text editor. 3 Add the following line: uuid.action = "Specify a UUID for a Virtual Machine
Although UUIDs are automatically assigned to virtual machines, you can override the generated UUID value and assign a specific UUID. The UUID is a 128‐bit integer. The 16 bytes of this value are separated by spaces, except for a dash between the eighth and ninth hexadecimal pairs. Following is an example of a UUID: 00 11 22 33 44 55 66 77-88 99 aa bb cc dd ee ff 220 VMware, Inc., Chapter 10 Cloning, Moving, and Sharing Virtual Machines To specify a UUID for a virtual machine 1 Power off the virtual machine. 2 Open the configuration (.vmx) file with a text editor. 3 Search for the line that contains uuid.bios. The format of the line is uuid.bios = "Cloning a Virtual Machine
Installing a guest operating system and applications can be time consuming. With clones, you can make many copies of a virtual machine from a single installation and configuration process. Clones are useful when you must deploy many identical virtual machines to a group. For example: An MIS department can clone a virtual machine for each employee, with a suite of preconfigured office applications. A virtual machine can be configured with a complete development environment and then cloned repeatedly as a baseline configuration for software testing. A teacher can clone a virtual machine for each student, with all the lessons and labs required for the term. VMware, Inc. 221, With clones you can make copies of a virtual machine without browsing a host file system or worrying if you have located all the configuration files. The existing virtual machine is called the parent of the clone. When the cloning operation is complete, the clone becomes a separate virtual machine. These are the main characteristics of a clone: Changes made to a clone do not affect the parent virtual machine. Changes made to the parent virtual machine do not appear in a clone. A clone’s MAC address and UUID are different from the parent virtual machine. Although a clone is a separate virtual machine, if the clone is a linked clone, it shares virtual disks with the parent virtual machine. See “Types of Clones” on page 222.Types of Clones
Two types of clones are available: full and linked. Full Clones A full clone is a complete and independent copy of a virtual machine. It shares nothing with the parent virtual machine after the cloning operation. Ongoing operation of a full clone is entirely separate from the parent virtual machine. Because a full clone does not share virtual disks with the parent virtual machine, full clones generally perform better than linked clones. However, full clones take longer to create than linked clones. Creating a full clone can take several minutes if the files involved are large. The full clone duplicates only the state of the virtual machine at the instant of the cloning operation. Thus the full clone does not have access to any snapshots that might exist of the parent virtual machine. Linked Clones A linked clone is a copy of a virtual machine that shares virtual disks with the parent virtual machine in an ongoing manner. A linked clone is made from a snapshot of the parent. See “Scenarios for Using Multiple Snapshots” on page 205. This conserves disk space and allows multiple virtual machines to use the same software installation. CAUTION You cannot delete the linked clone snapshot without destroying the linked clone. You can safely delete this snapshot only if you also delete the clone that depends on it. 222 VMware, Inc., Chapter 10 Cloning, Moving, and Sharing Virtual Machines All files available on the parent at the moment you take the snapshot continue to remain available to the linked clone. Ongoing changes to the virtual disk of the parent do not affect the linked clone, and changes to the disk of the linked clone do not affect the parent. A linked clone must have access to the parent. Without access to the parent, you cannot use a linked clone. You can make a linked clone from a linked clone, but keep in mind that the performance of the linked clone degrades. When possible, make a linked clone of the parent virtual machine. If you make a full clone from a linked clone, however, the full clone is an independent virtual machine that does not require access to the linked clone or its parent. Linked clones are created swiftly, so you can easily create a unique virtual machine for each task. You can also easily share a virtual machine with other users by storing the virtual machine on your local network, where other users can quickly make a linked clone. This facilitates collaboration. For example, a support team can reproduce a bug in a virtual machine, and an engineer can quickly make a linked clone of that virtual machine to work on the bug.Creating Clones
If you decide to create a linked clone and you want to prevent the parent virtual machine from being accidentally deleted, enable template mode before using the Clone Virtual Machine wizard. Enable Template Mode for a Parent Virtual Machine of Linked Clones To prevent anyone from deleting the parent virtual machine for a linked clone, designate the parent as a template. When template mode is enabled, a virtual machine cannot be deleted or added to a team, and the virtual machine’s snapshots cannot be deleted. To enable template mode for a parent virtual machine of linked clones 1 Select the virtual machine to use as a parent of your linked clone. 2 Verify that the parent has at least one snapshot. Open the snapshot manager and create a snapshot if none exists. See “Snapshot Manager Overview” on page 210. 3 Choose VM > Settings. VMware, Inc. 223, 4 Click the Options tab, and select Advanced. 5 In the Settings section, click Enable Template mode (to be used for cloning) and click OK. Use the Clone Virtual Machine Wizard The Clone Virtual Machine wizard guides you through the process of making a clone. You do not need to locate and manually copy the parent virtual machine files. Before making a linked clone, defragment the guest operating system’s drives on the parent virtual machine. Use the tools in the guest operating system to run a defragmentation utility. See “Defragment Virtual Disks” on page 241. For information about preventing a linked clone’s parent virtual machine from being deleted, see “Enable Template Mode for a Parent Virtual Machine of Linked Clones” on page 223. NOTE Workstation 4.x virtual machines, and virtual machines created with other VMware products that are compatible with Workstation 4.x, must be upgraded to at least Workstation 5.x virtual machines before you can clone them. See “Change the Version of a Virtual Machine” on page 96. To use the Clone Virtual Machine wizard 1 Select the virtual machine. 2 Make sure the virtual machine is powered off. 3 Choose VM > Clone to open the Clone Virtual Machine wizard. 4 On the Welcome page, click Next. 5 On the Clone Source page, select the state of the parent from which you want to create a clone and click Next. You can choose to create a clone from the parent’s current state or from any existing snapshot of the parent. If you select the current state, Workstation creates a snapshot of the virtual machine before cloning it. The wizard does not allow you to clone from the current state when template mode is enabled. 6 On the Clone Type page, specify whether to create a linked clone or a full clone and click Next. 224 VMware, Inc., Chapter 10 Cloning, Moving, and Sharing Virtual Machines 7 On the Name of the New Virtual Machine page, enter a name and a path for the cloned virtual machine and click Finish. A full clone can take many minutes to create, depending on the size of the virtual disk that is being duplicated. 8 Click Close to exit the Clone Virtual Machine wizard. The Clone Virtual Machine wizard automatically creates a new MAC address and UUID for the clone. Other configuration information is identical to that of the parent virtual machine. For example, a machine’s name and static IP address configuration are not altered by the Clone Virtual Machine wizard. 9 To prevent conflict with static IP addressing, change the clone‘s static IP address before the clone connects to the network. See “Selecting IP Addresses on a Host‐Only Network or NAT Configuration” on page 306.Moving a Virtual Machine
You can take a virtual machine that was created by using Workstation and move it to a different computer or to a different location on the same computer. You can even move a virtual machine to a host with a different operating system. For example, you can move a virtual machine from a Windows host to a Linux or ESX Server host. In general, moving a virtual machine means moving the files that make up the virtual machine. The path names for all files associated with a Workstation virtual machine are relative, meaning the path to each file is relative to the virtual machine directory. For example, if you are in the virtual machine directory, the relative path to the virtual disk file isHosts with Different Hardware
The guest operating system might not work correctly if you move a virtual machine to a host with significant hardware differences, such as from a 64‐bit host to a 32‐bit host or from a multiprocessor host to a uniprocessor host. VMware, Inc. 225, Moving Between 64-Bit and 32-Bit Hosts You can move a virtual machine from a 32‐bit host to a 64‐bit host but not from a 64‐bit host to a 32‐bit host unless the 32‐bit host has a supported 64‐bit processor. NOTE Workstation supports 64‐bit guest operating systems only in Workstation 5.5 and higher, and only on host machines with supported processors. When you power on a virtual machine with a 64‐bit guest operating system, Workstation performs an internal check. If the host CPU is not a supported 64‐bit processor, you cannot power on the virtual machine. For the list of processors Workstation supports for 64‐bit guest operating systems, see “PC Hardware” on page 23. Moving Between Multiprocessor and Uniprocessor Hosts For all supported configurations of 32‐bit and 64‐bit host and guest operating systems running on multiprocessor host machines, Workstation 5.5 and higher virtual machines support four‐way virtual symmetric multiprocessing (SMP). This support enables you to assign up to four virtual processors to a virtual machine. This is supported only for host machines with at least two logical processors. See “Use Four‐Way Virtual Symmetric Multiprocessing” on page 368. NOTE If the host is a uniprocessor machine, assigning two processors is not supported. A warning message appears. You can disregard this message and assign two processors to the virtual machine, but when you finish creating the virtual machine, you cannot power it on unless you move it to a host machine with at least two logical processors. Open a Virtual Machine Created in ESX Server That Has More Than Two Processors You can use Workstation 5.5 or higher, running on a multiprocessor host machine, to open a virtual machine created in VMware ESX Server that has one or more virtual processors. However, in Workstation you cannot power on or resume a virtual machine that has more than two virtual processors assigned, even if more processors were assigned when the virtual machine was created in ESX Server. You can see this setting in the virtual machine’s summary view or by using the virtual machine settings editor. 226 VMware, Inc., Chapter 10 Cloning, Moving, and Sharing Virtual Machines To open a virtual machine created in ESX Server that has more than two processors 1 Select the virtual machine and choose VM > Settings > Hardware > Processors. 2 Note that Number of Processors is set to Other (x), where x is the number of processors originally assigned in ESX Server. Workstation preserves this original configuration setting for the number of processors, even though two is the maximum number of processors supported. 3 Change this setting to two processors so that you can power on the virtual machine in Workstation. After you commit a change to this setting, the original setting for number of processors is discarded, and no longer appears as an option in the virtual machine settings editor.Move a Virtual Machine to a New Location or a New Host
You can move the virtual machine to a different location on the same host or move it to a new host. For more information about compatibility between VMware products, see the VMware Virtual Machine Mobility Planning Guide. To move a virtual machine to a new location or a new host 1 Make sure that all the virtual machine files are stored in the virtual machine directory. For example, if you configured the working directory to reside in a different location on the host, move it into the virtual machine directory and use the virtual machine settings editor (VM > Settings > Options > General) to point to this location. If the virtual machine you want to move is a linked clone, see “Moving Linked Clones” on page 229. 2 Shut down the guest operating system and power off the virtual machine. VMware, Inc. 227, 3 Copy all the files in the virtual machine directory to the new location. To move the virtual machine’s files to another host, if you do not have a network connection to the new host, use a shared network directory, burn the files onto a DVD, or use some other storage media that has enough disk space. For more information about the files that you are moving, see “Files That Make Up a Virtual Machine” on page 99. 4 On the new host, start Workstation, choose File > Open, and browse to the virtual machine’s configuration (.vmx) file in its new location. 5 (Optional) If you are moving the virtual machine to a different location on the same host, remove the virtual machine from the Favorites list and add it again using the new location. 6 When you are certain that the virtual machine in the new location works correctly, delete the virtual machine files from the old location, if needed. If the virtual machine in the new location is not working correctly, examine the virtual machine in the original location to determine if you missed copying some files. Some files might reside outside of the virtual machine directory. Use the virtual machine settings editor (VM > Settings > Hardware) to select devices and determine whether any associated files point to locations that cannot be accessed from the new location. Workstation generates a different MAC address for the virtual network adapter when you move a virtual machine to a new host computer or to a different directory on the same host computer. A new MAC address is also generated when you rename a directory in the path to the virtual machine’s configuration file. See “Maintaining and Changing the MAC Address of a Virtual Machine” on page 310.Moving an Older Virtual Machine
If you created a virtual machine by using Workstation 2.x or 3.x, you must upgrade it to at least Workstation 4. Workstation 7.0 does not support Workstation 2 or 3 virtual machines. 228 VMware, Inc., Chapter 10 Cloning, Moving, and Sharing Virtual MachinesMoving Linked Clones
You can move a linked clone as you do an ordinary Workstation virtual machine. However, if you move a linked clone (or if you move its parent virtual machine), make sure the clone can access the parent virtual machine. Place the parent in shared directory or on a networked file server. For example, if you put a linked clone on a laptop and the parent remains on another machine, you can use the clone only when the laptop connects to the network or drive where the parent is stored. To use a cloned virtual machine on a disconnected laptop, you must use a full clone or you must move the parent virtual machine to the laptop. You cannot power on a linked clone if Workstation cannot locate the original virtual machine.Sharing Virtual Machines with Other Users
If you want other users to be able to access your virtual machines, consider the following points: Only one user can run a virtual machine at a time. Other users can also share a virtual machine by making a linked clone of it. A linked clone is a copy that uses the same virtual disks as the parent virtual machine it was copied from. See “Cloning a Virtual Machine” on page 221. On Windows hosts, relocate the virtual machine files to a directory that is accessible to all appropriate users. The default location for a Windows host is not typically accessible to other users: On Windows XP: C:\Documents and Settings\Using VNC for Remote Connections to a Virtual Machine
Virtual network computing (VNC) software enables you to view and interact with one computer from any other computer or mobile device anywhere on the Internet. VNC software is cross‐platform, allowing remote control between different types of computers. For example, you can use VNC to view a Linux machine on your Windows PC. Open‐source versions of VNC are freely and publicly available. You can use Workstation to set a virtual machine to act as a VNC server, and users on other computers can install a VNC client (also called a VNC viewer) to connect to the virtual machine. After you set up a virtual machine as a VNC server, you can see a list of users who are remotely connected to the virtual machine and find out how long they have been connected. Workstation does not need to be running when VNC connections are made. Only the virtual machine needs to be running, and it can be running in the background.Configure a Virtual Machine as a VNC Server
You do not need to install specialized VNC software in a virtual machine to set it up as a VNC server. To configure a virtual machine as a VNC server 1 Select the virtual machine and choose VM > Settings. 2 Click the Options tab and select Remote Display. 3 Click Enable remote display. After remote display is enabled and users connect to the virtual machine with a VNC client, use the View Connected Users button on Remote Display settings panel to see a list of the connected users. 4 (Optional) Change the port number. To connect to multiple virtual machines on the same host with a VNC client, specify a unique port number for each virtual machine. VMware suggests that you use a port number in the range from 5901 to 6001. Keep in mind that other applications use certain port numbers, and some port numbers are privileged (only the root or Administrator user can listen). For example, the VMware Management Interface uses ports 8333 and 8222. On Linux, only the root user can listen to ports up to port number 1024. 230 VMware, Inc., Chapter 10 Cloning, Moving, and Sharing Virtual Machines 5 (Optional) Set a password for connecting to the virtual machine from a VNC client. The password can be up to 8 characters long. Because it is not encrypted when the VNC client sends it, do not use a password that you use for other systems. 6 Click OK. After you set up a virtual machine as a VNC server, you can see a list of users who are remotely connected to the virtual machine and find out how long they have been connected. To see the list, right‐click the VNC icon in the status bar and choose Connected Users.Use a VNC Client to Connect to a Virtual Machine
You can install a VNC client on your host and connect to a running virtual machine. Before you begin, determine the machine name or IP address of the host on which the virtual machine is running and, if applicable, the VNC port number and password. See “Configure a Virtual Machine as a VNC Server” on page 230. For information about mapping the keyboard to languages other than U.S. English, see “Specify a Language Keyboard Map for VNC Clients” on page 343. The following issues are known to occur when you connect to virtual machines with a VNC client: You cannot take or revert to snapshots. You cannot change the power state of the virtual machine. That is, you cannot power on, power off, suspend, or resume. Although you cannot power off, you can shut down the guest operating system, and shutting down might power off the virtual machine. You cannot copy and paste text between the host and guest operating system. You cannot configure the virtual machine with the virtual machine settings editor. Remote display does not work well if you are also using the 3‐D feature. This feature is described in “Support for Direct3D Graphics” on page 175. VMware, Inc. 231, To use a VNC client to connect to a virtual machine 1 On a local or remote computer, start a VNC client. You can use any VNC client, but not a Java viewer in a browser. To download and install a VNC client, check one of the many Web sites where you can buy or get one for free. 2 Make sure the client is set for hextile encoding. For example, if you use RealVNC Viewer, under the Preferred Encoding option, select Hextile. 3 Set the client to use all colors. For example, if you use RealVNC Viewer, under the Colour Level option, select Full (all available colours). 4 When prompted for the VNC server name, enter the name or IP address of the host computer and the port number. Use the format:Make Virtual Machines Available for Streaming from a Web Server
With virtual machine (VM) streaming, virtual disk data is fetched on demand. You can power on a virtual machine soon after you begin downloading it from a Web server. Downloading a virtual machine in a .zip or .tar file from a Web server can take a considerable amount of time, depending on the size of the virtual machine. To use VM streaming, you place the virtual machine directory on the Web server without zipping it. VMware recommends that you configure the Web server to support persistent connections (HTTP keep‐alive connections). To make virtual machines available for streaming from a Web server 1 If the virtual machine has any snapshots, delete them. See “Delete a Snapshot or a Recording” on page 214. 2 (Optional) To improve streaming performance, use Virtual Disk Manager to compress the virtual disk files (.vmdk files) for a virtual machine. See the Virtual Disk Manager User’s Guide, in the Virtual Disk Development Kit. 232 VMware, Inc., Chapter 10 Cloning, Moving, and Sharing Virtual Machines 3 Depending on the type of Web server, use the following keep‐alive settings: For Apache HTTP Server 1.2 and higher, turn the KeepAlive option on, set MaxKeepAliveRequest to 2000 to 5000, and set KeepAliveTimeout to 2000 to 5000 seconds, depending on server load. For Microsoft Internet Information Services (IIS) 6.0 and higher, set the connection timeout to a value above 300 seconds and load HTTP Keep‐Alives. 4 On proxy servers, set the proxy connection to Keep‐alive. 5 Upload the virtual machine directory to the Web server. After a virtual machine is placed on a Web server, users can use a URL to stream it and start it with Workstation or VMware Player. See “Start a Virtual Machine by Using VM Streaming” on page 151.Sharing Virtual Machines with VMware Player
VMware Player is a free application that opens and plays virtual machines created with other VMware products. On Windows hosts, VMware Player also opens and plays Microsoft Virtual PC and Virtual Server virtual machines and Symantec LiveState Recovery and system images. VMware Player is included with Workstation 5.5 and higher. “Standalone” Player is also freely available for download at http://www.vmware.com/products/player/. With VMware Player you can create virtual machines and make your VMware virtual machines accessible to colleagues, partners, customers, and clients who do not own other VMware products. NOTE Use of VMware Player is subject to the VMware Player End User License terms, and VMware does not provide technical support for VMware Player. VMware, Inc. 233,Start and Exit VMware Player
VMware Player is included in the Workstation distribution. When you install Workstation, the application file (vmplayer.exe on Windows or vmplayer on Linux), is stored with the rest of your Workstation program files. To start and exit VMware Player 1 Open VMware Player, either from the graphical user interface (GUI) or from the command line: From the GUI, on Windows, choose VMware Player from the Start > Programs > VMware menu. In a Linux X session, choose VMware Player from the corresponding program menu, such as the System Tools menu. From the command line, open a command prompt, and enter one of the following commands: On Windows, enterSetting Up Virtual Machines for Use with VMware Player
When you create a virtual machine that you intend to distribute to other users, configure the virtual machine for maximum compatibility with all expected host systems. Because the configuration options for VMware Player are limited, users are limited in their ability to make changes in a virtual machine so that it is compatible with their host systems. Following are recommendations to help you configure virtual machines for maximum compatibility with VMware Player and with the widest range of host machines: Determine which virtual devices are actually required, and do not include any that are not needed or useful for the software you are distributing with the virtual machine and VMware Player. For example, generic SCSI devices are typically not appropriate. To connect a physical device to a virtual device, use the Auto detect options when configuring the virtual machine. The Auto detect options allow the virtual machine to adapt to the user’s system, and they work whether the host operating system is Windows or Linux. Users who have no physical device receive a warning message. To connect a CD‐ROM or floppy to an image file that you ship with the virtual machine, make sure the image file is in the same directory as the virtual machine. This way, a relative path, rather than an absolute path, is used. For both a physical CD‐ROM and an image, provide two virtual CD‐ROM devices in the virtual machine. VMware Player does not provide an option in the user interface to switch a single CD‐ROM device between a physical CD‐ROM and an image. This also means that if you want to ship multiple images, the user cannot switch between them. VMware, Inc. 235, Choose a reasonable amount of memory to allocate to the virtual machine. If the user’s host machine does not have enough physical memory to support the memory allocation, VMware Player cannot power on the virtual machine. Install VMware Tools in the virtual machine. VMware Tools significantly improves the user’s experience working with the virtual machine. Choose a reasonable screen resolution for the guest. A user is likely to find it easier to increase the resolution manually than to deal with a display that exceeds the user’s physical screen size. Some host operating systems do not support CD‐ROMs in non‐legacy mode. To ensure that CD‐ROMs work properly in virtual machines that you intend to distribute and play on VMware Player, configure CD‐ROM devices in legacy mode. See “Legacy Emulation for DVD and CD Drives” on page 254. Select an appropriate setting in VM > Settings > Options > Snapshots > When powering off. Set this option to Just power off or Revert to snapshot. VMware Player does not allow taking snapshots. The option Revert to snapshot is useful if you want to distribute a demo that resets itself to a clean state when powered off. 236 VMware, Inc.,Using Disks and Disk Drives 11
This chapter provides information about how to configure virtual hard disk storage to best meet your needs. This chapter includes the following topics: “Virtual Machine Disk Storage” on page 237 “Virtual Disk Maintenance Tasks” on page 240 “Adding Virtual and Physical Disks to a Virtual Machine” on page 243 “Adding DVD/CD‐ROM and Floppy Drives to a Virtual Machine” on page 252 “Using VMware Virtual Disk Manager” on page 256 “Using Dual‐Boot Computers with Virtual Machines” on page 256 “Legacy Virtual Disks” on page 256Virtual Machine Disk Storage
Like a physical computer, a VMware Workstation virtual machine stores its operating system, programs, and data files on one or more hard disks. Unlike a physical computer, Workstation provides ways to undo changes to the virtual machine’s hard disk. The New Virtual Machine wizard creates a virtual machine with one disk drive. Use the virtual machine settings editor (choose VM > Settings) to add more disk drives to your virtual machine, to remove disk drives from your virtual machine, and to change certain settings for the existing disk drives. VMware, Inc. 237,Benefits of Using Virtual Disks
In most cases, it is best to configure virtual machines to use virtual hard disks rather than physical hard disks. A virtual disk is a file or set of files that appears as a physical disk drive to a guest operating system. The files can be on the host machine or on a remote computer. When you configure a virtual machine with a virtual disk, you can install a new operating system onto the virtual disk without repartitioning a physical disk or rebooting the host. Portability A key advantage of virtual disks is their portability. Because the virtual disks are stored as files on the host machine or a remote computer, you can move them easily to a new location on the same computer or to a different computer. You can also use Workstation on a Windows host to create virtual disks, move them to a Linux computer, and use them with Workstation for Linux, and the reverse. See “Moving a Virtual Machine” on page 225. Disk Size and Files Virtual disks can be as large as 950GB (IDE or SCSI). Depending on the size of the virtual disk and the host operating system, Workstation creates one or more files to hold each virtual disk. These files include information such as the operating system, program files, and data files. The virtual disk files have a .vmdk extension. By default, the actual files that the virtual disk uses start small and grow to their maximum size as needed. The main advantage of this approach is the smaller file size. Smaller files require less storage space and are easier to move to a new location. However, it takes longer to write data to a disk configured in this way. You can also configure virtual disks so that all of the disk space is allocated when the virtual disk is created. This approach provides enhanced performance and is useful if you are running performance‐sensitive applications in the virtual machine. Regardless of whether you allocate all disk space in advance, you can configure the virtual disk to use a set of files limited to 2GB per file. Use this option if you plan to move the virtual disk to a file system that does not support files larger than 2GB. Lock Files A running virtual machine creates lock files to prevent consistency problems on virtual disks. Without locks, multiple virtual machines might read and write to the disk, causing data corruption. 238 VMware, Inc., Chapter 11 Using Disks and Disk Drives Lock files are created in subdirectories with a .lck suffix. The locking subdirectories reside in the same directory as the virtual machine’s .vmdk files. A locking subdirectory and lock file are created for .vmdk files, .vmx files, and .vmem files. Since the Workstation 6.0 release, a unified locking method is used on all host operating systems, so files shared between them are fully protected. For example, if one user on a Linux host tries to power on a virtual machine that is already powered on by another user with a Windows host, the lock files prevent the second user from powering on the virtual machine. When a virtual machine powers off, it removes the locking subdirectories and their lock files. If it cannot remove these locking controls, one or more stale lock files might remain. For example, if the host machine fails before the virtual machine removes its locking controls, stale lock files remain. When the virtual machine restarts, it scans any locking subdirectories for stale lock files and, when possible, removes them. A lock file is considered stale if both of the following conditions are true: The lock file was created on the same host that is now running the virtual machine. The process that created the lock is no longer running. If either of these conditions is not true, a dialog box warns you that the virtual machine cannot be powered on. You can delete the locking directories and their lock files manually. Locks also protect physical disk partitions. However, the host operating system is not aware of this locking convention and thus does not recognize it. For this reason, VMware recommends that the physical disk for a virtual machine not be installed on the same physical disk as the host operating system. IDE and SCSI Disk Types Virtual disks can be set up as IDE disks for any guest operating system. They can be set up as SCSI disks for any guest operating system with a driver for the LSI Logic or BusLogic SCSI adapter available in a Workstation virtual machine. You determine which SCSI adapter to use at the time you create the virtual machine. NOTE To use SCSI disks in a 32‐bit Windows XP virtual machine, download a special SCSI driver from the Downloads page of the VMware Web site. Follow the instructions on the Web site to use the driver with a fresh installation of Windows XP. A virtual disk of either type can be stored on either type of physical hard disk. That is, the files that make up an IDE or SCSI virtual disk can be stored on an IDE hard disk or a SCSI hard disk. They can also be stored on other types of fast‐access storage media. VMware, Inc. 239,Physical Disks
In some circumstances, you might need to give your virtual machine direct access to a physical hard drive on the host computer. A physical disk directly accesses an existing local disk or partition. You can use physical disks to run one or more guest operating systems from existing disk partitions. CAUTION Do not attempt physical disk configurations unless you are an expert user. Although virtual disks are limited to 950GB, physical disks can be set up on both IDE and SCSI devices of up to 2TB capacity. Booting from an operating system already set up on an existing SCSI disk or partition is currently not supported. CAUTION Running an operating system natively on the host computer and switching to running it inside a virtual machine is like pulling the hard drive out of one computer and installing it in a second computer with a different motherboard and hardware. The steps you take depend on the operating system you want to use inside the virtual machine. See the VMware technical note Dual‐Boot Computers and Virtual Machines on the VMware Web site. You can also create a new virtual machine that uses a physical disk. See “Using Physical Disks in a Virtual Machine” on page 246. In most cases, however, it is better to use a virtual disk. If you use a physical disk, the .vmdk file stores information about the physical disk or partition that the virtual machine uses. After you configure a virtual machine to use one or more partitions on a physical disk, do not modify the partition tables by running fdisk or a similar utility in the guest operating system. If you use fdisk or a similar utility on the host operating system to modify the partition table of the physical disk, you must re‐create the virtual machine’s physical disk. All files that were on the physical disk are lost when you modify the partition table.Virtual Disk Maintenance Tasks
Defragmenting virtual disks can improve performance. Compacting virtual disks reclaims any unused space. Expanding virtual disks adds storage space to your virtual machine. 240 VMware, Inc., Chapter 11 Using Disks and Disk DrivesDefragment Virtual Disks
Like physical disk drives, virtual disks can become fragmented. Defragmenting disks rearranges files, programs, and unused space on the virtual disk so that programs run faster and files open more quickly. Before you defragment a virtual disk, make sure you have adequate free working space on the host computer. If your virtual disk is contained in a single file, for example, you need free space equal to the size of the virtual disk file. Other virtual disk configurations require less free space. Make sure the virtual disk is not mapped (on Windows guests) or mounted (on Linux guests). You cannot defragment a virtual disk while it is mapped or mounted. Defragmenting does not reclaim unused space on a virtual disk. To reclaim unused space, compact the disk. See “Compact a Virtual Disk” on page 242. To defragment a virtual disk 1 Run a disk defragmentation utility inside the guest operating system. For example, in a virtual machine with a Windows XP guest operating system, use the Windows XP Disk Defragmenter tool from within the virtual machine. Defragmenting disks can take considerable time. 2 If the virtual disk is “growable” rather than preallocated, defragment it by using the Workstation defragmentation tool: a Select the virtual machine. b Make sure the virtual machine is powered off. c Choose VM > Settings. d On the Hardware tab, select Hard Disk, and do one of the following: On Linux hosts, click Defragment. On Windows hosts, click Utilities and choose Defragment. e When the process is finished, click OK. 3 Run a disk defragmentation utility on the host computer. Defragmenting disks can take considerable time. VMware, Inc. 241,Compact a Virtual Disk
Compacting a virtual disk reclaims unused space in the virtual disk. If a disk has empty space, this process reduces the amount of space the virtual disk occupies on the host drive. Make sure the following prerequisites are met: The virtual machine is powered off. The virtual disk is not mapped (on Windows guests) or mounted (on Linux guests). You cannot compact a virtual disk while it is mapped or mounted. The disk space is not preallocated for the virtual hard disk. Use the virtual machine settings editor to view the disk information for this virtual hard disk. If the disk space was preallocated, you cannot compact the disk. If the virtual hard disk is an independent disk, it is in persistent mode. To change the mode, see “Exclude a Virtual Disk from Snapshots” on page 209 for a description of independent disks. To compact a virtual disk 1 Select VM > Settings. 2 On the Hardware tab, select Hard Disk for the virtual hard disk you want to compact. 3 Select Utilities > Compact 4 Click OK after the disk compacting process is complete.Expand a Virtual Disk
Expanding a virtual disk adds storage space to your virtual machine. However, the added space is not available to your virtual machine immediately. To make the added space available, you must use a disk management tool to increase the size of the existing partition on your virtual disk to match the expanded virtual disk size. The disk management tool you use depends on the operating system of your virtual machine. Many operating systems, including Windows Vista, Windows 7, and some versions of Linux, provide built‐in disk management tools that can resize partitions. A number of third‐party disk management tools are also available, such as Symantec/Norton PartitionMagic, EASEUS Partition Master, Acronis Disk Director, and the open‐source tool GParted. As an alternative to expanding your virtual disk, you can add a new virtual disk to your virtual machine. See “Add a New Virtual Disk to a Virtual Machine” on page 244. 242 VMware, Inc., Chapter 11 Using Disks and Disk Drives Make sure the following prerequisites are met: The virtual machine is powered off. The virtual disk is not mapped (on Windows guests) or mounted (on Linux guests). You cannot expand a virtual disk while it is mapped or mounted. The virtual machine has no snapshots. The virtual machine is not a linked clone or the parent of a linked clone. To determine whether the virtual machine has snapshots, is a linked clone, or is the parent of a linked clone, check the information at the top of the Summary tab for the virtual machine. To expand a virtual disk 1 Select VM > Settings. 2 On the Hardware tab, select Hard Disk for the virtual hard disk to expand. 3 Select Utilities > Expand. 4 Set the new maximum size for the virtual disk. 5 Select Expand. 6 Click OK after the disk expansion process is complete. After you expand the virtual disk, you must use a disk management tool to increase the disk partition size to match the expanded virtual disk size.Adding Virtual and Physical Disks to a Virtual Machine
This provides instructions for creating virtual disks, removing disks, adding existing disks to virtual machines, and using physical disks in a virtual machine. You can connect other SCSI devices to a virtual machine by using the generic SCSI driver for the host operating system. See “Add a Generic SCSI Device to a Virtual Machine” on page 365. VMware, Inc. 243,Add a New Virtual Disk to a Virtual Machine
To increase storage space, you can add a new virtual disk to a virtual machine. Virtual disks are stored as files on the host computer or on a network file server. Avirtual IDE drive or SCSI drive can be stored on a physical IDE drive or SCSI drive. NOTE If you have a Windows NT 4.0 guest with a SCSI virtual disk, you cannot add both an additional SCSI disk and an IDE disk to the configuration. As an alternative to adding a new virtual disk to your virtual machine, you can expand your existing virtual disk. See “Expand a Virtual Disk” on page 242. To add a new virtual disk to a virtual machine 1 Select the virtual machine and choose VM > Settings. 2 On the Hardware tab, click Add to start the Add Hardware wizard. 3 On the Hardware Type page, select Hard Disk and click Next. 4 On the Select a Disk page, select Create a new virtual disk and click Next. 5 On the Select a Disk Type page, choose IDE disk or SCSI. See “IDE and SCSI Disk Types” on page 239. Workstation 7.0 virtual machines can use up to 4 IDE devices and up to 60 SCSI devices. Any of these devices can be a virtual or physical hard disk or DVD or CD‐ROM drive. 6 (Optional) To exclude disks from snapshots, in the Mode section, select Independent for the mode and choose one of the following options: Persistent – Disks in persistent mode behave like conventional disks on a physical computer. All data written to a disk in persistent mode is written permanently to the disk. Nonpersistent – Changes to disks in nonpersistent mode are discarded when you power off or reset the virtual machine. Nonpersistent mode enables you to restart the virtual machine with a virtual disk in the same state every time. Changes to the disk are written to and read from a redo log file that is deleted when you power off or reset the virtual machine. See “Information Captured by Snapshots” on page 207. 7 On the Specify Disk Capacity page, set the capacity for the new virtual disk. You can set a size between 0.1GB and 950GB for a virtual disk. See “Disk Size and Files” on page 238. 244 VMware, Inc., Chapter 11 Using Disks and Disk Drives 8 On the Specify Disk File page, accept the default filename and location or browse to and select a different location and click Finish. The wizard creates the new virtual disk. It appears to your guest operating system as a new, blank hard disk. 9 In the virtual machine settings editor, click OK. 10 Use the guest operating system tools to partition and format the new drive for use.Add an Existing Virtual Disk to a Virtual Machine
You can reconnect an existing virtual disk that was removed from a virtual machine. Workstation 7.0 virtual machines can use up to 4 IDE devices and up to 60 SCSI devices. Any of these devices can be a virtual or physical hard disk or DVD or CD‐ROM drive. To map an existing virtual disk drive to a Windows host machine, rather than adding it to a virtual machine, see “Using a Mapped Drive” on page 200. To add an existing virtual disk to a virtual machine 1 Select the virtual machine. 2 Choose VM > Settings. 3 On the Hardware tab, click Add to start the Add Hardware wizard. 4 On the Hardware Type page, select Hard Disk and click Next. 5 On the Select a Disk page, select Use an existing virtual disk and click Next. 6 On the Select an Existing Disk page, specify the path name and filename for the existing disk file and click Finish. 7 In the virtual machine settings editor, click OK.Remove a Virtual Disk from a Virtual Machine
Removing a virtual disk disconnects it from a virtual machine. Removing the virtual disk does not delete files from the host file system. After you remove the disk from the virtual machine, you can map or mount it to a host and copy data from the guest to the host without powering on the virtual machine or starting Workstation. VMware, Inc. 245, To remove a virtual disk from a virtual machine 1 Select the virtual machine. 2 Choose VM > Settings. 3 On the Hardware tab, select a virtual disk and click Remove. After you remove the disk from the virtual machine, you can do either of the following: Map the disk to the host. See “Using a Mapped Drive” on page 200. Add the disk to another virtual machine. See “Add an Existing Virtual Disk to a Virtual Machine” on page 245.Using Physical Disks in a Virtual Machine
You can install a guest operating system directly on an unused physical disk or unused partition. However, an operating system installed in this setting probably cannot boot outside of the virtual machine, even though the data is available to the host. CAUTION Do not use a physical disk to share files between host and guest operating systems. It is not safe to make the same partition visible to both host and guest. You can cause data corruption if you do this. To share files between host and guest operating systems, use shared folders. See “Using Shared Folders” on page 192. For information about using an operating system that can also boot outside of the virtual machine, see the VMware Dual‐Boot Computers and Virtual Machines technical note on the VMware Web site. Physical disks are an advanced feature. Do not configure them unless you are an expert user. To use a physical disk in a virtual machine, you can add the physical disk to an existing virtual machine, or create a virtual machine and specify which physical disk the virtual machine uses. NOTE Using a physical disk rather than a virtual disk is not an appropriate option for a virtual machine you intend to distribute as an ACE instance. 246 VMware, Inc., Chapter 11 Using Disks and Disk Drives Prerequisites for Using a Physical Disk Before you run the New Virtual Machine wizard or use the virtual machine settings editor to add a physical (raw) disk, perform the following tasks: Because the virtual machine and guest operating system access a physical disk partition while the host continues to run its operating system, verify that the partition is not mounted by the host or in use by another virtual machine. Corruption is possible if you allow the virtual machine to modify a partition that is simultaneously mounted on the host operating system. Check the guest operating system documentation regarding the type of partition on which the operating system can be installed. On Windows Vista and Windows 7 hosts, you cannot use the system partition or the physical disk that contains it in a virtual machine. DOS, Windows 95, and Windows 98 operating systems must be installed on the first primary partition. Other operating systems, such as Linux, can be installed on a primary or an extended partition on any part of the drive. Make sure the physical partition or disk does not have data you need in the future. If it does, back up the data. On Windows hosts: If you use a Windows host’s IDE disk in a physical disk configuration, make sure it is not configured as the slave on the secondary IDE channel if the master on that channel is a CD‐ROM drive. If your host is running Windows XP or Windows Server 2003, do not use a dynamic disk as a physical disk in a virtual machine. Use the disk management tool to check the disk type and change a dynamic disk to a basic disk, which destroys all data. See “Change a Windows Disk Type from Dynamic to Basic” on page 248. On Linux hosts, set the device group membership or device ownership appropriately. See “Set Permissions on Linux Hosts” on page 249. After you determine that the physical disk meets these prerequisites, use either of the following strategies to use the physical disk in a virtual machine: “Create a Virtual Machine That Uses a Physical Disk” on page 249 “Add a Physical Disk to an Existing Virtual Machine” on page 251 VMware, Inc. 247, Change a Windows Disk Type from Dynamic to Basic To use a hard disk in a virtual machine whose host is running Windows XP or Windows Server 2003, the virtual machine must use a basic disk. To change a Windows disk type from dynamic to basic 1 On the host, choose Start > Settings > Control Panel > Administrative Tools > Computer Management > Disk Management. The disk management tool opens. 2 Delete all logical volumes on the disk. This action destroys all data on the disk. 3 Right‐click the disk icon and select Revert to Basic Disk. 4 Partition the disk. Unmap a Partition That Is Mapped to a Windows Server 2003 or Windows XP Host Corruption can occur if you allow the virtual machine to modify a physical disk partition that is simultaneously used as a mapped drive on the host. To unmap a partition that is mapped to a Windows Server 2003 or Windows XP host 1 Choose Start > Settings > Control Panel > Administrative Tools > Computer Management > Storage > Disk Management. 2 Select a partition and choose Action > All Tasks > Change Drive Letter and Paths. 3 Click Remove. Unmap a Partition That Is Mapped to a Windows Vista Host Corruption can occur if you allow the virtual machine to modify a physical disk partition that is simultaneously used as a mapped drive on the host. To unmap a partition that is mapped to a Windows Vista host 1 Select Start > Control Panel (Classic View) > Administrative Tools > Computer Management > Storage > Disk Management. 2 Right‐click a partition and choose Change Drive Letter and Paths. 3 Click Remove and OK. 248 VMware, Inc., Chapter 11 Using Disks and Disk Drives Unmap a Partition That Is Mapped to a Windows 7 Host Corruption can occur if you allow the virtual machine to modify a physical disk partition that is simultaneously used as a mapped drive on the host. To unmap a partition that is mapped to a Windows 7 host 1 Select Start > Control Panel. 2 In the menu bar, click the arrow next to Control Panel. 3 From the drop‐down menu, select All Control Panel Items > Administrative Tools > Computer Management > Storage > Disk Management(Local). 4 Right‐click a partition and choose Change Drive Letter and Paths. 5 Click Remove and OK. Set Permissions on Linux Hosts If permissions are set correctly, the physical disk configuration files in Workstation control access. This reliability provides boot managers access to configuration files and other files they might need to boot operating systems. For example, LILO needs to read /boot on a Linux partition to boot a non‐Linux operating system that might be on another drive. To set permissions on Linux hosts 1 Make sure the master physical disk device or devices are readable and writable by the user who runs Workstation. Physical devices, such as /dev/hda (IDE physical disk) and /dev/sdb (SCSI physical disk), belong to group‐id disk on most distributions. If this is the case, you can add VMware Workstation users to the disk group. Another option is to change the owner of the device. Consider all the security issues involved in this option. 2 Grant VMware Workstation users access to all /dev/hd[abcd] physical devices that contain operating systems or boot managers. Create a Virtual Machine That Uses a Physical Disk Use the New Virtual Machine wizard to create a new virtual machine that uses a physical disk rather than adding a physical disk to an existing virtual machine. Before you begin, complete the tasks described in “Prerequisites for Using a Physical Disk” on page 247. VMware, Inc. 249, To create a virtual machine that uses a physical disk 1 Use the Custom setup in the New Virtual Machine wizard to create a virtual machine that uses a physical disk. 2 On the Select a Disk page of the wizard, select Use a physical disk, and choose to use individual partitions or the entire disk. If you use individual partitions, only the partitions you select are accessible to the virtual machine. The other partitions might be visible to the guest operating system, but you cannot mount, access, or format them. 3 (Optional) To specify a device node for the virtual disk or exclude disks from snapshots, do the following: a Select the virtual machine and choose VM > Settings. b On the Hardware tab, select the physical disk and click Advanced. c To change the device node, select from the Virtual device node list. d To exclude disks from snapshots, select Independent for the mode and choose one of the following options: Persistent – Disks in persistent mode behave like conventional disks on a physical computer. All data written to a disk in persistent mode is written permanently to the disk. Nonpersistent – Changes to disks in nonpersistent mode are discarded when you power off or reset the virtual machine. Nonpersistent mode enables you to restart the virtual machine with a virtual disk in the same state every time. Changes to the disk are written to and read from a redo log file that is deleted when you power off or reset the virtual machine. See “Information Captured by Snapshots” on page 207. 4 Install the guest operating system on the physical disk. For guest operating system support, known issues, and installation instructions, see the online VMware Compatibility Guide. Go to the VMware Web site and select Resources > Compatibility Guides, and click the View the Guest/Host OS tab on the VMware Compatibility Guide Web site link. 250 VMware, Inc., Chapter 11 Using Disks and Disk Drives Add a Physical Disk to an Existing Virtual Machine Use the virtual machine settings editor, rather than the New Virtual Machine wizard, to add a physical disk to an existing virtual machine. Before you begin, complete the tasks described in “Prerequisites for Using a Physical Disk” on page 247. CAUTION After you add a virtual machine disk by using one or more partitions on a physical disk, never modify the partition tables by running fdisk or a similar utility in the guest operating system. If you do so, you must re‐create the virtual machine’s physical disk. To add a physical disk to an existing virtual machine 1 Select the virtual machine. 2 Make sure the virtual machine is powered off. 3 Choose VM > Settings. 4 On the Hardware tab, click Add. 5 On the Hardware Type page, select Hard Disk and click Next. 6 On the Select a Disk page, select Use a physical disk and click Next. 7 If a warning appears, click OK. 8 On the Select a Physical Disk page, do the following: a Choose the physical hard disk to use from the drop‐down list. Workstation supports physical disks up to 2TB. b Select whether you want to use the entire disk or only individual partitions on the disk and click Next. 9 If you selected Use individual partitions, select the partitions you want to use in the virtual machine and click Next. The virtual machine can access only the partitions you select. The guest operating system might be able to detect other partitions, but you cannot mount, access, or format them. 10 On the Specify Disk File page, accept the default filename and location or browse to a different location. VMware, Inc. 251, 11 (Optional) To specify a device node for the virtual disk or exclude disks from snapshots, do the following: a On the Specify Disk File page, click Advanced. b To change the device node, select from the Virtual device node list. c To exclude disks from snapshots, select Independent for the mode and choose one of the following options: Persistent – Disks in persistent mode behave like conventional disks on a physical computer. All data written to a disk in persistent mode is written permanently to the disk. Nonpersistent – Changes to disks in nonpersistent mode are discarded when you power off or reset the virtual machine. Nonpersistent mode enables you to restart the virtual machine with a virtual disk in the same state every time. Changes to the disk are written to and read from a redo log file that is deleted when you power off or reset the virtual machine. See “Information Captured by Snapshots” on page 207. 12 Click Finish. 13 Use the guest operating system’s tools to format any partitions on the physical disk that are not formatted for your guest operating system.Adding DVD/CD-ROM and Floppy Drives to a Virtual Machine
Workstation 7.0 virtual machines can use up to 4 IDE devices and up to 60 SCSI devices. Any of these devices can be a virtual or physical hard disk or DVD or CD‐ROM drive. By default, floppy drive is not connected when the virtual machine powers on. A virtual machine can read data from a DVD disc. Workstation does not support playing DVD movies in a virtual machine. You might be able to play a movie if you use a DVD player application that does not require video overlay support in the video card.Add DVD or CD Drives to a Virtual Machine
You can add one or more DVD or CD drives to your virtual machine. You can connect the virtual DVD or CD drive to a physical drive on the host machine or to an ISO image file. 252 VMware, Inc., Chapter 11 Using Disks and Disk Drives You can configure the virtual DVD or CD drive as either IDE or SCSI regardless of the type of physical drive you connect it to. For example, if your host computer has an IDE CD drive, you can set up the virtual machine drive as either SCSI or IDE and connect it to the host drive. The same is true if the physical drive on the host is a SCSI drive. To add a DVD or CD drive to a virtual machine 1 Select the virtual machine. 2 Choose VM > Settings. 3 On the Hardware tab, click Add. 4 On the Hardware Type page, select DVD/CD‐ROM Drive and click Next. 5 Make a selection on the Select a Drive Connection page and click Next. 6 (Optional) If you select Use physical drive: a Choose a drive from the drop‐down list or choose Auto detect. b To avoid connecting the CD drive when the virtual machine starts, deselect Connect at power on. c To specify which device node the drive uses in the virtual machine, click Advanced. Select Legacy emulation only if you experienced problems using normal mode. See “Legacy Emulation for DVD and CD Drives” on page 254. d Click Finish. 7 (Optional) If you select Use ISO image: a Enter the path and filename for the image file or browse to the file. b To avoid connecting the CD drive when the virtual machine starts, deselect Connect at power on. c To specify which device node the drive uses in the virtual machine, click Advanced. d Click Finish. The drive is set up initially so that it appears as an IDE drive to the guest operating system. 8 (Optional) To make the drive appear to the guest operating system as a SCSI drive, click the entry for that drive in the virtual machine settings editor and edit the settings in the panel on the right. VMware, Inc. 253, Legacy Emulation for DVD and CD Drives In normal mode (that is, not legacy emulation mode), the guest operating system communicates directly with the CD or DVD drive. This direct communication enables you to read multisession CDs, perform digital audio extraction, view videos, and use CD and DVD writers to burn discs. Legacy emulation mode enables you to read only from data discs in the DVD or CD drive. It does not provide the other capabilities of normal mode. Use legacy emulation mode to work around direct communication problems between a guest operating system and a DVD or CD drive. Use the virtual machine settings editor (VM > Settings > Advanced) to set the Legacy emulation option for DVD and CD drives attached to the virtual machine: On Windows hosts, this option is deselected by default. On Linux hosts with IDE drives, the default setting depends on whether the ide-scsi module is loaded in your kernel. The ide-scsi module must be loaded, or you must be using a physical SCSI drive to connect directly to the DVD or CD drive. If you run more than one virtual machine at a time, and if their CD drives are in legacy emulation mode, start the virtual machines with their CD drives disconnected. This ensures that multiple virtual machines are not connected to the CD drive at the same time.Add a Floppy Drive to a Virtual Machine
You can add up to two floppy drives to a virtual machine. A virtual floppy drive can connect to a physical floppy drive on the host computer, to an existing floppy image file, or to a blank floppy image file. By default, floppy drive is not connected when the virtual machine powers on. To add a floppy drive to a virtual machine 1 Select the virtual machine. 2 Make sure the virtual machine is powered off. 3 Choose VM > Settings. 4 On the Hardware tab, click Add. 5 On the Hardware Type page, select Floppy Drive and click Next. 6 Follow the instructions to complete the wizard. 254 VMware, Inc., Chapter 11 Using Disks and Disk Drives 7 In the Device Status section, select the Connect at power on option to connect the floppy drive when the virtual machine powers on. 8 (Optional) If you are adding a second floppy drive to the virtual machine, enable this second floppy drive in the virtual machine BIOS, as follows: a Select the virtual machine and choose VM > Power > Power On to BIOS. b On the main screen, choose Legacy Diskette B: and use the plus (+) and minus (‐) keys on the numerical keypad to select the type of floppy drive to use. c Press F10 to save the settings.Connect a CD-ROM, DVD, or Floppy Drive to an Image File
You can connect an existing virtual CD‐ROM, DVD to an ISO image file or floppy drive to a floppy image (.flp or .img) file rather than the physical drive on the host. For example, an ISO image file resembles a CD‐ROM to your guest operating system and appears as a CD‐ROM in Windows Explorer. In some host configurations, the virtual machine cannot boot from the installation CD‐ROM. To avoid that problem, create an ISO image file from the installation CD‐ROM. To connect a CD-ROM, DVD, or floppy drive to an image file 1 Select the virtual machine. 2 Choose VM > Settings. 3 On the Hardware tab, select a DVD, CD‐ROM, or floppy drive. 4 Do one of the following: For a DVD or CD‐ROM drive, select Use ISO Image and specify the path name and filename. For a floppy drive: If the file already exists, select Use floppy Image and specify the path name and filename. To create an image file, click Create, browse to the directory where you plan to store the floppy image file, supply a filename, and click Save (on Windows hosts) or Open (on Linux hosts). 5 (Optional) To make the file read only, select the Read Only check box. 6 Click OK. VMware, Inc. 255,Using VMware Virtual Disk Manager
VMware Virtual Disk Manager is a Workstation utility that allows you to create, manage, and modify virtual disk files from the command line or in scripts. You can enlarge a virtual disk so that its maximum capacity is larger than it was when you created it. This is useful if you need more disk space in a given virtual machine, but do not want to add another virtual disk or use ghosting software to transfer the data on a virtual disk to a larger virtual disk. You cannot do this with physical hard drives. You can also change disk types. When you create a virtual machine, you specify how disk space is allocated, as follows: All space for the virtual disk is allocated in advance. This corresponds to the preallocated disk type for Virtual Disk Manager. Space allocated for the virtual disk begins small and grows as needed. This corresponds to the growable disk type for Virtual Disk Manager. If you allocate all the disk space for a virtual disk but later need to reclaim some hard disk space on the host, you can convert the preallocated virtual disk into a growable disk. The new virtual disk is still large enough to contain all the data in the original virtual disk. You can also change whether the virtual disk is stored in a single file or split into 2GB files. These features and the ability to use scripting to automate management of virtual disks were added to Workstation in version 5.0. See the VMware technical note about using Virtual Disk Manager.Using Dual-Boot Computers with Virtual Machines
Some users install Workstation on a dual‐boot or multiple‐boot computer so that they can run one or more of the existing operating systems in a virtual machine. For more information about using dual‐boot computers with Workstation, see the VMware Dual‐Boot Computers and Virtual Machines technical note on the VMware Web site.Legacy Virtual Disks
You have several options for using Workstation 7.0 in a mixed environment with virtual machines that were created with earlier versions of Workstation or created with other VMware products. For compatibility information, see the VMware Virtual Machine Mobility Planning Guide. 256 VMware, Inc., You can use Workstation 7.0 to power on virtual machines created with older versions of Workstation or other VMware products. However, many new features of Workstation are not available in older virtual machines. To upgrade your virtual machines to Workstation 7.0, see “Change the Version of a Virtual Machine” on page 96. If you decide not to upgrade a virtual machine, VMware recommends that you upgrade VMware Tools to the latest version. See “VMware Tools Update Process” on page 117. Do not remove the older version of VMware Tools before installing the new version. You can also use Workstation to create a version 4, 5.x, or 6.x virtual machine. See “Use the New Virtual Machine Wizard” on page 91. Use the Custom setup in the wizard. NOTE If you have Workstation 2 or 3 virtual machines that you want to use with Workstation 7.0, upgrade the virtual machines to at least Workstation version 4 before you attempt to power them on with Workstation 7.0. 257 VMware, Inc., 258 VMware, Inc.,Recording and Replaying Virtual Machine Activity 12
The record/replay feature allows you to record all of a Workstation 5.x, 6.x, or 7.0 virtual machine’s activity over a period of time. This chapter includes the following topics: “Uses of the Record/Replay Feature” on page 259 “Physical and Virtual Hardware Requirements” on page 260 “Configure Record/Replay for a Virtual Machine” on page 261 “Create a Recording” on page 266 “Replay a Recording” on page 267 “Using an Execution Trace File of a Recording” on page 268 “Maintenance Tasks for Using Recordings” on page 270Uses of the Record/Replay Feature
Unlike Workstation’s movie‐capture feature, the record/replay feature records all the processor instructions of the virtual machine throughout the time of the recording. This feature helps software developers and QA engineers to record a bug and attach a debugger while replaying the recording. After you enable the record/replay feature for a virtual machine, click the Record button in the toolbar to start the recording and click Stop to end the recording. You can make multiple recordings and use the snapshot manager to name, delete, and play them. While you are making a recording you can insert replay snapshots to return to events and replay them. To mark a point of interest in the recording you can add a marker. You can also make an execution trace file of a recording, to record events that occur during the recording. VMware, Inc. 259, Playing a recording is similar to going to a snapshot. When you play a recording, you discard the current state of the virtual machine and go to the recording. At any time when the recording is playing, you can click the Go Live button and resume interacting with the guest operating system at the state the virtual machine is in when you click Go Live. NOTE Virtual machine recordings are not interchangeable between different versions of Workstation. Recordings created using earlier Workstation or beta releases cannot be replayed using the current version of Workstation.Physical and Virtual Hardware Requirements
Following is a list of requirements for and limitations of this feature: Host CPUs – Record/replay support is limited to certain processors on the host. If you use the record/replay feature on a host computer that does not have the supported processor, when you enable the record/replay feature and try to create a recording, a message appears, informing you that recording is not supported on your processor. Supported processors include Intel Pentium 4, Intel Core 2 and later versions, Next‐Generation Intel Microarchitecture ‐ Nehalem, and Penryn/Harpertown, and AMD Barcelona and later versions. Other processors might operate more slowly during recording and replaying. NOTE If the record/replay feature is unstable on your P4 system, disable hyperthreading and logical processors in the BIOS. When these features are enabled in BIOS, other applications using performance counters may interfere with the virtual machine running in the record/replay mode. An example of an application using performance counters is the performance profiling tool. To ensure that the processor configuration is compatible with record/replay, you must configure your virtual machine. See “Configure Record/Replay for a Virtual Machine” on page 261. Virtual machine version – Only Workstation 5.x, 6.x, and 7.0 virtual machines can be recorded. 260 VMware, Inc., Chapter 12 Recording and Replaying Virtual Machine Activity Supported operating systems – You can use the record/replay feature for the following guest operating systems: Windows 2000, XP, 2003, Vista, 7 Red Hat Enterprise Linux 3 and 4 SUSE Linux 9.3 and 10.x 64‐bit versions of the these guest operating systems might not work with some old host CPUs. Unsupported virtual hardware – SMP and paravirtualization on VMI are not supported with record/replay. Disk space – How much disk space a recording uses depends on the type of activity that occurs on the virtual machine and the duration of the recording session. By default, a screenshot is created every 15 seconds. Therefore, assume that you will need several megabytes of disk space for one minute of recording. NOTE Having a number of virtual machines with high‐resolution display settings open on the screen consumes more disk space. Disk mode – You cannot use the record/replay feature if the virtual machine’s virtual hard disk is set to independent mode. Recording virtual machine activity requires writing data about the disk to a continual snapshot. Use the virtual machine settings editor to change the disk mode (select VM > Settings > Hardware > Hard Disk > Advanced).Configure Record/Replay for a Virtual Machine
Make sure that the virtual machine meets the requirements listed in “Physical and Virtual Hardware Requirements” on page 260. To configure record/replay for a virtual machine 1 Make sure the virtual machine is powered off. 2 Select the virtual machine and select VM > Settings. 3 To set processor configuration for record/replay, select VM > Settings > Hardware > Processors and select 1 processor with 1 core per processor. VMware, Inc. 261, 4 In the Preferred mode drop‐down menu, select Automatic or Automatic with Replay to let Workstation select the execution mode based on the guest operating system and the host CPU. Automatic with Replay refers to the execution record/replay feature. For many combinations of CPU and guest operating system, you can select Automatic and still use the record/replay feature. If not, an error message directs you to select Automatic with Replay. Selecting Automatic or Automatic with Replay means that Workstation selects one of the following: Binary translation – Uses a mix of directly executing guest code and binary translation to run the guest. This option uses shadow page tables to map guest memory. Intel VT‐x or AMD‐V – Uses hardware extensions to run and isolate guest code. This option also uses shadow page tables to map guest memory. Intel VT‐x/EPT or AMD‐V/RVI – Uses hardware extensions to run and isolate guest code. This option uses hardware paging support to map guest memory. The choice depends on which mode provides the best performance for the selected guest operating system on the host’s CPU. 5 Click the Options tab and select Replay. 6 (Optional) On the Replay settings panel as a safety precaution, use the When Recording controls to limit how much disk space the recording can use. Setting the Maximum disk space to Unlimited uses much more disk space than setting it to 2GB. Selecting Save the last sets the duration of the time to save the recording. Setting Snapshot frequency to 5 min uses much more disk space than setting it to Never. 7 (Optional) Select the Enable VAssert (experimental) check box to use VMware VAssert to debug applications. VAssert enables developers and support engineers to take advantage of traditional assert and logging capabilities to debug errors in replay logs. The asserts appear only during replay of a recording. 262 VMware, Inc., Chapter 12 Recording and Replaying Virtual Machine Activity 8 (Optional) Select the Enable Visual Studio debugger (experimental) check box to use the Integrated Virtual Debugger for Visual Studio on Windows only. Developers can use record/replay to record an execution of an application and debug the recorded form of the application. Recorded bugs can be replayed repeatedly and exhibit the same behavior. 9 Click OK.Record Control Dialog Box Features
On Windows, a record control dialog box appears when you click the Record button in the toolbar. On Linux, the record options are located in the toolbar. NOTE On Linux, you cannot add markers to a recording. Stop – Stops the recording that is in progress. Add Snapshot – Takes a replay snapshot at the current location within the recording. You can use this snapshot during replay to skip ahead in a recording. Add Marker – Adds a marker in the recording without taking a replay snapshot. You can add and label a marker as a reminder of a point of interest in the recording. Minimize – On Windows and Linux hosts, the (‐) button minimizes the record control dialog box to the lower‐left side of the status bar. The minimized mode allows you to work on the virtual machine and use the controls in the status bar to either stop a recording or add a marker. NOTE You cannot close the record control dialog box. Maximum disk space – Shows the maximum disk space quota allocated for the recording. Saving the last – Displays the approximate duration of time where the end of a recording is saved. For example, if you are saving the last 30 minutes of the recording, as the recording continues, only the last 30 minutes of the virtual machine activity is saved at any given time. Snapshot Frequency – Shows the frequency when an automatic replay snapshot is added to the recording. Next auto snapshot – Displays when the next automatic replay snapshot is going to be added to the recording. Last snapshot – Indicates when the last replay snapshot was added to the recording. VMware, Inc. 263,Replay Control Dialog Box Features
The replay control dialog box appears when you replay a recording. NOTE On Linux, you cannot add markers to a recording. Figure 12-1. Windows Replay Control Dialog Box current replay position slider replay snapshot marker zoom controls replay speed Go to Beginning Go to Previous Snapshot Go to Next Snapshot control Figure 12-2. Linux Replay Control Dialog Box current replay position slider replay snapshots replay speed control pause The replay control dialog box contains the following buttons: Play/Pause – Plays the last recording you made for the selected virtual machine. If the virtual machine is powered off, the recording is resumed as if it had been suspended. If you click the same button once, the replay is paused. To resume replay, click the button again. Go Live – Stops the replay that is in progress and reverts to the current state of the virtual machine. Add Snapshot – Takes a replay snapshot at the current location within the recording. You can use this snapshot during replay to skip ahead in a recording. 264 VMware, Inc., Chapter 12 Recording and Replaying Virtual Machine Activity Add Marker – Adds a marker in the recording without taking a replay snapshot. You can add and label a marker as a reminder of a point of interest in the recording. Go to Beginning – Returns to the beginning of the recording. Go to Previous Snapshot – Replays the recording to the point where the previous replay snapshot is located and pauses the playback. Go to Next Snapshot– Replays the recording to the point where the next replay snapshot is located and pauses the playback. Go to This Snapshot – Replays the recording from the selected replay snapshot. Right‐click the replay snapshot icon to use this option. Rename This Snapshot – Renames the selected replay snapshot. Right‐click the replay snapshot icon to use this option. Delete Up to This Snapshot – Deletes the portion of the recording up to the selected replay snapshot. All the markers and replay snapshots up to the selected replay snapshot are deleted and cannot be recovered. Right‐click the replay snapshot icon to use this option. Delete After This Snapshot – Deletes the remaining portion of the recording after the selected replay snapshot. All the markers and replay snapshots after the selected replay snapshot are deleted and cannot be recovered. Right‐click the replay snapshot icon to use this option. Rename This Marker – Renames the selected marker. Right‐click the marker icon to use this option. Delete This Marker – Deletes the selected marker. Right‐click the marker icon to use this option. Current Replay Position Slider – Allows you to preview a replay. You can drag the slider to the nearest previous marker or replay snapshot and start replaying. On Linux, the auto‐scroll function of the zoomed in portion is enabled. The Current Replay Position Slider is a red arrow located in the progress timeline. Zoom control – Controls the zoom in and out function during replay. Minimize – The (‐) button minimizes the dialog box to the bottom left‐hand side of the status bar. The minimized mode allows you to view the recording in the virtual machine and use the controls in the status bar. The progress indicator in the status bar shows the timeline of the recording. NOTE You cannot close the replay control dialog box. VMware, Inc. 265, Replay speed control – Controls the replay speed of a recording. On Windows, click the right button to increase the replay speed to the maximum. Click the left button to decrease the replay speed to normal. On Linux, click button to toggle between speeds. NOTE The speed of a playback depends on the host activity and workload of the guest.Create a Recording
While creating a recording you cannot pause or reverse it. For more information about enabling record/replay see “Configure Record/Replay for a Virtual Machine” on page 261. Before you begin, verify the screen resolution settings. The existing screen resolution is used in the virtual machine while replaying a recording. The resolution cannot be changed during replay. NOTE If you hot remove a virtual device from the guest by using the Windows Safely Remove Hardware option while creating a recording, the recording terminates unexpectedly. To create a recording 1 Power on the virtual machine. 2 To begin recording select VM > Replay > Record. A recording‐specific snapshot is taken, and the recording dialog box indicates that recording is in progress. If the Record command is unavailable, the feature might not be enabled or the hard disk might be set to independent mode. 3 (Optional) To add a replay snapshot during recording, click Add Snapshot and label the replay snapshot in the Add Replay Snapshot dialog box. Taking a snapshot pauses the execution of the virtual machine for a few seconds. Aside from the replay snapshots you add, replay snapshots are automatically added according to the frequency you set by using the virtual machine settings editor. 4 (Optional) To add a marker during recording, click Add Marker and label the marker in the Add Marker dialog box. Adding markers does not pause the execution of the virtual machine. 266 VMware, Inc., Chapter 12 Recording and Replaying Virtual Machine Activity 5 To stop recording, click the Stop button in the recording dialog box or in the toolbar. (Optional) On Windows, while making a recording, you can use the minimized record control to stop a recording, add a replay snapshot, or add a marker. 6 Complete the dialog box that appears and click Save. 7 To change the name of the recording, add or change the description, or delete the recording, select VM > Snapshot > Snapshot Manager.Replay a Recording
If you change from windowed mode to full screen mode during replay, the auto‐fit feature does not work. To replay a recording 1 Select the virtual machine. 2 If it is powered on and you do not want to lose the current state of the virtual machine, take a snapshot of it. For instructions, see “Take a Snapshot” on page 211. 3 To play the latest recording of the virtual machine select VM > Replay > ReplayBrowse a Recording
The length of a recording can vary from a few minutes to several hours. When the recording is several hours long, use the position slider to access the recording at random intervals. On Windows and Linux hosts, zoom in and out of the recording by using the zoom controls. Use the zoomed in auto‐scroll function to browse the recording. To browse a recording 1 Open a recording. 2 Drag the slider from the current position in the recording to another specific position. The new slider position must have a 16 second interval from the previous position. 3 (Optional) In the confirmation dialog box, select the check box Never show this again. The dialog box stops reappearing every time you browse a recording. 4 Click OK. The virtual machine reverts to the nearest previous replay snapshot and starts replaying until it reaches the target location. During the replay, the slider remains at the same point, and the remaining playback time appears in red above the slider. For more information, see Figure 12‐1.When the recording reaches the slider’s position, the recording is paused.Using an Execution Trace File of a Recording
Trace files are detailed logs that are helpful for debugging. When you make an execution trace file of a recording, you can view all the events that occurred during the recording. When a recording is replayed, instruction tracing can be turned on and off by pressing the t key with the mouse grabbed by the guest operating system windows. 268 VMware, Inc., Chapter 12 Recording and Replaying Virtual Machine ActivityEnable Execution Tracing for a Recording
Execution tracing is disabled by default. To create execution trace files for a recording, you must enable it. Before you begin, power off the virtual machine. To enable execution tracing 1 Open the preferences file with a text editor. This file is located in: On Windows Server 2003 and Windows XP hosts, C:\Documents and Settings\Create an Execution Trace File of a Recording
After enabling execution tracing, when you create an execution file of a recording, the Trace button appears in the replay dialog box. To create an execution trace file of a recording 1 Replay a recording. 2 In the replay dialog box, click Trace to start the trace file. The play back speed of the recording slows considerably while the trace file is created. 3 To end the trace file, click Trace again. Otherwise, the trace file ends when the recording finishes replaying.Maintenance Tasks for Using Recordings
Depending on the length of a recording, the number of its periodic screenshots, and the number of recordings, the disk space used for the record/replay feature can be large. When you create recordings, Workstation goes into full debugging mode.Delete a Recording
To free disk space, delete recordings that you do not need. To delete a recording 1 Select the virtual machine. 2 Select VM > Snapshot > Snapshot Manager. 3 In the Snapshot Manager window, select the recording to delete. 4 Right‐click and select Delete Recording and Children. If you select a recording and click the Delete button, the selected recording is removed and the corresponding snapshots in the recording remain intact. 270 VMware, Inc., Chapter 12 Recording and Replaying Virtual Machine ActivityDisable Periodic Screenshots
If the recording session lasts for a long time, a significant number of screenshots are automatically created in the virtual machine directory. Even when periodic screenshots are disabled, one screenshot is taken at the end of every recording. To disable periodic screenshots 1 Add the following line to the configuration (.vmx) file for the virtual machine where X denotes the interval of screenshots taken in seconds. The default value for X is 15 seconds. snapshot.periodicScreenshots = "X" 2 To disable periodic screenshots, change the value of X to 0. 3 Save and close the configuration file. VMware, Inc. 271, 272 VMware, Inc.,Configuring Teams 13
This chapter describes what virtual machine teams are used for, how to create them, and how to configure them. This chapter includes the following topics: “Benefits of Using Teams” on page 273 “Managing Teams” on page 274 “Summary and Console Views for Teams and Their Virtual Machines” on page 278 “Managing the Members of a Team” on page 278 “Power Operations for Teams and Their Members” on page 281 “Working with Team Networks” on page 282 “Cloning and Taking Snapshots of Team Virtual Machines” on page 285Benefits of Using Teams
Workstation teams allow you to set up a virtual computer lab on one host computer. Use a team to power on multiple associated virtual machines with a single click. You can use teams to do the following: Virtualize‐multitier environments – Start separate client, server, and database virtual machines with one click. Configure startup delay times so clients do not submit queries before the server is ready. Setting a startup delay between the booting of virtual machines also avoids overloading the CPU of the host. Virtualize multiple‐machine testing environments – Set up a software package for QA on a virtual machine and configure automation on other virtual machines to test the first. VMware, Inc. 273, Virtualize network performance and security – Team virtual machines can use networking just as other virtual machines can. In addition, team members can communicate in private networks called LAN segments. Team networking lets you to do the following: Isolate a team completely from the host network. A team LAN segment is undetectable and inaccessible from any other network. Create a virtual DMZ or proxy server to securely bridge the team members to the outside network. Allow specific network bandwidth and packet loss to each virtual machine on the team. Connect all team members fully to host resources. You control all traffic allowed between the host network and team virtual machines. Monitor multiple virtual machines – Use thumbnail views of the virtual machine displays to review activity on team virtual machines simultaneously.Managing Teams
Managing teams requires creating, deleting, opening, closing, and changing the names of teams.Create a Team
Use the New Team wizard to create a team and add virtual machines. Before creating a team, if you plan to add virtual machines to the team while completing the New Team wizard, take these actions: Power off any virtual machines that you want to add to the team. Power off any virtual machines that you want to clone if you intend to create a clone and add it to the team. You can instead add virtual machines after you create the team, by using the Team menu. NOTE Workstation 4 virtual machines cannot be added to teams. 274 VMware, Inc., Chapter 13 Configuring Teams To create a team 1 From the Workstation menu bar, choose File > New > Team. 2 In the New Team wizard, supply the following information: a Enter a name for the team and specify the location of the virtual team files. By default, the team files are stored in the same directory as virtual machines. See “Virtual Machine Location” on page 85. b Specify whether to add virtual machines to the team now or later. If you want to add virtual machines now, you have the following options: New Virtual Machine – Launches the New Virtual Machine wizard. See “Use the New Virtual Machine Wizard” on page 91. Existing Virtual Machine – Opens a file browser from which you can navigate the host file system to locate an existing .vmx file. When you add a virtual machine to a team, it can no longer be accessed outside the team. See “Add a Virtual Machine to a Team” on page 278. New Clone of Virtual Machine – Opens a file browser from which you can navigate the host file system to locate an existing .vmx file. After you select a virtual machine, Workstation launches the Clone Virtual Machine wizard. See “Creating Clones” on page 223. c Specify whether to add one or more LAN segments. You can add LAN segments after you create the team by using the Team menu. If you add LAN segments while creating the team, you can change default names and bandwidth later. See “Working with Team Networks” on page 282. After the team is created, you can add it to the Favorites list. Use the Team menu to configure the team further or to add and remove virtual machines.Open a Team and Add It to the Favorites List
Opening a team displays its summary tab but does not power on the virtual machines included in the team. To open a team and add it to the Favorites list 1 From the Workstation menu bar, choose File > Open. 2 Browse to the location of the .vmtm file for the team you want. VMware, Inc. 275, 3 Select the file and click Open. 4 (Optional) To add the team to the Favorites list, choose File > Add to Favorites. After a team is added to the Favorites list, you can open it by clicking it in the Favorites list rather than using the menu bar. You can now power on one or more of the virtual machines in the team. See “Power On a Team” on page 281.Rename a Team
When you create a team, the name of the directory where the team (.vmtm) file is stored is based on the name you originally give the team. Although you can change the name of the team, the name of this file does not change. To rename a team Do one of the following: If the team is in the Favorites list, right‐click it and choose Rename. Type the new name and press Enter. Select the team and choose Team > Settings > Options. Type a new name in the Team name field and click OK.Power Off or Close a Team
Powering off a team means shutting down all the virtual machines in the team. The virtual machines are powered off in reverse order of that shown in the startup sequence. See “Specify the Startup Sequence for a Team” on page 280. Closing a team removes its summary tab from the Workstation window. Depending on how you set Workstation preferences, closing a team might require powering off the team. To power off or close a team Depending on which operation you want to perform, do one of the following: To power off the team, select it and choose Team > Power > Power Off. Depending on how you configured power operations, the guest operating system might be shut down before the virtual machine is powered off. See “Configure Power Off and Reset Options for a Virtual Machine” on page 154. 276 VMware, Inc., Chapter 13 Configuring Teams To close the team, select it and choose File > Close. Depending on how Workstation preferences are set, if any of the team’s virtual machines are still powered on, you might see a prompt. For information about the options shown in the prompt, see “Closing Virtual Machines and Exiting Workstation” on page 73.Delete a Team
Before you can delete a team, you must power off all virtual machines that are members of the team. See “Power Off or Close a Team” on page 276. When you delete a team, you can choose to delete: Only the team (retaining the virtual machines in the team) The team and the virtual machines in the team To remove a team from the Workstation window rather than deleting it, see “Remove a Virtual Machine from a Team” on page 279. CAUTION Deleting a team permanently removes the team files from the host file system and removes associated LAN segments from all virtual machines. Deleting the team’s virtual machines along with the team removes the virtual machine files permanently. To delete a team 1 Select the team and choose Team > Delete from Disk. 2 Complete the dialog box that appears: To delete the team without deleting the virtual machines in it, choose Delete. To delete the team and the virtual machines in it, choose Delete Team and VMs. When you delete a team, you also delete all team LAN segments. The virtual network adapters associated with deleted LAN segments become disconnected. Bridged, host‐only, NAT, and custom configurations remain unchanged. 3 Click OK. VMware, Inc. 277,Summary and Console Views for Teams and Their Virtual Machines
Workstation displays teams in a summary view or console view: The summary view is available at any time. See “Summary View” on page 58. The console view is available only when a team is powered on. A grab bar allows you to resize the areas. This view displays a large console view of the selected virtual machine and thumbnail console views of the other virtual machines in the team. Thumbnail views show the order of the startup sequence from left to right and top to bottom. If the team contains many virtual machines, you might need to scroll the thumbnails to view all the virtual machines. The thumbnails are displayed in the same order as the team’s startup sequence. The left‐most virtual machine is the first one in the sequence. Workstation updates thumbnails in real time to display the actual content of the virtual machine screens. The active virtual machine is the one you select or switch to by using the Team > Switch To menu. It appears in the lower pane of the console. Its thumbnail is represented by the VMware icon. Workstation menus and commands directly affect only the active virtual machine, and you can use the mouse and keyboard to interact directly with the active virtual machine. In full screen mode, Workstation displays only the active virtual machine. See “Use Full Screen Mode” on page 164.Managing the Members of a Team
Managing members of a team requires adding virtual machines to a team, removing them from a team, and setting the order in which members of a team start and stop.Add a Virtual Machine to a Team
Before you add a virtual machine to a team, consider these issues: A virtual machine is not powered on when you add it to a running team. You must power on the added virtual machine manually to use it during the current session. The added virtual machine is thereafter powered on or off with the rest of the team. 278 VMware, Inc., Chapter 13 Configuring Teams When you add a virtual machine to a team, you can no longer operate the virtual machine outside the team. Adding a virtual machine to a team removes it from the Favorites list. NOTE Workstation 4 virtual machines cannot be added to teams. To add a virtual machine to a team Select the team, choose Team > Add, and choose one of the following options: New Virtual Machine – Launches the New Virtual Machine wizard. See “Use the New Virtual Machine Wizard” on page 91. Existing Virtual Machine – Opens a file browser from which you can navigate the host file system to locate an existing .vmx file. When you add a virtual machine to a team it can no longer be accessed outside the team. New Clone of Virtual Machine – Opens a file browser from which you can navigate the host file system to locate an existing .vmx file. After you select a virtual machine, Workstation launches the Clone Virtual Machine wizard. See “Creating Clones” on page 223.Remove a Virtual Machine from a Team
Remove a virtual machine from a team when you want to use the virtual machine independently. That is, it does not need to be started up or shut down before or after any other virtual machine. It also does not need to be in a private team network. NOTE When you remove a virtual machine from a team, you also remove it from team LAN segments. Virtual network adapters associated with LAN segments become disconnected. Bridged, host‐only, NAT, and custom configurations remain unchanged. To remove a virtual machine from a team 1 Power off the virtual machine that you want to remove. 2 Select the team and choose Team > Remove >Specify the Startup Sequence for a Team
Use a startup sequence to specify the order in which virtual machines start and stop and the delay, in seconds, between starting and stopping the next virtual machine in the sequence. Power on and resume operations occur in the order of the sequence shown in the team settings list. Power off operations occur in reverse order. The default sequence, is the order in which you added the virtual machines to the team. The default delay is 10 seconds. Setting a startup sequence is useful, for example, if you have a virtual machine that runs an application to be tested and you want it to start before the virtual machines running an automated testing script. Setting a delay avoids overloading the CPU when multiple virtual machines start and allows applications on a virtual machine to launch before another team virtual machine attempts to connect. To specify a startup sequence for a team 1 Select the team. 2 Choose Team > Settings and click the Virtual Machines tab. 3 Use the up and down arrow buttons to arrange the virtual machines in the list. The virtual machine at the top of the list is the first in the startup sequence. 4 Select each virtual machine and specify how many seconds you want it to wait before starting the next virtual machine. If the virtual machine team depends on precise startup timing, experiment to determine how much time the host and guest operating environments and applications need to launch. 5 Click OK to save your changes. 280 VMware, Inc., Chapter 13 Configuring TeamsPower Operations for Teams and Their Members
Power operations for teams are much the same as those for an individual virtual machine. However, for a team, you can also change the sequence in which the members of a team power on and off. See “Specify the Startup Sequence for a Team” on page 280. You can also use Workstation’s command‐line application for team power operations. See Appendix A, “Appendix: Workstation Command‐Line Reference,” on page 487.Power On a Team
When you power on a team, the virtual machines in the team power on in the startup sequence specified in the team settings editor. See “Specify the Startup Sequence for a Team” on page 280. To power on a team Do one of the following: To use the Workstation GUI, select the team and choose Team > Power > Power On. To use the command line, see “Startup Options for Workstation and Virtual Machines” on page 487.Suspend or Resume a Team
When you suspend a team, all team virtual machines are suspended simultaneously. The startup sequence determines the order in which virtual machines are resumed and how much time elapses before resuming the next team member. See “Specify the Startup Sequence for a Team” on page 280. If you attempt to close Workstation while a team suspend or resume operation is still in progress, a warning dialog box appears. To suspend or resume a team 1 To suspend or resume a team, select the team and choose one of the Team > Power options. All team virtual machines are suspended simultaneously. 2 To see the progress of a particular team member, choose Team > Switch To >Perform Power Operations on One Team Member
Performing a power operation for one member of a team is similar to performing the operation for a virtual machine that is not part of the team, except that instead of selecting the machine from the Favorites list, you select it from the team’s console tab. To perform power operations on one team member 1 Select the virtual machine from the team’s console tab. 2 Choose the appropriate command from the VM > Power menu.Working with Team Networks
One of the advantages of teams is the ability to isolate virtual machines in private virtual networks, called LAN segments. This can be useful with multitier testing, network performance analysis, and situations where isolation and packet loss are important. For information about other aspects of networking than LAN segments, see Chapter 14, “Configuring a Virtual Network,” on page 287.LAN Segment Requirements Regarding IP Addresses
When you add an existing virtual machine to a team, the virtual machine might be configured to expect an IP address from a DHCP server. Unlike host‐only and NAT networking, LAN segments have no DHCP server provided automatically by Workstation. Each network client must have an IP address for TCP/IP networking. Therefore you must manually configure IP addressing for team virtual machines on a LAN segment. Two choices are available: DHCP – Configure a DHCP server on your LAN segment to allocate IP addresses to your virtual machines. Static IP – Configure a fixed IP address for each virtual machine on the LAN segment. 282 VMware, Inc., Chapter 13 Configuring TeamsCreate a Team LAN Segment
The first step to creating a virtual network for a team is to add and name a LAN segment. You can then configure connections to this segment. To create a team LAN segment 1 Select the team and choose Team > Add > LAN Segment. 2 Enter a name for the private network and click OK. You can configure the other settings in this dialog box later. You can perform these tasks after creating a LAN segment: Configure network transmission properties for the segment. See “Configure LAN Segments” on page 283. Create a network adapter and connect it to the segment. See “Add or Remove Network Adapters” on page 284.Configure LAN Segments
You can configure network transmission properties for a team LAN segment, including bandwidth settings such as connection type and speed, as well as percentage of packet loss allowed. To configure LAN segments 1 Select the team and choose Team > Settings. 2 Click the LAN Segments tab, and complete the fields. From this tab you can add, remove, and rename the LAN segments configured for the team. The list in the left pane displays LAN segments associated with the team. 3 Click a name to select the LAN segment you want to configure. The right pane displays parameters for the physical properties of the emulated LAN segment link: Name – Name of the LAN segment. To change the name, type a new name in the Name field. Bandwidth – Drop‐down menu of bandwidths for typical network links. To change the bandwidth, choose another connection type from the drop‐down menu. VMware, Inc. 283, Kbps – Field to set a custom bandwidth, in kilobits per second. Changes here are overwritten when you make a selection from the Bandwidth menu. To change the bandwidth, type a number into the field. Packet Loss – Specification of the efficiency or faultiness of the link, measured in the percentage of packets lost from the total number of packets transmitted. To change the packet loss setting, type a number into the field. 4 Click OK to save your changes. 5 (Optional) If virtual machines are currently running and you want them to adopt these configuration changes, power on, reset, or resume the virtual machines, as appropriate.Add or Remove Network Adapters
A physical PC must have a network adapter or NIC (network interface controller), for each physical network connection. Similarly, a virtual machine must be configured with a virtual network adapter for each LAN segment it interacts with. To connect a virtual machine to multiple LAN segments simultaneously, you must configure that virtual machine with multiple network adapters. To add or remove network adapters 1 Power off the virtual machine that you want to add a network adapter to or remove an adapter from. 2 Select the team and choose Team > Settings. 3 On the Connections tab, select the virtual machine and do one of the following: To add a network adapter, click Add Adapter. The added adapter is displayed in the Adapters column. By default, the adapter connects to the bridged LAN segment, but you can change the setting by clicking a check box for another segment. If the segment you want to use is not listed, create it. See “Create a Team LAN Segment” on page 283. NICs configured with connections through a DHCP server cannot connect to a team LAN segment. To remove an adapter, select the adapter you want to remove and click Remove Adapter. 4 Click OK. 284 VMware, Inc., Chapter 13 Configuring TeamsDelete a LAN Segment
Deleting a LAN segment disconnects all virtual network adapters that are configured for that LAN segment. When you remove a virtual machine from a team, you must manually configure its disconnected virtual network adapter if you want to reconnect the virtual machine to a network. To delete a LAN segment 1 Select the team and choose Team > Settings. 2 Click the LAN Segments tab and select the LAN segment you want to delete. 3 Click Remove and click OK.Cloning and Taking Snapshots of Team Virtual Machines
You can clone a virtual machine in a team in the same way you clone any other virtual machine. See “Creating Clones” on page 223. When you clone a virtual machine in a team: The resulting clone is not part of the team. The clone appears on the Favorites list as well as in a summary window. If the parent virtual machine is configured for a LAN segment, the virtual network adapter for that LAN segment on the clone is disconnected. To connect to a network, you must reconfigure the virtual Ethernet adapter manually. Snapshots operate only on virtual machines and not on the whole team. When a team is active, you can use the Snapshot button on the toolbar to take a snapshot of only the active virtual machine. To preserve the state of all virtual machines on a team, power off the team, and take a snapshot of each virtual machine before you power on the team again. VMware, Inc. 285, 286 VMware, Inc.,Configuring a Virtual Network 14
This chapter previews the virtual networking components that VMware Workstation provides and shows how to use them with your virtual machine. This chapter includes the following topics: “Components of the Virtual Network” on page 287 “Common Networking Configurations” on page 288 “Example of a Custom Networking Configuration” on page 293 “Changing a Networking Configuration” on page 297 “Configuring Bridged Networking” on page 299 “Changing the Subnet or DHCP Settings for a Virtual Network” on page 301 “Configuring Host Virtual Network Adapters” on page 303Components of the Virtual Network
Workstation provides the bridged, network address translation (NAT), host‐only networking, and custom networking options to configure a virtual machine for virtual networking.Virtual Switch
Like a physical switch, a virtual switch lets you connect other networking components together. Virtual switches are created as needed by Workstation, up to a total of 10 virtual switches on Windows and 255 on Linux. You can connect one or more virtual machines to a switch. By default, a few of the virtual switches are mapped to specific networks. VMware, Inc. 287, Table 14-1. Default Virtual Network Switches Network Type Switch Name Reference Bridged VMnet0 “Bridged Networking” on page 289 NAT VMnet8 “Network Address Translation (NAT)” on page 291 Host‐only VMnet1 “Host‐Only Networking” on page 292 The other available networks are named VMnet2, VMnet3, VMnet4, and so on.DHCP Server
The dynamic host configuration protocol (DHCP) server provides IP network addresses to virtual machines in configurations that are not bridged to an external network. For example, host‐only and NAT configurations use the DHCP server.Network Adapter
A virtual network adapter is set up for your virtual machine when you use any type of networking to create it with the New Virtual Machine wizard. It appears in the guest operating system as an AMD PCNET PCI adapter or as an Intel Pro/1000 MT Server Adapter. On Windows Vista and Windows 7 guests, it is an Intel Pro/1000 MT Server Adapter. Use the virtual machine settings editor to create and configure up to 10 network adapters in each Workstation 6.0 and higher virtual machine. The limit is three adapters for Workstation 4 or 5.x virtual machines. For more information, see “Changing a Networking Configuration” on page 297.Common Networking Configurations
When you choose the standard networking options in the New Virtual Machine wizard or the virtual machine settings editor, the networking configurations are set up for you automatically. If you select the Typical setup path in the New Virtual Machine wizard, the wizard sets up network address translation (NAT) for the virtual machine. Select the Custom setup path to choose any of the common configurations: bridged networking, NAT, or host‐only networking. The wizard connects the virtual machine to the appropriate virtual network. 288 VMware, Inc., Chapter 14 Configuring a Virtual Network You can set up more specialized configurations by choosing the appropriate settings in the virtual machine settings editor, in the virtual network editor (on Windows and Linux hosts), and on your host computer. On all hosts, the software needed for all networking configurations is installed when you install Workstation. You can connect multiple virtual machines to the same virtual Ethernet switch. On a Windows host, you can connect an unlimited number of virtual network devices to a virtual switch. On a Linux host, you can connect up to 32 devices. If you have set your virtual network settings on a previous version of Workstation and upgrade to a new version, your previous network settings might be fully or partially preserved. For more information, see “Preparing for an Upgrade” on page 49.Bridged Networking
Bridged networking connects a virtual machine to a network by using the host computer’s network adapter. If your host computer is on a network, this is often the easiest way to give your virtual machine access to that network. The virtual network adapter in the virtual machine connects to the physical network adapter in your host computer, allowing it to connect to the LAN the host computer uses. Bridged networking configures your virtual machine as a unique identity on the network, separate from and unrelated to its host. It makes the virtual machine visible to other computers on the network, and they can communicate directly with the virtual machine. Bridged networking works with both wired and wireless physical host network cards. Figure 14-1. Bridged Networking Setup virtual network adapter virtual machine virtual network switch (VMnet0) host virtual bridge network adapter VMware, Inc. 289, Set Up Bridged Networking Windows and Linux hosts can use bridged networking to connect to wired and wireless networks. To set up bridged networking Do one of the following: For a new virtual machine, choose File > New > Virtual Machine > Custom (advanced) and select Use bridged networking in the New Virtual Machine wizard. For an existing virtual machine, choose VM > Settings. a On the Hardware tab select Network Adapter. b In the Network connection section select Bridged: Connected directly to the physical network. c (Optional) Select Replicate physical network connection state if you use the virtual machine on a laptop or other mobile device. As you move from one wired or wireless network to another, the IP address is automatically renewed. Setup Requirements for IP Addresses If you use bridged networking, your virtual machine must have its own identity on the network. For example, on a TCP/IP network, the virtual machine needs its own IP address. Your network administrator can tell you whether IP addresses are available for your virtual machine and which networking settings you should use in the guest operating system. Generally, your guest operating system can acquire an IP address and other network details automatically from a DHCP server, or you might need to set the IP address and other details manually in the guest operating system. If you use bridged networking, the virtual machine is a full participant in the network. It has access to other machines on the network and other machines on the network can contact it as if it were a physical computer on the network. Users who boot multiple operating systems often assign the same address to all systems, because they assume that only one operating system will be running at a time. NOTE If the host computer is set up to boot multiple operating systems and you run one or more of them in virtual machines, configure each operating system with a unique network address. 290 VMware, Inc., Chapter 14 Configuring a Virtual NetworkNetwork Address Translation (NAT)
NAT configures a virtual machine to share the IP and MAC addresses of the host. The virtual machine and the host share a single network identity that is not visible outside the network. NAT can be useful when your network administrator lets you use a single IP address or MAC address. If cannot give your virtual machine an IP address on the external network, you can use NAT to give your virtual machine access to the Internet or another TCP/IP network. NAT uses the host computer’s network connection. NAT works with Ethernet, DSL, and phone modems. Figure 14-2. NAT Setup virtual network adapter virtual machine virtual network switch DHCP server (VMnet8)NAT
device network If you select NAT, the virtual machine can use many standard TCP/IP protocols to connect to other machines on the external network. For example, you can use HTTP to browse Web sites, FTP to transfer files, and Telnet to log on to other computers. NATalso lets you to connect to a TCP/IP network by using a Token Ring adapter on the host computer. In the default configuration, computers on the external network cannot initiate connections to the virtual machine. That means, for example, that the default configuration does not let you use the virtual machine as a Web server to send Web pages to computers on the external network. This configuration protects the guest operating system from being compromised before you have a chance to install security software. For more information on NAT, see “Using NAT” on page 318. VMware, Inc. 291, Setting Up NAT By default, NAT is used when you use the Typical setup to create a virtual machine in the New Virtual Machine wizard. Setup Requirements for IP Addresses If you use NAT, your virtual machine does not have its own IP address on the external network. Instead, a separate private network is set up on the host computer. Your virtual machine gets an address on that network from the VMware virtual DHCP server. The VMware NAT device passes network data between one or more virtual machines and the external network. It identifies incoming data packets intended for each virtual machine and sends them to the correct destination.Host-Only Networking
Host‐only networking creates a network that is completely contained within the host computer. Host‐only networking provides a network connection between the virtual machine and the host computer, using a virtual network adapter that is visible to the host operating system. This approach can be useful if you need to set up an isolated virtual network. In this configuration, the virtual machine cannot connect to the Internet. For more information on host‐only networking, see “Selecting IP Addresses on a Host‐Only Network or NAT Configuration” on page 306. Figure 14-3. Host-Only Networking Setup virtual network adapter virtual machine virtual network switch DHCP server (VMnet1) host network adapter 292 VMware, Inc., Chapter 14 Configuring a Virtual Network Set Up Host-Only Networking You can set up host‐only networking while creating a virtual machine or after a virtual machine is created. To set up host-only networking Do one of the following: For a new virtual machine, choose File > New > Virtual Machine > Custom (advanced) and select Use host‐only networking in the New Virtual Machine wizard. For an existing virtual machine, choose VM > Settings. a On the Hardware tab select Network Adapter. b In the Network connection section click Host‐only: A private network shared with the host. Setup Requirements for IP Addresses If you use host‐only networking, your virtual machine and the host virtual adapter are connected to a private Ethernet network. The VMware DHCP server provides addresses on this network. Routing and Connection Sharing If you install the proper routing or proxy software on your host computer, you can establish a connection between the host virtual network adapter and a physical network adapter on the host computer. This lets you connect the virtual machine to a Token Ring or other non‐Ethernet network. On a Windows XP or Windows Server 2003 host computer, you can use host‐only networking in combination with the Internet connection sharing feature in Windows to allow a virtual machine to use the host’s dial‐up networking adapter or other connection to the Internet. For details on how to configure Internet connection sharing, see your Windows documentation.Example of a Custom Networking Configuration
With the Workstation virtual networking components, you can create sophisticated virtual networks. The virtual networks can be connected to one or more external networks, or they can run entirely on the host computer. On Windows hosts, you can use the virtual network editor to access multiple network cards in your host and create multiple virtual networks. VMware, Inc. 293, Before you attempt to set up complex virtual networks, you need a good understanding of how to configure network devices in your host and guest operating systems. Figure 14‐4 shows most of the ways you can combine devices on a virtual network. In this example, a Web server connects through a firewall to an external network. An administrator’s computer connects to the Web server through a second firewall. Figure 14-4. Custom Configuration with Two Firewalls host network adapter virtual bridge virtual network switch virtual (VMnet0) virtual virtual network network network adapter adapter adapter virtual machine 2 Web server virtual network switch virtual machine 1 (VMnet2) firewall virtual virtual virtual network switch network network (VMnet3) virtual adapter adapter networkadapter virtual machine 4 virtual machine 3 “internal” PC firewall Other custom configurations are described in “Advanced Virtual Networking” on page 305 and “Using NAT” on page 318.Set Up a Custom Networking Configuration
To set up the custom networking configuration, create four virtual machines and use the virtual machine settings editor to adjust the settings for their virtual network adapters. Install the appropriate guest operating systems and application software in each virtual machine and make the appropriate networking settings in each virtual machine. 294 VMware, Inc., Chapter 14 Configuring a Virtual Network To set up a custom networking configuration 1 Set up four virtual machines using the New Virtual Machine wizard: a Choose File > New > Virtual Machine. b Create the first virtual machine with bridged networking so that it can connect to an external network by using the host computer’s network adapter. c Create the other three virtual machines without networking. Setting up virtual network adapters and installation of the operating systems are performed in Step 7. 2 Configure network settings for the first virtual machine: a Open the first virtual machine, but do not power it on. b Use the virtual machine settings editor to add a second virtual network adapter. See “Changing a Networking Configuration” on page 297. c Connect the second adapter to Custom (VMnet2). 3 Configure network settings for the second virtual machine. a Open a virtual machine, but do not power it on. b Use the virtual machine settings editor to add a virtual network adapter. c Connect the adapter to Custom (VMnet2). 4 Configure network settings for the third virtual machine: a Open virtual machine 3, but do not power it on. b Use the virtual machine settings editor to add a virtual network adapter. c Connect the adapter to Custom (VMnet2). d Use the virtual machine settings editor to add a second virtual network adapter. e Connect the second adapter to Custom (VMnet3). 5 Configure network settings for the fourth virtual machine: a Open virtual machine 4, but do not power it on. b Use the virtual machine settings editor to add a virtual network adapter. c Connect the adapter to Custom (VMnet3). VMware, Inc. 295, 6 Determine the network addresses used for VMnet2 and VMnet3: On Windows hosts, open a command prompt and run the following command: ipconfig /all Note the network addresses that each virtual adapter uses. On Linux hosts, open a terminal and run the following command: ifconfig Note the network addresses that each virtual switch uses. 7 Power on each virtual machine in turn and install the appropriate guest operating system. 8 On Windows and Linux hosts, to configure network addresses using the DHCP server, do the following: a Choose Edit > Virtual Network Editor. On Linux, choose Applications > System Tools > Virtual Network Editor, or the equivalent menu path for your version of Linux. b Select VMnet2 and check the Use local DHCP service to distribute IP address to VMs option. For more information on changing subnets, see “Change Subnet or DHCP Settings on a Windows Host” on page 302 and “Change Subnet or DHCP Settings on a Linux Host” on page 302. 9 Configure the networking in each guest operating system: Machine 1 – For the bridged network adapter in virtual machine 1, use the networking settings needed for a connection to the external network. If the virtual machine receives its IP address from a DHCP server on the external network, the default settings should work. For the second network adapter in virtual machine 1, manually assign an IP address in the range you are using with VMnet2. Machine 2 – Assign an IP address in the range you are using with VMnet2. Machine 3 – Network adapters are connected to VMnet2 and VMnet3. Assign an IP address in the virtual networkʹs range it is connected to. Machine 4 – Assign an IP address in the range you are using with VMnet3. 10 Install the necessary application software in each virtual machine. 296 VMware, Inc., Chapter 14 Configuring a Virtual NetworkChanging a Networking Configuration
You can use the virtual machine settings editor to add virtual network adapters to your virtual machine and change the networking configuration of existing adapters.Find the Network Type of a Virtual Machine
Unless you set up a custom network connection, a virtual machine uses a bridged, NAT, or host‐only network connection. If you use the Typical setup path in the New Virtual Machine wizard to create a virtual machine, the new virtual machine uses the NAT network type. For more information, see “Common Networking Configurations” on page 288. To find the network type of a virtual machine 1 Select the virtual machine. 2 Choose VM > Settings > Hardware. 3 Select the network adapter. The Network Connection section displays the details that lets you to change the settings. To change the network type, see “Modify Existing Virtual Network Adapters” on page 298.Add Virtual Network Adapters
You can add up to 10 virtual network adapters to a virtual machine. To add virtual network adapters 1 Select the virtual machine to which you want to add the adapter. 2 Choose VM > Settings. 3 On the Hardware tab, click Add. 4 Select Network Adapter and click Next. 5 Select the network type to use. VMware, Inc. 297, 6 (Optional) If you select Custom, choose the VMnet network to use from the drop‐down menu. Although VMnet0, VMnet1, and VMnet8 are technically available in this list, they are usually used for bridged, host‐only, and NAT configurations, respectively. You must perform another procedure to make them available for use in custom configurations. Choose one of the other VMnet switches. 7 Click Finish. The new adapter is added. 8 Click OK to save your configuration.Modify Existing Virtual Network Adapters
Before you begin modifying the virtual network adapters, determine the network type you want to assign. See “Common Networking Configurations” on page 288. To modify existing virtual network adapters 1 Select the virtual machine. 2 Choose VM > Settings. 3 On the Hardware tab, select the adapter to modify. 4 Select the network type to use. 5 (Optional) If you select Custom, choose the VMnet virtual network to use for the network from the drop‐down menu. Although VMnet0, VMnet1, and VMnet8 are technically available in this menu, they are usually used for bridged, host‐only, and NAT configurations, respectively. You must perform another procedure to make them available for use in custom configurations. Choose one of the other VMnet switches. 6 Click OK. 7 Be sure the guest operating system is configured to use an appropriate IP address on the new network. If the guest is using DHCP, release and renew the lease. If the IP address is set statically, be sure the guest has an address on the correct virtual network. 298 VMware, Inc., Chapter 14 Configuring a Virtual NetworkConfiguring Bridged Networking
Windows and Linux hosts allow you to configure bridged networking. You can view and change the settings for bridged networking on your host, determine which network adapters on your host to use for bridged networking, and map specific network adapters to specific virtual networks, called VMnets.Configure VMnet0 Automatic Bridged Networking on a Windows Host
When you configure VMnet0 bridged networking the change you make affects all the virtual machines that use bridged networking on the host. To configure VMnet0 bridged networking on a Windows host 1 Choose Edit > Virtual Network Editor. By default, VMnet0 is set to use automatic bridging mode and bridges to all of the active network adapters on the host computer. 2 Click the Automatic Settings, and select the check box for the available physical network adapter(s) to automatically bridge to VMnet0. To place restrictions on a network adapter, see “Add or Remove a Host Network Adapter from the List of Included Adapters.” 3 Click OK. Add or Remove a Host Network Adapter from the List of Included Adapters On host systems with multiple physical network adapters, the choice of which adapter Workstation uses is arbitrary. Therefore, you can place or remove restrictions on a network adapter of your choice. To add or remove a host network adapter from the list of included adapters 1 Choose Edit > Virtual Network Editor. 2 Click Automatic Settings. 3 In the Include adapters section, do one of the following: To remove an adapter, deselect the adapter. To add an adapter, select the adapter. 4 Click OK. VMware, Inc. 299, Designate a Physical Network Adapter to Bridge to Custom Virtual Switches Before you change the bridged adapter mappings, check which virtual network the physical network adapter is going to be assigned to. CAUTION If you reassign a physical network adapter to a different virtual network, any virtual machine that is using the original network loses its network connectivity through that network. You must then change the setting for each affected virtual machine’s network adapter individually. This can be especially troublesome if your host has only one physical network adapter and you reassign it to a VMnet other than VMnet0. In this case, even though the VMnet still appears to be bridged to an automatically chosen adapter, the only adapter it can use was assigned to another VMnet. To designate a physical network adapter to bridge to custom virtual switches 1 Choose Edit > Virtual Network Editor. 2 Choose an adapter from the Bridged to drop‐down menu. You can create a custom bridged network on virtual switches VMnet2 to VMnet7. On Windows, you can also use VMnet9. On Linux, you can also use vmnet10 through vmnet255. 3 Click OK.Configure vmnet0 Automatic Bridged Networking on a Linux Host
By default, vmnet0 is set to use automatic bridging mode and bridges to one of the active network adapters on the host computer. To configure vmnet0 automatic bridged networking on a Linux host 1 On the Linux host, do one of the following: From the desktop, Open a terminal window and enter the following command: /usr/bin/vmware-netcfg 2 When prompted, enter the administrator password. 3 If the table in the network editor does not display a row for vmnet0, click Add Network and complete the Add Virtual Network dialog box. 300 VMware, Inc., Chapter 14 Configuring a Virtual Network 4 Select the vmnet0 row in the table and select Bridged. 5 Do one of the following: To use automatic bridging, click Automatic Settings and complete the dialog box. If you select multiple check boxes, the virtual machine bridges to the first available host network adapter. If an item in the list is disabled, the adapter is not available because it is already being used to bridge to another vmnet. To specify one host network adapter, use the Bridge to list box. 6 Click Save.Setting Up a Second Automatic Bridged Network Interface
If you have two network adapters installed on your host computer that are connected to two different networks, you might want your virtual machines on that host computer to bridge to both network adapters so that the virtual machines can access either or both physical networks. When you install Workstation on a host computer with multiple network adapters, you can configure multiple bridged networks. On a Windows host, to set up multiple bridged networks see “Configure VMnet0 Automatic Bridged Networking on a Windows Host” on page 299. On a Linux host, to set up multiple bridged networks see “Configure vmnet0 Automatic Bridged Networking on a Linux Host” on page 300.Changing the Subnet or DHCP Settings for a Virtual Network
On Windows and Linux hosts, you can use the virtual network editor to make changes to subnet and DHCP settings. IP networks are divided using subnet masks. When you modify the subnet mask, Workstation automatically updates the IP address settings for other components such as DHCP, NAT, and host virtual adapter if the default settings were never changed. The specific settings that are automatically updated include DHCP lease range, DHCP server address, NAT gateway address, and host virtual adapter IP address. However, if you changed any of these settings from their default value, Workstation does not update that setting automatically if the value is in the valid range. If the value exceeds the valid range, Workstation resets the settings based on the subnet range. Workstation presumes that custom settings are not to be modified. This is the case even if you later changed the setting back to the default. VMware, Inc. 301,Change Subnet or DHCP Settings on a Windows Host
To change the subnet settings, configure the subnet mask. The default subnet mask is 255.255.255.0 (a Class C address). Typically, this means you should modify only the third number in the IP address, for example, x in 192.168.x.0 or 198.16.x.0. In general, do not change the subnet mask. Certain virtual network services might not work as well with a customized subnet mask. To change subnet or DHCP settings on a Windows host 1 Choose Edit > Virtual Network Editor. 2 Change the subnet IP address in the Subnet IP field and modify the subnet mask in the Subnet mask field. The address should specify a valid network address that is suitable for use with the subnet mask. 3 Click OK. 4 In the DHCP settings dialog box, you can change the range of IP addresses provided by the Workstation DHCP server on a particular virtual network. You can also set the duration of DHCP leases provided to clients on the virtual network. 5 Click OK.Change Subnet or DHCP Settings on a Linux Host
NAT and host‐only network types can have settings for subnet IP. You can use the virtual network editor to change subnet settings for a virtual network on a Linux host. You can also use the virtual network editor to specify that a local DHCP service distributes IP addresses to virtual machines. To change DHCP settings further, edit the dhcp.conf file. See “Configure the DHCP Server on a Linux Host” on page 308. To change subnet or DHCP settings on a Linux host 1 On the Linux host, do one of the following: From the desktop, choose Applications > System Tools > Virtual Network Configuration, or the equivalent menu path for your version of Linux. Open a terminal window and enter the following command: /usr/bin/vmware-netcfg 2 When prompted, enter the administrator password. 302 VMware, Inc., Chapter 14 Configuring a Virtual Network 3 If the table in the network editor does not display a row for the network type you want, click Add Network and complete the Add Virtual Network dialog box. Use vmnet1 for a host‐only network type, and use vmnet8 for a NAT network type. 4 Select the row in the table that corresponds to the network to edit and select NAT or Host‐only, as appropriate. 5 Use the appropriate check boxes to specify whether to use a DHCP service, a host virtual adapter, or both. 6 To specify subnet IP, do one of the following: To automatically select an unused subnet IP, leave the Subnet IP text box empty. The next time you start the virtual network editor, the subnet IP appears in the text box. Type the subnet IP you want to use in the Subnet IP text box. 7 Click Save.Configuring Host Virtual Network Adapters
When you install Workstation, two network adapters are added to the configuration of your host operating system. One lets the host to connect to the host‐only network, and the other lets the host to connect to the NAT network. The presence of virtual network adapters has a slight performance cost, because broadcast packets must go to the extra adapters. On Windows networks, browsing your network might be slower than usual. In some cases, these adapters interact with the host computer’s networking configuration in undesirable ways.Connect or Disconnect a Host Virtual Network Adapter
Before you disconnect a host virtual network adapter determine whether you are going to use the virtual network adapter. To connect or disconnect a host virtual network adapter 1 Choose Edit > Virtual Network Editor. 2 Click the Connect a host virtual adapter to this network option to connect. 3 Deselect the Connect a host virtual adapter to this network option to disconnect. VMware, Inc. 303,Setting Up Two Separate Host-Only Networks
Set up multiple host‐only networks on the same host computer in situations such as the following: To have two virtual machines connected to one host‐only network, and other virtual machines connected to another host‐only network to isolate the network traffic on each network. To test routing between two virtual networks. To test a virtual machine with multiple network interface cards, without using any physical network adapters. On Windows and Linux hosts, the first host‐only network is set up automatically when you install Workstation. To set up multiple host‐only networks on Windows and Linux hosts see “Connect or Disconnect a Host Virtual Network Adapter” on page 303. On a Linux host, after the host‐only networks are set up, at least four network interfaces appear: eth0, lo, vmnet1, and vmnet2. These four interfaces should have different IP addresses on separate subnets. 304 VMware, Inc.,Advanced Virtual Networking 15
This chapter provides detailed information about networking capabilities and specialized configurations for expert users. This chapter includes the following advanced virtual networking topics: “Selecting IP Addresses on a Host‐Only Network or NAT Configuration” on “Avoiding IP Packet Leakage in a Host‐Only Network” on page 308 “Maintaining and Changing the MAC Address of a Virtual Machine” on page 310 “Controlling Routing Information for a Host‐Only Network on Linux” on page 312 “Potential Issues with Host‐Only Networking on Linux” on page 313 “Configuring Host‐Only Virtual Machines” on page 314 “Set Up Routing Between Two Host‐Only Networks” on page 316 “Using Virtual Network Adapters in Promiscuous Mode on a Linux Host” on “Using NAT” on page 318 “Advanced NAT Configuration” on page 321 “Using Samba with Workstation” on page 330 VMware, Inc. 305,Selecting IP Addresses on a Host-Only Network or NAT Configuration
The host and all virtual machines configured for host‐only networking are connected to the network through a virtual switch. Typically, all the parties on this network use the TCP/IP protocol suite, although other communication protocols can be used. A network address translation (NAT) configuration also sets up a private network, which must be a TCP/IP network. The virtual machines configured for NAT are connected to that network through a virtual switch. A host virtual adapter connects the host computer to the private network used for NAT. Each virtual machine and the host must be assigned addresses on the private network. This is typically done by using the DHCP server included with Workstation. This server does not service virtual or physical machines residing on bridged networks. Addresses can also be assigned statically from a pool of addresses that the DHCP server does not assign.How the Subnet Number Is Assigned
When host‐only networking is enabled at the time Workstation is installed, the subnet IP address for the virtual network is automatically selected as an unused private subnet IP address. A NAT configuration also uses an unused private network automatically selected when you install Workstation. Find the Network Type Used on a Virtual Machine Before you assign a subnet number, determine the network type used on the virtual machine. To find the network type used on a virtual machine Choose Edit > Virtual Network Editor. The subnet number associated with the virtual network is listed in the Subnet Address column. 306 VMware, Inc., Chapter 15 Advanced Virtual NetworkingDetermining Whether to Use DHCP or Statically Assign Addresses
Using DHCP to assign IP addresses is simpler and more automatic than statically assigning them. Most Windows operating systems, for example, are preconfigured to use DHCP at boot time, so Windows virtual machines can connect to the network the first time they are booted, without additional configuration. If you want your virtual machines to communicate with each other using names instead of IP addresses, however, you must set up a naming convention, a name server on the private network, or both. In that case it might be simpler to use static IP addresses. In general, if you have virtual machines you intend to use frequently or for extended periods of time, it is most convenient to assign them static IP addresses or configure the VMware DHCP server to always assign the same IP address to each of these virtual machines.DHCP Conventions for Assigning IP Addresses
For temporary virtual machines, use DHCP and let it allocate an IP address. For each host‐only or NAT network, the available IP addresses are allocated using the conventions shown in Table 15‐1 and Table 15‐2, whereConfigure the DHCP Server on a Windows Host
On a Windows host, use the virtual network editor to configure the DHCP server. To configure the DHCP server on a Windows host 1 Choose Edit > Virtual Network Editor. 2 Click DHCP Settings to change settings for the selected virtual network. 3 In the DHCP Settings dialog box that appears, make changes and click OK.Configure the DHCP Server on a Linux Host
Editing the DHCP server configuration file requires information that is best obtained directly from the DHCP server documentation. Consult the dhcpd(8) and dhcpd.conf(8)manual pages. NOTE The edits made inside the read‐only section of the DHCP configuration file are lost the next time you run the network editor. To configure the DHCP server on a Linux host To configure the host‐only DHCP server, edit the DHCP configuration file for vmnet1 (/etc/vmware/vmnet1/dhcp/dhcp.conf). To configure the DHCP server for the NAT network, edit the configuration file for vmnet8 (/etc/vmware/vmnet8/dhcp/dhcp.conf).Avoiding IP Packet Leakage in a Host-Only Network
Each host‐only network should be confined to the host machine on which it is set up. Packets that virtual machines send on this network should not leak out to a physical network attached to the host. Packet leakage can occur only if a machine actively forwards packets. If you use dial‐up networking support in a virtual machine and packet forwarding is enabled, host‐only network traffic might leak out through the dial‐up connection. To prevent the leakage, disable packet forwarding in your guest operating system. 308 VMware, Inc., Chapter 15 Advanced Virtual Networking If the host computer has multiple network adapters, it might be intentionally configured to use IP forwarding. If that is the case, you do not want to disable forwarding. To avoid packet leakage, you must enable a packet filtering facility and specify that packets from the host‐only network should not be sent outside the host computer. Consult your operating system documentation for details on how to configure packet filtering.Disable Packet Forwarding on Windows Hosts
Systems using server versions of Windows operating systems can forward IP packets that are not addressed to them. By default, these systems and Windows Vista and Windows 7 systems have IP packet forwarding disabled. IP forwarding is not a problem on Windows XP Professional or Windows XP Home Edition hosts. If you find packets leaking from a host‐only network on a Windows host computer, check whether forwarding was enabled on the host machine. If it is enabled, disable it. To disable packet forwarding on Windows hosts Do one of the following: Stop the Routing and Remote Access service: a Choose Start > Run and enter services.msc in the Run dialog box. b In the Services window that appears, disable the Routing and Remote Access service. Use Windows Administrative Tools to disable routing and remote access: a On a Windows 2003 Server host, choose Start > Programs > Administrative Tools > Routing and Remote Access. An icon on the left is labeled with the host name. If a green dot appears over the icon, IP forwarding is turned on. b To turn off IP forwarding, right‐click the icon and disable Routing and Remote Access. A red dot appears, indicating that IP forwarding is disabled. VMware, Inc. 309,Disable Packet Forwarding on Linux Hosts
If you find packets leaking from a host‐only network on a Linux host computer, check whether forwarding was mistakenly enabled on the host machine. If it is enabled, disable it. To disable packet forwarding on Linux hosts Depending on which type of Linux system you have, use one of the following methods: Disable forwarding by writinga0(zero) to the special file /proc/sys/net/ipv4/ip_forward. As root (su-), enter the following command: echo "0" > /proc/sys/net/ipv4/ip_forward Use a configuration option that is appropriate for your Linux distribution. For example, you might use a control panel, specify a setting at the time you compile your kernel, or enter a specification when you boot your system. For details about the method to use with your distribution, consult your operating system documentation.Maintaining and Changing the MAC Address of a Virtual Machine
When a virtual machine is powered on, Workstation assigns each of its virtual network adapters an Ethernet media access control (MAC) address. A MAC address is the unique address assigned to each Ethernet network device. The software guarantees that virtual machines are assigned unique MAC addresses within a given host system. The virtual machine is assigned the same MAC address every time it is powered on if both of the following conditions are true: The virtual machine is not moved. That is, the path name and filename for the virtual machine’s configuration file remain the same. No changes are made to certain settings in the configuration file. However, Workstation cannot guarantee to automatically assign unique MAC addresses for virtual machines that run on multiple host systems.Avoiding MAC Address Changes
To avoid changes in the MAC address automatically assigned to a virtual machine, do not move the virtual machine’s configuration file. Moving it to a different host computer or even moving it to a different location on the same host computer changes the MAC address. 310 VMware, Inc., Chapter 15 Advanced Virtual Networking Do not change certain settings in the virtual machine’s configuration (.vmx) file. If you never edit the configuration file by hand and do not remove the virtual network adapter, these settings remain unchanged. If you do edit the configuration file by hand, do not remove or change the following options: ethernet[n].generatedAddress ethernet[n].addressType ethernet[n].generatedAddressOffset uuid.location uuid.bios ethernet[n].present In these options, [n] is the number of the virtual network adapter, for example 0. NOTE To preserve a virtual network adapter’s MAC address, you must be careful not to remove the adapter. If you remove the adapter but later re‐create it, the adapter might receive a different MAC address.Assign the Same MAC Address to Any Virtual Machine Manually
Assign the MAC address manually instead of allowing Workstation to assign it to guarantee the following: The same MAC address is assigned to a given virtual machine every time you power it on, even if the virtual machine is moved. A unique MAC address is provided for each virtual machine within a networked environment. To assign the same MAC address to any virtual machine manually 1 Use a text editor to remove from the configuration (.vmx) file the three lines that begin with the following: ethernet[n].generatedAddress ethernet[n].addressType ethernet[n].generatedAddressOffset In these options, [n] is the number of the virtual network adapter, for example, 0. On a Linux host, a virtual machine created with an earlier VMware product might have a configuration file with a .cfg extension. VMware, Inc. 311, 2 Add the following line to the configuration file above the UUID lines in the file: ethernet[n].address = 00:50:56:XX:YY:ZZ In this line, the fourth pair of numbers, XX, must be a valid hexadecimal number between 00h and 3Fh, and YY and ZZ must be valid hexadecimal numbers between 00h and FFh. You must use the above format because Workstation virtual machines do not support arbitrary MAC addresses. A value for XX:YY:ZZ that is unique among your hard‐coded addresses avoids conflicts between the automatically assigned MAC addresses and the manually assigned addresses.Controlling Routing Information for a Host-Only Network
on Linux A host‐only network is a full‐fledged network. It has a network interface associated with it (vmnet1) that is marked up at the time the host operating system is booted. Routing server processes that operate on the host operating system, such as routed and gated, automatically discover the host‐only network and propagate information on how to reach the network unless you explicitly configure them not to do so. If either of these processes is being run only to receive routing information, the easiest solution is to run the routing configuration with a -q option so that the host‐only network does not supply but only receives routing information. If, however, routing services are running because they are to supply routing information, configure them so that they do not advertise routes to the host‐only network. The version of routed included with many distributions of Linux has no support for specifying that an interface should not be advertised. Consult the routed(8) manual page for your system. For gated, configuration you must explicitly exclude the vmnet1 interface from any protocol activity. If you need to run virtual machines on a host‐only network on a multihomed system where gated is used and have problems doing so, contact VMware technical support by submitting a support request on the VMware Web site. 312 VMware, Inc., Chapter 15 Advanced Virtual NetworkingPotential Issues with Host-Only Networking on Linux
The following are common issues you might encounter when you are configuring a host‐only network on Linux.DHCPD on the Linux Host Does Not Work After Installing Workstation
If you were running the DHCP server dhcpd utility on your machine before you installed Workstation, it probably was configured to respond to DHCP requests from clients on any network interface present on the machine. When host‐only networking is configured, an additional network interface, vmnet1, is marked up and available for use, and dhcpd might notice this. In such cases, some dhcpd implementations abort if their configuration files do not include a subnet specification for the interface. This can happen even if dhcpd is not supposed to respond to messages that arrive through the interface. The best solution is to add a line to the dhcpd configuration file in the following format: subnetDHCP and DDNS
Use DHCP to supply IP addresses as well as other information, such as the identity of a host running a name server and the nearest router or gateway. The DHCP server in Workstation does not provide a means to dynamically establish a relationship between the IP address it assigns and a client’s name (that is, to update a DNS server using dynamic domain name service (DDNS). VMware, Inc. 313, To use names to communicate with other virtual machines, you must either edit the DHCP configuration file for vmnet1 (/etc/vmware/vmnet1/dhcpd/dhcpd.conf), or use IP addresses that are statically bound to a host name. Editing the DHCP server configuration file requires information that is best obtained directly from the DHCP server documentation. Consult the dhcpd(8) and dhcpd.conf(8)manual pages. NOTE The edits made inside the read‐only section of the DHCP configuration file are lost the next time you run the network editor.Configuring Host-Only Virtual Machines
If you have already created two host‐only interfaces (VMnet1 and VMnet2), you can set up your virtual machines for one of the following configurations: Configuration 1 – The virtual machine is configured with one virtual network adapter, and that virtual adapter is connected to the default host‐only interface (VMnet1). To use this configuration, see “Set Up Using Configuration 1 or 2” on page 314. Configuration 2 – The virtual machine is configured with one virtual network adapter, and that virtual adapter is connected to the newly created host‐only interface (VMnet2). To use this configuration, see “Set Up Using Configuration 1 or 2” on page 314. Configuration 3 – The virtual machine is configured with two virtual network adapters. One virtual adapter is connected to the default host‐only interface (VMnet1) and the other virtual adapter is connected to the newly created host‐only interface (VMnet2). To use this configuration, see “Set Up Using Configuration 3” on page 315.Set Up Using Configuration 1 or 2
Use the virtual machine settings editor to connect the virtual machine to the default host‐only adapter or a custom host‐only adapter. To set up using configuration 1 or21Select the virtual machine. 2 Choose VM > Settings. 3 On the Hardware tab, select Network Adapter. 314 VMware, Inc., Chapter 15 Advanced Virtual Networking 4 In the Network Connection section, do one of the following: To connect to the default host‐only interface (VMnet1), select Host‐only. To connect to the newly created host‐only interface, select Custom, and choose VMnet2 from the drop‐down menu on the right. 5 (Optional) If no network adapter is shown in the list of devices, add one, as described in “Add Virtual Network Adapters” on page 297.Set Up Using Configuration 3
Make sure that there are two network devices for this virtual machine. For more information on adding virtual network adapters, see “Add Virtual Network Adapters” on page 297. To set up using configuration31Select the virtual machine. 2 Make sure the virtual machine is powered off. 3 Choose VM > Settings. 4 On the Hardware tab, select the first Network Adapter. 5 In the Network Connection section, select Host‐only. This adapter is connected to the default host‐only interface (VMnet1). 6 Select the second network adapter in the list, and in the Network Connection section, select Custom and choose VMnet2 from the drop‐down menu.Complete Configuring the Virtual Network Adapters
To complete the configuration you must assign an IP address on the appropriate VMnet subnet to each virtual network adapter as you would for physical adapters on a physical computer. To complete configuring the virtual network adapters 1 Power on the virtual machine and install your guest operating system. In configurations 1 and 2, you see one network adapter. In configuration 3, you see two network adapters within the guest. 2 Assign IP addresses to the virtual network adapters. VMware, Inc. 315, 3 (Optional) To see the IP address that a host‐only network is using: On Windows hosts, open a command prompt and run the following command: ipconfig /all On Linux hosts, open a terminal and run the following command: ifconfigSet Up Routing Between Two Host-Only Networks
If you are setting up a complex test network that uses virtual machines, you might want to have two independent host‐only networks with a router between them. Use one of the following methods. In both cases, you need two host‐only interfaces.: The router software runs on the host computer. The router software runs on its own virtual machine. The examples described here outline the simplest case, with one virtual machine on each of the host‐only networks. For more complex configurations, you can add more virtual machines and host‐only networks, as appropriate. To set up routing between two host-only networks 1 Set up the connection to the first (default) host‐only interface, as described in “Set Up Using Configuration 1 or 2” on page 314. 2 Set up the connection to the second (VMnet2) host‐only interface, as described in “Set Up Using Configuration 1 or 2” on page 314. 3 (Optional) To run the router software on a virtual machine, set up a third virtual machine with connections to the two host only interfaces, as described in “Set Up Using Configuration 3” on page 315. To run the router software on your host computer, skip this step. 4 Stop the VMnet DHCP server service: On a Windows host, choose Edit > Virtual Network Editor > DHCP, select the service and click Stop. On a Linux host, open a terminal and use the following command to stop the vmnet-dhcpd service: killall -TERM vmnet-dhcpd 5 Install guest operating systems in each of the virtual machines. 316 VMware, Inc., Chapter 15 Advanced Virtual Networking 6 Install the router software, either on the host computer or in the third virtual machine, depending on the approach you are using. 7 Configure networking in the first two virtual machines to use addresses on the appropriate host‐only network: On Windows hosts, open a command prompt and run the ipconfig /all command to determine which IP addresses each host‐only network is using. On Linux hosts, open a terminal and run the ifconfig command to determine which IP addresses each host‐only network is using. 8 Assign IP addresses by doing one of the following: If you are running the router on the host computer, assign default router addresses based on the addresses of the host‐only adapters on the host computer. In the first virtual machine’s networking configuration, the default router address should be the IP address for the host‐only adapter connected to VMnet1. In the second virtual machine’s networking configuration, the default router address should be the IP address for the host‐only adapter connected to VMnet2. If you are running the router software in a third virtual machine, set the default router addresses in the first two virtual machines based on the addresses that the third virtual machine uses. In the first virtual machine’s networking configuration, the default router address should be the IP address for the third virtual machine’s network adapter connected to VMnet1. In the second virtual machine’s networking configuration, the default router address should be the IP address for the third virtual machine’s network adapter connected to VMnet2. You can now ping the router machine from virtual machines 1 and 2. If the router software is set up correctly, you can communicate between the first and second virtual machines. VMware, Inc. 317,Using Virtual Network Adapters in Promiscuous Mode on
a Linux Host Workstation does not allow the virtual network adapter to go into promiscuous mode unless the user running Workstation has permission to make that setting. This restriction follows the standard Linux practice that only the root user can put a network interface into promiscuous mode. When you install and configure Workstation, you must run the installation as the root user. Workstation creates the vmnet devices with root ownership and root group ownership, which means that only the root user has read and write permissions to the devices. To set the virtual machine’s network adapter to promiscuous mode, you must launch Workstation as the root user because you must have read and write access to the vmnet device. For example, if you are using bridged networking, you must have access to /dev/vmnet0. To grant selected other users read and write access to the vmnet device, you can create a new group, add the appropriate users to the group, and grant that group read and write access to the appropriate device. You must make these changes on the host operating system as the root user (su -). For example, you can enter the following commands: chgrpUsing NAT
NAT provides a way for virtual machines to use most client applications over almost any type of network connection available to the host. The only requirement is that the network connection must support TCP/IP. NAT is useful when you have a limited supply of IP addresses or are connected to the network through a non‐Ethernet network adapter. NAT works by translating addresses of virtual machines in a private VMnet network to the address of the host machine. When a virtual machine sends a request to access a network resource, it appears to the network resource as if the request is coming from the host machine. 318 VMware, Inc., Chapter 15 Advanced Virtual Networking The host computer has a host virtual adapter on the NAT network identical to the host virtual adapter on the host‐only network. This adapter allows the host and the virtual machines to communicate with each other for such purposes as file sharing. The NAT device never forwards traffic from the host virtual adapter.How the NAT Device Uses the VMnet8 Virtual Switch
The NAT device is connected to the VMnet8 virtual switch. Virtual machines connected to the NAT network also use the VMnet8 virtual switch. The NAT device waits for packets coming from virtual machines on the VMnet8 virtual network. When a packet arrives, the NAT device translates the address of the virtual machine to the address of the host before forwarding the packet to the external network. When data arrives from the external network for the virtual machine on the private network, the NAT device receives the data, replaces the network address with the address of the virtual machine and forwards the data to the virtual machine on the virtual network. This translation occurs automatically and requires minimal configuration on the guest and the host.DHCP on the NAT Network
To make networking configuration easy, a DHCP server is installed when you install Workstation. Virtual machines running on the network with the NAT device can send out DHCP requests to dynamically obtain their IP addresses. The DHCP server on the NAT network, which is also used in host‐only networking configurations, dynamically allocates IP addresses in the range ofDNS on the NAT Network
The NAT device acts as a DNS server for the virtual machines on the NAT network. The NAT device is a DNS proxy and forwards DNS requests from the virtual machines to a DNS server that the host knows. Responses return to the NAT device, which then forwards them to the virtual machines. If they get their configuration information from DHCP, the virtual machines on the NAT network automatically use the NAT device as the DNS server. However, the virtual machines can be statically configured to use another DNS server. The virtual machines in the private NAT network are not accessible through DNS. To have the virtual machines running on the NAT network access each other by DNS names, you must set up a private DNS server connected to the NAT network.External Access from the NAT Network
A virtual machine on the NAT network can use any protocol using TCP or UDP as long as the virtual machine initiates the network connection. This is true for most client applications such as Web browsing, Telnet, passive‐mode FTP, and downloading streaming video. Additional protocol support is built into the NAT device to allow FTP and ICMP echo (ping) to work transparently through the NAT. On the external network to which the host is connected, any virtual machine on the NAT network appears to be the host itself, because its network traffic uses the host’s IP address. The virtual machine can send and receive data using TCP/IP to any machine that is accessible from the host. Before any communication can occur, the NAT device must set up a map between the virtual machine’s address on the private NAT network and the host’s network address on the external network. When a virtual machine initiates a network connection with another network resource, this map is created automatically. The operation is transparent to the user of the virtual machine on the NAT network. No additional work needs to be done. Network connections that are initiated from outside the NAT network to a virtual machine on the NAT network are not transparent. When a machine on the external network attempts to initiate a connection with a virtual machine on the NAT network, it cannot reach the virtual machine because the NAT device does not forward the request. However, you can configure port forwarding manually on the NAT device so that network traffic destined for a certain port can still be forwarded automatically to a virtual machine on the NAT network. See “Advanced NAT Configuration” on page 321. 320 VMware, Inc., Chapter 15 Advanced Virtual Networking File sharing of the type used by Windows operating systems and Samba is possible among computers on the NAT network, including virtual machines and the host computer. If you are using WINS servers on your network, a virtual machine using NAT networking can access shared files and folders on the host that the WINS server knows if those shared files and folders are in the same workgroup or domain.Advanced NAT Configuration
You can configure NAT to make custom configuration settings for Windows and Linux.Configure NAT on a Windows Host
Use the virtual network settings to configure NAT on a Windows host. To edit the NAT configuration file, see “Custom NAT and DHCP Configuration on a Windows Host” on page 321. To configure NAT on a Windows host 1 Choose Edit > Virtual Network Editor. 2 Use the controls in the NAT Settings menu to configure NAT: To stop and start the virtual NAT device, click the appropriate buttons. To edit NAT settings for a virtual network, choose the VMnet network from the drop‐down menu and click Edit. 3 Click DNS Settings to set up or change port forwarding or to specify DNS servers that the virtual NAT device should use. 4 Click OK.Custom NAT and DHCP Configuration on a Windows Host
If you are an advanced user on a Windows host computer, you can edit the NAT and DHCP configuration files to make custom configuration settings. If your host operating system is installed on the C drive, the configuration files for NAT and DHCP are in the following locations: VMware, Inc. 321, Table 15-3. NAT and DHCP File Locations File Type Location NAT On Windows XP: C:\Documents and Settings\All Users\Application Data\VMware\vmnetnat.conf On Windows Vista and Windows 7: C:\ProgramData\VMware\vmnetnat.conf For more information about this file, see “Contents of the NAT Configuration File” on page 323. DHCP On Windows XP: C:\Documents and Settings\All Users\Application Data\VMware\vmnetdhcp.conf On Windows Vista and Windows 7: C:\ProgramData\VMware\\vmnetdhcp.conf Use the virtual network editor (Edit > Virtual Network Editor) to change many key NAT and DCHP settings. If you make manual changes to the configuration files, those changes might be lost when you use the virtual network editor. Make backup copies of the files before you change any settings in the virtual network editor. You can then copy your manual changes back into the appropriate configuration files.Specifying Connections from Ports Below 1024
When a client machine makes a TCP or UDP connection to a server, the connection comes from a particular port on the client (the source port) and connects to a particular port on the server (the destination port). For security reasons, some servers accept connections only from source ports below 1024. You might see this configuration on machines used as NFS file servers, for example. If a virtual machine using NAT attempts to connect to a server that requires the client to use a source port below 1024, the NAT device must forward the request from a port below 1024. You can specify this behavior in the vmnetnat.conf file. This behavior is controlled by entries in sections headed [privilegedUDP] and [privilegedTCP]. You might need to add settings to or modify settings in either or both of these sections, depending on the kind of connection you need to make. You can set two parameters, each of which appears on a separate line. 322 VMware, Inc., Chapter 15 Advanced Virtual Networking Table 15-4. Parameters to Map Virtual Machine Source and Destination Ports Parameter Description autodetect =Configuring NAT on a Linux Host
Use the default NAT configuration file on the host to configure the NAT device. This file is located in /etc/vmware/vmnet8/nat/nat.conf. For an example of a NAT configuration file, see “Sample Linux nat.conf File” on page 329. Contents of the NAT Configuration File The NAT configuration file is in the following locations: On a Windows host: C:\Documents and Settings\All Users\Application Data\VMware\vmnetnat.conf If you edit this file and then use the virtual network editor (Edit > Virtual Network Editor) your edits might be lost. On a Linux host: /etc/vmware/vmnet8/nat/nat.conf The NAT configuration file is divided into sections. Each section configures a part of the NAT device. Text surrounded by square brackets, such as [dns], marks the beginning of a section. In each section is a configuration parameter that can be set. The configuration parameters take the form ip = 192.168.27.1/24. The NAT configuration file contains the following sections. VMware, Inc. 323, The [host] Section The [host] section includes parameters to configure the NAT connection. ip – The IP address that the NAT device should use. It can be followed by a slash and the number of bits in the subnet. netmask – The subnet mask to use for the NAT network. DHCP addresses are allocated from this range of addresses. configport – A port that can be used to access status information about the NAT device. device – The VMnet device to use. Windows devices are of the form vmnetConsiderations for Using NAT
Consider the following items when you use NAT: NAT causes some performance loss. Because NAT requires that every packet sent to and received from a virtual machine must be in the NAT network, an unavoidable performance penalty occurs. NAT is not perfectly transparent. NAT does not usually allow connections to be initiated from outside the network, although you can manually configure the NAT device to set up server connections. The practical result is that some TCP and UDP protocols that require a connection be initiated from the server machine, some peer to peer applications, for example, do not work automatically, and some might not work at all. NAT provides some firewall protection. A standard NAT configuration provides basic‐level firewall protection because the NAT device can initiate connections from the private NAT network, but devices on the external network usually cannot initiate connections to the private NAT network.Using NAT with NetLogon
When you use NAT networking in a virtual machine with a Windows guest operating system running on a Windows host, you can use NetLogon to log in to a Windows domain from the virtual machine. You can then access file shares that the WINS server knows. To use NetLogon, you need to know how WINS servers and Windows domain controllers work. This section explains how to set up the virtual machine to use NetLogon. The setup process is similar to the way you set up a physical computer on one LAN that is using a domain controller on another LAN. To log in to a Windows domain outside the virtual NAT network, the virtual machine needs access to a WINS server for that domain. You can connect the virtual machine to a WINS server in the following ways: Connect to the WINS server that the DHCP server used on the NAT network provides, if the WINS server is already set up on the host. Manually enter the IP address of the WINS server to connect from the virtual machine to a WINS server not set up on the host. 326 VMware, Inc., Chapter 15 Advanced Virtual Networking Use NAT to Connect to an Existing WINS Server Set Up on the Host To use NAT to connect, a WINS server in the same workgroup or domain must be set up on the host. This procedure applies to the Windows 2000, XP, 2003 Server, NT, Me, and 9x guest versions. Differences for Windows Vista and Windows 7, are noted in the specific steps. To use NAT to connect to an existing WINS server set up on the host 1 In the virtual machine, right‐click My Network Places and choose Properties. For Windows Vista, open the Network and Sharing Center and click the View Status link for the connection that uses the needed virtual network adapter. For Windows 7, open the Network and Sharing Center and click one of the Local Area Connection links for the connection that uses the needed virtual network adapter. 2 In the Network Connections window, right‐click the virtual network adapter and choose Properties. For Windows Vista, in the Local Area Connection Status window, click Properties and click Continue when prompted for permission. For Windows 7, in the Local Area Connection Status window, click Properties. 3 In the Properties dialog box, select Internet Protocol (TCP/IPv4) and click Properties. 4 In the TCP/IP Properties dialog box, click Advanced. 5 On the WINS tab, under NetBIOS setting, select Default: Use NetBIOS setting from DHCP Server. 6 Click OK twice and click Close. Enter the IP Address of a WINS Server Manually Use the IP address to connect to a WINS server in the same workgroup or domain that is not already set up on the host. VMware, Inc. 327, To enter the IP address of a WINS server manually 1 In the virtual machine, right‐click My Network Places and choose Properties. For Windows Vista, open the Network and Sharing Center and click the View Status link for the connection that uses the needed virtual network adapter. For Windows 7, open the Network and Sharing Center and click one of the Local Area Connection link for the connection that uses the needed virtual network adapter. 2 In the Network Connections window, right‐click the virtual network adapter and choose Properties. For Windows Vista, in the Local Area Connection Status window, click Properties and click Continue when prompted for permission. For Windows 7, in the Local Area Connection Status window, click Properties. 3 In the Properties dialog box, select Internet Protocol (TCP/IPv4) and click Properties. 4 In the TCP/IP Properties dialog box, click Advanced. 5 On the WINS tab, click Add. 6 In the TCP/IP WINS Server dialog box, enter the IP address for the WINS server in the WINS server field and click Add. The IP address of the WINS server appears in the WINS addresses list on the WINS tab. 7 Repeat Step 5 and Step 6 for each WINS server to which you want to connect from this virtual machine. 8 Click OK twice and click Close. Now that the virtual machine has an IP address for a WINS server, you can use NetLogon in the virtual machine to log in to a domain and access shares in that domain. However, your access is limited to shares of virtual machines that are on the same NAT network or are bridged on the same domain. For example, if the WINS server covers a domain with a domain controller, you can access that domain controller from the virtual machine and add the virtual machine to the domain. You need to know the Administrator user ID and password for the domain controller. 328 VMware, Inc., Chapter 15 Advanced Virtual NetworkingSample Linux nat.conf File
# Linux NAT configuration file [host] # NAT gateway address ip = 192.168.237.2/24 hostMAC = 00:50:56:C0:00:08 # enable configuration; disabled by default for security reasons #configport = 33445 # vmnet device if not specified on command line device = vmnet8 # Allow PORT/EPRT FTP commands (they need incoming TCP stream...) activeFTP = 1 # Allows the source to have any OUI. Turn this one if you change the OUI # in the MAC address of your virtual machines. #allowAnyOUI = 1 [udp] # Timeout in seconds, 0 = no timeout, default = 60; real value might # be up to 100% longer timeout = 30 [dns] # This section applies only to Windows. # # Policy to use for DNS forwarding. Accepted values include order, # rotate, burst. # # order: send one DNS request at a time in order of the name servers # rotate: send one DNS request at a time, rotate through the DNS servers # burst: send to three servers and wait for the first one to respond policy = order; # Timeout in seconds before retrying DNS request. timeout = 2 # Retries before giving up on DNS request retries = 3 # Automatically detect the DNS servers (not supported in Windows NT) autodetect = 1 # List of DNS servers to use. Up to three may be specified #nameserver1 = 208.23.14.2 VMware, Inc. 329, #nameserver2 = 63.93.12.3 #nameserver3 = 208.23.14.4 [netbios] # This section applies only to Windows. # Timeout for NBNS queries. nbnsTimeout = 2 # Number of retries for each NBNS query. nbnsRetries = 3 # Timeout for NBDS queries. nbdsTimeout = 3 [incomingtcp] # Use these with care - anyone can enter into your virtual machine through # these... # FTP (both active and passive FTP is always enabled) # ftp localhost 8887 #8887 = 192.168.27.128:21 # WEB (make sure that if you are using named webhosting, names point to # your host, not to guest... And if you are forwarding port other # than 80 make sure that your server copes with mismatched port # number in Host: header) # lynx http://localhost:8888 #8888 = 192.168.27.128:80 # SSH # ssh -p 8889 root@localhost #8889 = 192.168.27.128:22 [incomingudp] # UDP port forwarding example #6000 = 192.168.27.128:6001Using Samba with Workstation If you have Samba on your Linux host, you can configure Samba so that it works with Workstation. Modify your Samba configuration so that it includes the IP subnet that the vmnet1 Workstation virtual network adapter uses. To determine which subnet vmnet1 is using,
run the following command: /sbin/ifconfig vmnet1 330 VMware, Inc., Chapter 15 Advanced Virtual Networking Make sure the Samba password file includes entries for all users of the virtual machine who will access the host’s file system. The user names and passwords in the Samba password file must match those used for logging on to the guest operating system.Add Users to the Samba Password File
You can add user names and passwords to the Samba password file at any time from a terminal window on your Linux host computer. To add users to the Samba password file 1 Log in to the root account: su 2 Run the Samba password command: smbpasswd -aUsing a Samba Server for Bridged and Host-Only Networks
To use your Samba server for host‐only and bridged networking, you must modify one parameter in the smb.conf file. You can define the interface parameter so that your Samba server serves multiple interfaces. An example of this is the following: interface = eth0 vmnet1 This example tells the Samba server to monitor and use both the eth0 and vmnet1 interfaces, which are the interfaces that bridged and host‐only networking use, respectively. VMware, Inc. 331,Use Samba Without Network Access
To make Samba inaccessible from your physical network interface, you must configure the configuration file. To use Samba without network access 1 Open the configuration file: /etc/samba/smb.conf 2 Add the following line to the configuration file and save the changes. interfaces = vmnet* 3 Restart Samba. 332 VMware, Inc.,Connecting Devices 16
This chapter describes how to use various devices with a virtual machine. This chapter includes the following topics: “Using Parallel Ports” on page 333 “Using Serial Ports” on page 337 “Configuring Keyboard Features” on page 341 “Using USB Devices in a Virtual Machine” on page 353 “Use Smart Cards with Virtual Machines” on page 360 “Support for Generic SCSI Devices” on page 363 “Use Four‐Way Virtual Symmetric Multiprocessing” on page 368Using Parallel Ports
Parallel ports are used by a variety of devices, including printers, scanners, dongles, and disk drives. Although these devices can connect to the host without problems, only printers can reliably connect to virtual machines by using parallel ports. Currently, Workstation provides only partial emulation of PS/2 hardware. Interrupts that a device connected to the physical port requests are not passed to the virtual machine. The guest operating system cannot use DMA (direct memory access) to move data to or from the port. For this reason, not all devices that attach to the parallel port are guaranteed to work correctly. Do not use parallel port storage devices in a virtual machine. VMware, Inc. 333,Add a Virtual Parallel Port to a Virtual Machine
If the virtual machine is configured with a parallel port, most guest operating systems detect the port at installation time and install the required drivers. Some operating systems, including Linux, Windows NT, and Windows 2000, automatically detect the ports at boot time. Others, like Windows 95 and Windows 98, do not. To add a virtual parallel port to a virtual machine 1 Select the virtual machine. 2 Make sure the virtual machine is powered off. 3 Choose VM > Settings. 4 On the Hardware tab, click Add. 5 In the New Hardware wizard, select Parallel Port and click Next. 6 Specify which option to use for the parallel port: If you select Use physical parallel port, click Next and choose the port from the drop‐down menu. If you select Output file, click Next and enter the path and filename or browse to the location of the file. 7 Under Device status, if you do not want the parallel port to connect at power on, deselect the check box. 8 Click Finish. 9 If the guest operating system is Windows 95 or Windows 98, run the guest operating system’s Add New Hardware wizard to let Windows detect the new device. To display this wizard, choose Start > Settings > Control Panel > Add New Hardware.Troubleshoot ECR Errors for Parallel Ports
When you power on the virtual machine after adding a parallel port, you might see an error message stating that the parallel port on the host does not have an Extended Control Register (ERC). If so, it is possible the hardware supports ECR but it has been disabled in the BIOS. 334 VMware, Inc., Chapter 16 Connecting Devices To troubleshoot ECR errors for parallel ports 1 Reboot the host. 2 Early in the boot process, press and hold down the Delete key to enter the host computer’s BIOS configuration editor. 3 Find the parallel port field and enable Extended Capability Port (ECP) mode or a combination of modes that includes ECP. Most modern computers support ECP mode.Configuring a Parallel Port on a Linux Host
For a parallel port to work properly in a guest, it must first be configured properly on the host. Most problems with parallel ports are caused by mistakes in the host configuration. Linux kernels in the 2.6.x series use a special arbitrator for access to the parallel port hardware. If the host is using the parallel port, the virtual machine cannot use it. If a virtual machine is using the parallel port, the host and any users accessing the host are denied access to the device. You must use the VM > Removable Devices menu to disconnect the parallel port from the virtual machine to access the device from the host. Configure Parallel Ports for Linux 2.6.x Kernels The 2.6.x kernels that support parallel ports use the modprobeUsing Serial Ports
A Workstation virtual machine can use up to four virtual serial ports. The virtual serial ports can be configured in several ways: Connect a virtual serial port to a physical serial port on the host computer. Connect a virtual serial port to a file on the host computer. Make a direct connection between two virtual machines or between a virtual machine and an application running on the host computer. For each of these choices, you can also select whether to connect the virtual serial port when you power on the virtual machine. NOTE The virtual printer feature automatically configures a serial port to make host printers available to the guest without installing additional drivers in the virtual machine. See “Use Host Printers in a Virtual Machine” on page 182.Add a Virtual Serial Port to a Virtual Machine
Use virtual serial ports to make devices such as modems and printers available to virtual machines or to send debugging data from a virtual machine to the host or to another virtual machine. You can use virtual serial ports to send data to the following: Physical serial port – Enables you to use a device such as an external modem or hand‐held device in a virtual machine. Workstation creates a virtual serial port automatically when you enable the virtual printer feature. Output file on the host – Captures the data that a program running in the virtual machine sends to the virtual serial port. An application on the host – Enables you to use an application on the host to capture debugging information sent from the virtual machine’s serial port. Another virtual machine – Enables you to use an application in one virtual machine (the client) to capture debugging information sent from the other (the server) virtual machine’s serial port. To add a virtual serial port to a virtual machine 1 Select the virtual machine. 2 Make sure the virtual machine is powered off. VMware, Inc. 337, 3 Choose VM > Settings. 4 On the Hardware tab, click Add. 5 In the Add Hardware wizard, select Serial Port and click Next. 6 On the Serial Port Type page, do one of the following: For physical devices such as modems, select Use physical serial port on the host, click Next, and choose the port on the host computer that you want to use for this serial connection. To capture data from an application in an output file, select Output file, click Next, and enter the path and filename or browse to the location of the file on the host. To connect to a debugging application on the host or in another virtual machine, select Output to Named Pipe and click Next. 7 If you selected Output to Named Pipe, do one of the following: For a Windows host, on the Specify Named Pipe page, specify the pipe name. The pipe name must follow the form \\.\pipe\Change the Input Speed of the Serial Connection
You can increase the speed of a serial connection over a pipe to a virtual machine. Before you begin, use the guest operating system to configure the serial port for the highest setting supported by the application you are running in the virtual machine. In principle, the output speed, which is the speed at which the virtual machine sends data through the virtual serial port, is unlimited. In practice, the output speed depends on how fast the application at the other end of the pipe reads inbound data. To change the input speed of the serial connection 1 Power off the virtual machine and close the Workstation window. 2 Use a text editor to add the following line to your virtual machine’s configuration (.vmx) file: serialDebugging over a Virtual Serial Port
Using virtual machines, you can debug kernel code on one system without the need for two physical computers, a modem, or a serial cable. You can use Debugging Tools for Windows (WinDbg) or Kernel Debugger (KD) to debug kernel code in a virtual machine over a virtual serial port. You can Download Debugging Tools for Windows from the Windows Hardware Developer Central (WHDC) Web site. Debug an Application in a Virtual Machine from a Windows Host In this configuration, you have kernel code to debug in a virtual machine (called the target virtual machine) and are running Debugging Tools for Windows (WinDbg) or Kernel Debugger (KD) on a Windows host. Before you begin, on the host, make sure you have a recent version of Debugging Tools for Windows, which supports debugging over a pipe. You need version 5.0.18.0 or higher. To debug an application in a virtual machine from a Windows host 1 Prepare the target virtual machine as described in “Add a Virtual Serial Port to a Virtual Machine” on page 337. Make sure you select This end is the server when configuring the named pipe. 2 Power on the virtual machine. 3 Choose VM > Removable Devices menu to make sure the serial port is connected. If SerialConfiguring Keyboard Features
You can change which key combinations you use for hot‐key sequences in Workstation and which language to use for the keyboard that virtual network computing (VNC) clients use. In addition, you can configure platform‐specific keyboard features for Windows and Linux hosts.Use the Enhanced Virtual Keyboard for Windows Hosts
The enhanced virtual keyboard feature provides better handling of international keyboards and keyboards with extra keys. It also offers security improvements because it processes raw keyboard input as soon as possible, bypassing Windows keystroke processing and any malware that is not already at a lower layer. If you use the enhanced virtual keyboard, when you press Ctrl+Alt+Delete, the guest system only, rather than both guest and host, acts on the command. Before you begin, if you just installed or upgraded to Workstation 7.0 and have not yet restarted your computer, do so. To use the enhanced virtual keyboard for Windows hosts 1 Select the virtual machine. 2 Make sure the virtual machine is powered off. 3 Choose VM > Settings. 4 Click the Options tab, and select General. 5 To enable or disable the setting, select or deselect the Use enhanced virtual keyboard check box and click OK. VMware, Inc. 341,Hot Keys for Virtual Machines
Hot keys let you specify the key combination that is used with hot‐key sequences for virtual machines. For example, you can require that all hot‐key sequences use Ctrl+Shift+Alt. Configuring hot keys is useful to prevent certain key combinations (such as Ctrl+Alt+Del) from being intercepted by Workstation instead of being sent to the guest operating system. Use hot‐key sequences to: Switch between virtual machines Enter and leave full screen mode Release (ungrab) input Send Ctrl+Alt+Del to the virtual machine only (not to the host machine) Send commands to the virtual machine only (not to the host machine) The default settings for hot keys are listed in the preferences editor (choose Edit > Preferences > Hot Keys). Use the preferences editor to change them. Use Ctrl+Alt in a Key Combination Because Ctrl+Alt tells Workstation to release (ungrab) mouse and keyboard input, combinations that include Ctrl+Alt are not passed to the guest operating system. You must use the Space key if the key combination includes Ctrl+Alt. To use Ctrl+Alt in a key combination 1 Press Ctrl+Alt+spacebar. 2 Release the spacebar without releasing Ctrl and Alt. 3 Press the third key of the key combination you want to send to the guest. 342 VMware, Inc., Chapter 16 Connecting DevicesSpecify a Language Keyboard Map for VNC Clients
If you set a virtual machine to act as a VNC server, you can specify which language to use for the keyboard that VNC clients use. By default, the US101 keyboard map (U.S. English) is used. Before you begin, set the virtual machine to act as a VNC server. See “Configure a Virtual Machine as a VNC Server” on page 230. Also, determine the location of the keymap file to use. Default keymap files are included in the Workstation installation directory: On Windows XP hosts, this directory is in C:\Documents and Settings\All Users\Application Data\VMware\vnckeymap. On Windows Vista and Windows 7 hosts, this directory is in C:\ProgramData\VMware\vnckeymap. On Linux hosts, this directory is in /usr/lib/vmware/vnckeymap. If the keymap file you want to use is in another location, determine the path to the file. Also determine the language code. Use the following list: de: German de-ch: German (Switzerland) es: Spanish fi: Finnish fr: French fr-be: French (Belgium) fr-ch: French (Switzerland) is: Icelandic it: Italian jp: Japanese nl-be: Dutch (Belgium) no: Norwegian pt: Polish uk: UK English us: US English VMware, Inc. 343, To specify a language keyboard map for VNC clients 1 Use a text editor to open the configuration file (.vmx file) for the virtual machine and add the following lines, whereKeyboard Mapping on a Linux Host
Several situations might require you to set properties in a virtual machine’s configuration file (.vmx file) to change the way a key is mapped. Configure Keyboard Mapping for a Remote X Server Sometimes the keyboard works correctly with a local X server but not when you run the same virtual machine with a remote X server. You need to set additional properties in the configuration (.vmx) file. Before you begin, verify that the remote X server is an XFree86 server running on a PC. If the keyboard does not work correctly on an XFree86 server running locally, report the problem to VMware technical support. For local X servers, Workstation maps X key codes to PC scan codes to correctly identify a key. Workstation uses this key code map only for local X servers because it cannot tell whether a remote X server is running on a PC or on some other kind of computer. In this case, you can set a property to tell Workstation to use key code mapping. For a description of key code mapping, see “X Key Codes Compared to Keysyms” on page 346. 344 VMware, Inc., Chapter 16 Connecting Devices To configure keyboard mapping for a remote X server 1 Power off the virtual machine and close the Workstation window. 2 On the machine that hosts the virtual machine, add one of the following lines to the virtual machine configuration (.vmx) file or to ~/.vmware/config: If you use an XFree86‐based server that Workstation does not recognize as an XFree86 server, use the following property: xkeymap.usekeycodeMap = "TRUE" This property tells Workstation to always use key code mapping regardless of server type. If Workstation does recognize the remote server as an XFree86 server, use the following property: xkeymap.usekeycodeMapIfXFree86 = "TRUE" This property tells Workstation to use key code mapping if you are using an XFree86 server, even if it is remote. 3 Save and close the file. Change How a Specific Key Is Mapped If some keys on the keyboard do not work correctly in a virtual machine, you can set a property that makes a modification to the map. Before you begin, perform the following tasks: Verify that the X server is an XFree86 server running on a PC. If the X server is remote, configure it to use key code mapping. See “Configure Keyboard Mapping for a Remote X Server” on page 344. For a description of key code mapping, see “X Key Codes Compared to Keysyms” on page 346. Determine the X key code and the corresponding v‐scan code for the key. To find the X key code for a key, run xev or xmodmap -pk. Most v‐scan codes are listed in “V‐Scan Code Table” on page 349. VMware, Inc. 345, To change how a specific key is mapped 1 Power off the virtual machine and close the Workstation window. 2 On the machine that hosts the virtual machine, add the following line to the virtual machine configuration (.vmx) file or to ~/.vmware/config: xkeymap.keycode. = "" The value must be a decimal number and must be a C‐syntax hexadecimal number (for example, 0x001). For example, to swap left Ctrl and Caps Lock, use the following lines: xkeymap.keycode.64 = "0x01d # X Caps_Lock -> VM left ctrl" xkeymap.keycode.37 = "0x03a # X Control_L -> VM caps lock" 3 Save and close the file. X Key Codes Compared to Keysyms Pressing a key on the PC keyboard generates a PC scan code based roughly on the position of the key. For example, the Z key on a German keyboard generates the same code as the Y key on an English keyboard because they are in the same position on the keyboard. Most keys have one‐byte scan codes, but some keys have two‐byte scan codes with prefix 0xe0. Internally, Workstation uses a simplified version of the PC scan code that is a single nine‐bit numeric value, called a v‐scan code. A v‐scan code is written as a three‐digit hexadecimal number. The first digit is 0 or 1. For example, the Ctrl key on the left side of the keyboard has a one‐byte scan code (0x1d). Its v‐scan code is 0x01d. The Ctrl key scan code on the right side of the keyboard is two bytes (0xe0, 0x1d). Its v‐scan code is 0x11d. An XFree86 server on a PC has a one‐to‐one mapping from X key codes to PC scan codes, or v‐scan codes, which is what Workstation uses. When Workstation is hosted on an XFree86 server and runs a local virtual machine, it uses the built‐in mapping from X key codes to v‐scan codes. This mapping is keyboard independent and should be correct for most languages. In other cases (not an XFree86 server or not a local server), Workstation must map keysyms to v‐scan codes by using a set of keyboard‐specific tables. An X server uses a two‐level encoding of keys, which includes the X key code and the keysym. An X key code is a one‐byte value. The assignment of key codes to keys depends on the X server implementation and the physical keyboard. As a result, an X application normally cannot use key codes directly. Instead, the key codes are mapped 346 VMware, Inc., Chapter 16 Connecting Devices into keysyms that have names like space, escape, x and 2. You can use an X application to control the mapping by using the function XChangeKeyboardMapping() or by the program xmodmap. To explore keyboard mappings, you can use the xev command, which shows the key codes and keysyms for keys typed into its window. A key code corresponds roughly to a physical key, while a keysym corresponds to the symbol on the key top. For example, with an XFree86 server running on a PC, the Z key on the German keyboard has the same key code as the Y key on an English keyboard. The German Z keysym, however, is the same as the English Z keysym, and different from the English Y keysym. Configure How Keysyms Are Mapped When key code mapping cannot be used or is disabled, Workstation maps keysyms to v‐scan codes. If a language‐specific keyboard does not appear to be supported by Workstation, you might need to set a property that tells Workstation which keysym table to use. Before you begin, perform the following tasks: To change the mapping of a few keys, determine the keysym name for each key that is not mapped correctly. The easiest way to find the keysym name for a key is to run the xev or xmodmap -pk commands. The X header file /usr/include/X11/keysymdef.h has a complete list of keysyms. The name of a keysym is the same as its C constant without the XK_ prefix. To use a different keysym table, determine which mapping table to use. The tables are located in the xkeymap directory in the Workstation installation directory (usually /usr/lib/vmware). The table you must use depends on the keyboard layout. The normal distribution includes tables for PC keyboards for the United States and a number of European countries and languages. For most of these, both the 101‐key (or 102‐key) and the 104‐key (or 105‐key) variants are available. If none of the mapping tables is completely correct, find one that works best, copy it to a new location, and change the individual keysym mappings. VMware, Inc. 347, Workstation determines which table to use by examining the current X keymap. However, its decision‐making process can sometimes fail. In addition, each mapping is fixed and might not be completely correct for any given keyboard and X key code‐to‐keysym mapping. For example, a user might have swapped Ctrl and Caps Lock using xmodmap. This means the keys are swapped in the virtual machine when using a remote server (keysym mapping) but are unswapped when using a local server (key code mapping). To correct this situation, use configuration settings. To configure how keysyms are mapped 1 Power off the virtual machine and close the Workstation window. 2 On the machine that hosts the virtual machine, add one or more of the following lines to the virtual machine configuration (.vmx) file or to ~/.vmware/config: To disable X key code mapping to map keysyms rather than key codes to v‐scan codes, set the following property: xkeymap.nokeycodeMap = "TRUE" For more information, see “X Key Codes Compared to Keysyms” on page 346. If Workstation has a table in the xkeymap directory for your keyboard but cannot detect it, set the following property: xkeymap.language = "" The value must specify one of the tables in the xkeymap directory. However, the failure to detect the keyboard probably means the table is not completely correct for you. You might need to create a modified table and use the xkeymap.fileName property, described next. To use a different keysym mapping table that is not in the xkeymap directory, set the following property, where is the path to the table: xkeymap.fileName = "" The table must list a keysym for each key by using the following form: = "" The value is an X keysym name, and is a C‐syntax hexadecimal number (for example, 0x001). Use a new line for each keysym. Compiling a complete keysym mapping is difficult. VMware recommends editing an existing table and making small changes. 348 VMware, Inc., Chapter 16 Connecting Devices To change the keysym mapping of a few keys, set the following property for each key, on separate lines: xkeymap.keysym. = "" The value must be an X keysym name and is a C‐syntax hexadecimal number (for example, 0x001). Most v‐scan codes are listed in “V‐Scan Code Table” on page 349. The xkeymap tables themselves are also helpful. 3 Save and close the file. V-Scan Code Table Table 16‐1 shows the v‐scan codes for the 104‐key U.S. keyboard. Table 16-1. V-Scan Codes for the 104-Key U.S. Keyboard Symbol Shifted Symbol Location V-Scan Code Esc 0x001 1 ! 0x002 2 @ 0x003 3 # 0x004 4 $ 0x005 5 % 0x006 6 ^ 0x007 7 & 0x008 8 * 0x009 9 ( 0x00a 0 ) 0x00b ‐ _ 0x00c = + 0x00d Backspace 0x00e Tab 0x00f Q 0x010 W 0x011 E 0x012 R 0x013 VMware, Inc. 349, Table 16-1. V-Scan Codes for the 104-Key U.S. Keyboard (Continued)
Symbol Shifted Symbol Location V-Scan Code T 0x014 Y 0x015 U 0x016 I 0x017 O 0x018 P 0x019 [ { 0x01a ] } 0x01b Enter 0x01c Ctrl left 0x01d A 0x01e S 0x01f D 0x020 F 0x021 G 0x022 H 0x023 J 0x024 K 0x025 L 0x026 ; 0x027 ʹ 0x028 ` 0x029 Shift left 0x02a \ | 0x02b Z 0x02c X 0x02d C 0x02e V 0x02f B 0x030 350 VMware, Inc., Chapter 16 Connecting Devices Table 16-1. V-Scan Codes for the 104-Key U.S. Keyboard (Continued)
Symbol Shifted Symbol Location V-Scan Code N 0x031 M 0x032 , < 0x033 . > 0x034 / ? 0x035 Shift right 0x036 * numeric pad 0x037 Alt left 0x038 Space bar 0x039 Caps Lock 0x03a F1 0x03b F2 0x03c F3 0x03d F4 0x03e F5 0x03f F6 0x040 F7 0x041 F8 0x042 F9 0x043 F10 0x044 Num Lock numeric pad 0x045 Scroll Lock 0x046 Home 7 numeric pad 0x047 Up arrow 8 numeric pad 0x048 PgUp 9 numeric pad 0x049 ‐ numeric pad 0x04a Left arrow 4 numeric pad 0x04b 5 numeric pad 0x04c Right arrow 6 numeric pad 0x04d VMware, Inc. 351, Table 16-1. V-Scan Codes for the 104-Key U.S. Keyboard (Continued)
Symbol Shifted Symbol Location V-Scan Code + numeric pad 0x04e End 1 numeric pad 0x04f Down arrow 2 numeric pad 0x050 PgDn 3 numeric pad 0x051 Ins 0 numeric pad 0x052 Del numeric pad 0x053 F11 0x057 F12 0x058 Break Pause 0x100 Enter numeric pad 0x11c Ctrl right 0x11d / numeric pad 0x135 SysRq Print Scrn 0x137 Alt right 0x138 Home function pad 0x147 Up arrow function pad 0x148 Page Up function pad 0x149 Left arrow function pad 0x14b Right arrow function pad 0x14d End function pad 0x14f Down arrow function pad 0x150 Page Down function pad 0x151 Insert function pad 0x152 Delete function pad 0x153 Windows left 0x15b Windows right 0x15c Menu 0x15d 352 VMware, Inc., Chapter 16 Connecting Devices The 84‐key keyboard has a Sys Req key on the numeric pad. Its v‐scan code is 0x054. Keyboards outside the U.S. usually have an extra key (often < > or < > |) next to the left Shift key. The v‐scan code for this key is 0x056. Using USB Devices in a Virtual Machine
You can connect up to 20 USB devices to one virtual machine simultaneously. Workstation provides two USB controllers per virtual machine, a UHCI controller for USB 1.1 devices and an EHCI controller for USB 2.0 devices. For USB 2.0 support, your host must support USB 2.0, and you must enable USB 2.0 support in Workstation. USB 2.0 support is available only for Workstation 6.x and higher virtual machines. USB 2.0 devices are high‐speed devices which include the latest models of USB flash drives, USB hard drives, iPods, and iPhone. On the host, when a USB 2.0 device connects to a USB port, the device is automatically connected to EHCI controller and operates in USB 2.0 mode. A USB 1.1 device is connected to UHCI controller and operates in USB 1.1 mode. A virtual machine with USB 2.0 support enabled, simulates this behavior. See “Enable the USB 2.0 Controller for a Virtual Machine” on page 354. Although your host operating system must support USB, you do not need to install device‐specific drivers for USB devices in the host operating system to use those devices only in the virtual machine. Windows NT and Linux kernels earlier than 2.2.17 do not support USB. VMware has tested a variety of USB devices with Workstation 7.0. If the guest operating system has appropriate drivers, you can use a wide variety of USB devices, for example, PDAs, Smart phones, printers, storage (disk) devices, scanners, MP3 players, digital cameras, memory card readers, and isochronous transfer devices, such as webcams, speakers, and microphones. USB human interface devices, such as the keyboard and mouse, can be connected to the virtual machine by enabling the Show all USB input devices option. If you do not select the option to Show all USB input devices as removable devices, these devices do not appear as Removable Devices available to connect to the virtual machine, even though they are plugged into USB ports on the host. This option is enables users to use special USB human interface devices (HIDs) inside a virtual machine. VMware, Inc. 353, Enable the USB 2.0 Controller for a Virtual Machine
The virtual machineʹs USB controller and high‐speed USB 2.0 devices are enabled by default. Modems and certain streaming data devices, such as speakers and webcams, do not work properly unless you enable USB 2.0 support. If your virtual machine was created using an older version of Workstation the USB 2.0 device support is not enabled. You can enable the USB controller in the virtual machine settings editor of Workstation 7.0. Before you begin, perform one of the following tasks that apply to your configuration: Verify that the virtual machine is a Workstation 6.x or higher virtual machine. Verify that the guest supports USB 2.0 devices. On Windows XP guests, verify that the latest service pack is installed to use USB 2.0. If you use Windows XP with no service packs, the driver for the EHCI controller cannot be loaded. If you do not plan to use USB devices in a virtual machine, you can use the virtual machine settings editor to disable USB 2.0 support. To enable the USB 2.0 Controller for a virtual machine 1 Select the virtual machine. 2 Choose VM > Settings. 3 On the Hardware tab, select USB Controller. 4 Select the Enable high‐speed support for USB 2.0 devices check box and click OK. Add a USB Controller to a Virtual Machine
By default, a USB controller is included when you create a virtual machine. If you remove the USB controller, you can add it back. This controller is required to use a smart card in a virtual machine regardless of whether the smart card reader is a USB device. To add a USB controller to a virtual machine 1 Select the virtual machine. 2 Make sure the virtual machine is powered off. 354 VMware, Inc., Chapter 16 Connecting Devices 3 Choose VM > Settings. 4 On the Hardware tab, click Add to start the Add Hardware wizard. 5 On the Hardware Type page, select USB Controller and click Next. 6 On the USB page, click Finish. 7 In the virtual machine settings editor, click OK. You can now start the virtual machine and automatically or manually connect USB devices and smart card readers. Connecting USB Devices
When a virtual machine is running, its window is the active window. If you plug a USB device into the host, by default, the device connects to the virtual machine instead of the host. If you manually connect a USB device to a virtual machine (choose VM > Removable Devices), Workstation retains the virtual machine’s connection to the affected port on the host. You can suspend or power off the virtual machine, or unplug the device. When you plug the device back in or resume the virtual machine, Workstation reconnects the device. Workstation retains the connection by writing an autoconnect entry to the virtual machine’s configuration (.vmx) file. If Workstation cannot reconnect to the device (for example, because you disconnect the device), the device is removed and a message is displayed, indicating that Workstation cannot connect to the device. You can connect manually to the device if it is still available. Enable or Disable Automatic Connection of USB Devices You can disable the autoconnect feature if you do not want USB devices to automatically connect to the virtual machine when you power it on. To enable or disable automatic connection of USB devices 1 Select the virtual machine. The virtual machine can be powered on or off unless you plan to change the setting for connecting to USB mouse and keyboard devices. In this case, the virtual machine must be powered off. 2 Choose VM > Settings. VMware, Inc. 355, 3 On the Hardware tab, select USB Controller. 4 Select or deselect the Automatically connect new USB devices check box to enable or disable the setting and click OK. Enable or Disable Show All USB Input Devices The Show all USB input devices option is disabled by default. This option enables users to use special USB HIDs inside a virtual machine exclusively. NOTE An HID that is connected to the guest is not available to the host. VMware recommends disabling automatic connection of USB device when using a KVM switch for a mouse or keyboard. Before you begin, make sure that the virtual machine is powered off. To enable or disable Show all USB input devices 1 Select VM > Settings. 2 On the Hardware tab, select USB Controller. 3 Select the Show all USB input devices check box to enable or disable the setting and click OK. If the Show all USB input devices check box is enabled, all the HIDs, such as USB 1.1 and 2.0 mouse and keyboard devices, appear as Removable Devices when the virtual machine is powered on. Connect a USB Device Manually If a device that is connected to the host does not automatically connect to a virtual machine at power on, you can connect the device manually. Before you begin, for USB mouse, keyboard, and other input devices, you must enable showing these devices. See “Enable or Disable Show All USB Input Devices” on page 356. Also, when you are using a virtual machine, if you plug a device in to the host, the autoconnect feature usually connects the device to the virtual machine. If this action does not occur, you can connect the device manually. 356 VMware, Inc., Chapter 16 Connecting Devices To connect a USB device manually 1 Select the virtual machine. 2 Make sure the virtual machine is powered on. 3 Choose VM > Removable Devices > . Here specifies the USB device that is plugged in to the host. A check mark appears next to the device’s name, indicating that it is connected. If the physical USB devices are connected to the host through a hub, the virtual machine sees only the USB devices, not the hub. USB Driver Installation on a Windows Host
When a particular USB device is connected to a virtual machine for the first time, the host detects it as a new device named VMware USB Device and installs the appropriate VMware driver. On Windows XP and Windows Server 2003 hosts, the Microsoft Windows Found New Hardware wizard prompts you to run it. Select the default action, Install the software automatically. After the software is installed, the guest operating system detects the USB device and searches for a suitable driver. Synchronize a PDA to Install a PDA Driver When you synchronize a PDA to a virtual machine for the first time, the total time required to load the VMware USB device driver in the host and the PDA driver in the guest might exceed the device’s connection timeout value. This causes the device to disconnect itself from the computer before the guest can synchronize with it. To synchronize a PDA to install a PDA driver 1 Connect the USB device to the computer that hosts the virtual machine. 2 Synchronize the PDA with the host. 3 Let the guest finish installing the PDA driver. 4 Dismiss any connection error warnings. 5 Synchronize the PDA again. This second attempt usually succeeds. VMware, Inc. 357, Access and Use a USB Device on a Linux Host
On Linux hosts, Workstation uses the USB device file system to connect to USB devices. If the USB device file system is not located in /proc/bus/usb, you must mount the USB file system to that location. Before you begin, add a USB controller to the virtual machine if the virtual machine does not have one. See “Add a USB Controller to a Virtual Machine” on page 354. Do not attempt to add a USB drive’s device node directory (for example, /dev/sda) to the virtual machine as a hard disk. To access and use a USB device on a Linux host 1 Run the following command as root: mount -t usbfs none /proc/bus/usb 2 Connect the USB device to the host and begin using it. How Device Control Is Shared Between Host and Guest
Only the host or the guest can have control of a USB device at any one time. Device control operates differently, depending on whether the host is a Linux or a Windows computer. Device Control on a Windows Host When you connect a device to a virtual machine, it is disconnected from the host or from the virtual machine that previously had control of the device. When you disconnect a device from a virtual machine, it is returned to the host. Under some circumstances, if a USB storage device is in use on the host (for example, one or more files stored on the device are open on the host), an error appears in the virtual machine when you try to connect to the device. You must let the host complete its operation or close any application connected to the device on the host, and connect to the device in the virtual machine again. On Windows XP and Windows Server 2003 hosts, when you connect a USB network or storage device to a virtual machine, a message might appear on the host that says the device can be removed safely. This is normal behavior, and you can dismiss the dialog box. However, do not remove the device from your physical computer. If the network or storage device does not disconnect from the host, use the appropriate system tray icon to disconnect it. On Windows XP and Windows Server 2003, it is called Safely Remove Hardware. 358 VMware, Inc., Chapter 16 Connecting Devices Troubleshoot Device Control Issues on a Linux Host On Linux hosts, guest operating systems can use devices that are not already in use by the host, that is, devices that are not claimed by a host operating system driver. If the device is in use by the host and you try to choose VM > Removable Devices to connect it to the guest, a dialog box appears, asking whether you want to disconnect the driver on the host. Occasionally, disconnecting the device fails. A related issue sometimes affects devices that rely on automatic connection (as PDAs often do). Occasionally, even if you successfully used autoconnection to connect the device to the virtual machine, you might experience problems with the connection to the device. To troubleshoot device control issues on a Linux host 1 If you have problems with automatic connections, choose VM > Removable Devices to disconnect the device and reconnect it. 2 If the problem persists, unplug the device physically and plug it in again. 3 If a warning appears that the device is in use, disable the device in the hotplug configuration files in the /etc/hotplug directory. For details on editing these configuration files, see your Linux distribution’s documentation. 4 If a disconnection fails, do one of the following: If the driver was automatically loaded by hotplug, disable it in the hotplug configuration files in the /etc/hotplug directory. For details on editing these configuration files, see your Linux distribution’s documentation. To unload the device driver manually, become root (su -) and use the rmmod command. Disconnecting USB Devices from a Virtual Machine
Before you unplug a USB device or choose VM > Removable Devices to disconnect it from a virtual machine, be sure it is in a safe state. Follow the procedures the device manufacturer specifies for unplugging the device from a physical computer. This is true whether you are physically unplugging it, moving it from host to virtual machine, moving it between virtual machines, or moving it from virtual machine to host. VMware, Inc. 359, This is important with data storage devices (a Zip drive, for example). If you move a data storage device too soon after saving a file and the operating system did not actually write the data to the disk, you can lose data. Use Smart Cards with Virtual Machines
A smart card is a plastic card about the size of a credit card but embedded with a computer chip. Many government agencies and large enterprises use smart cards to send secure communication, digitally sign documents, and authenticate users who access their computer networks. Users plug a smart card reader into their computer and insert their smart card in the reader. They are then prompted for their PIN to log on. The virtual machine considers smart card readers to be a type of USB device. You can choose VM > Removable Devices to access them. Virtual machines can connect to smart card readers that interface to serial ports, parallel ports, USB ports, PCMCIA slots, and PCI slots. A smart card can be shared between virtual machines or between the host and one or more virtual machines. Sharing is enabled by default. To disable sharing, see “Disable Smart Card Sharing” on page 362. When you plug a smart card reader into the computer the reader appears as two separate USB devices in the Workstation interface. This is because you can use smart cards in one of two mutually exclusive modes: virtual mode or USB passthrough mode. You must select one or the other. Virtual mode (Recommended) – The smart card reader device is available as Virtual under Removable Devices. After the virtual reader is connected to the virtual machine, it is visible as USB Smart Card Reader on Windows XP guests. On Windows Vista and Windows 7 guests the generic smart card reader device name appears under the Windows Device Manager list. In virtual mode, the smart card reader can be shared among applications on the host and among applications within different guests on the host. USB passthrough mode – The smart card reader device is available as under Removable Devices. In USB passthrough mode, a single virtual machine directly controls the physical smart card reader. A USB passthrough smart card reader cannot be used by applications on the host or by applications within other virtual machines. You should use USB passthrough mode only if connection in virtual mode does not work well for your scenario. If you are using the USB passthrough mode you may need to install the driver provided by the manufacturer. 360 VMware, Inc., Chapter 16 Connecting Devices Smart cards can be used with many Linux distributions. VMware provides full smart card support for Windows guests running on Linux hosts. However, using smart cards within Linux, typically requires third party software to effectively authenticate to a domain or enable secure communications. Smart cards should work with common Linux browsers, email applications, and directory services however, these products have not been tested or certified by VMware. To use a host’s smart card reader in a virtual machine, make sure the following prerequisites are satisfied: On Windows hosts, start the service called SCardSvr.exe if it is not already running. On Linux hosts, make sure the libpcsclite library is installed. Most recent Linux distributions include this library. Also make sure the pcscd daemon is running. Make sure the virtual machine has a USB controller. A USB controller is required regardless of whether the smart card reader itself is a USB device. By default, USB controllers are included when you create a virtual machine. If you removed the USB controller, you must add it back. See “Add a USB Controller to a Virtual Machine” on page 354. To use smart cards with virtual machines 1 Connect the smart card reader to the host machine. 2 Start the virtual machine. 3 To connect the smart card reader to a virtual machine, choose VM > Removable Devices > Virtual > Connect. If the smart card reader is a USB smart card reader, two items appear for it in the Removable Devices menu. Both items use the model name of the reader, but one item name begins with Virtual. On Linux hosts, if you select the wrong item and then want to select the Virtual smart card item, see “Switch to Using the Virtual Smart Card Reader on Linux Hosts” on page 362. 4 To disconnect the smart card reader from the virtual machine, choose VM > Removable Devices > Virtual > Disconnect. VMware, Inc. 361, 5 To remove the smart card from the virtual machine, choose VM > Removable Devices > Virtual > Remove Smart Card. The smart card is removed from the virtual machine but stays connected on the host. If the smart card is physically removed from the smart card reader then this option is disabled. 6 To insert the smart card to the virtual machine, choose VM > Removable Devices > Virtual > Insert Smart Card. If the smart card is physically inserted in the smart card reader then the smart card is also inserted in the virtual machine. Switch to Using the Virtual Smart Card Reader on Linux Hosts
Because of the way smart card reader functionality is implemented on Linux hosts, you must exit Workstation and restart the pcscd daemon on the host before switching from the non‐virtual smart card reader to the virtual smart card reader. To switch to using the virtual smart card reader on Linux hosts 1 To disconnect from the non‐virtual smart card reader, use the Removable Devices menu and select Disconnect. 2 Power off the virtual machine and exit Workstation. 3 Physically disconnect the smart card reader from the host. 4 Restart the pcscd daemon on the host. 5 Physically connect the smart card reader to the host. 6 Start Workstation, power on the virtual machine, and connect to the virtual smart card reader. See “Use Smart Cards with Virtual Machines” on page 360. Disable Smart Card Sharing
By default, you can share a smart card between virtual machines or between the host and one or more virtual machines. You might want to disable smart card sharing if you are using a PCMCIA smart card reader, deploying virtual machines for enterprise use and do not want to support drivers for various smart card readers, and your host has drivers but not the guest. 362 VMware, Inc., Chapter 16 Connecting Devices The setting that controls smart card sharing is located in the global configuration file. The global configuration file is created when you change any of the default settings in the Workstation preferences editor (Edit > Preferences). The file location depends on the host operating system: On most Windows hosts: C:\Documents and Settings\All Users\Application Data\VMware\VMware Workstation\config.ini On Windows Vista and Windows 7 hosts: C:\ProgramData\VMware\VMware Workstation\config.ini On Linux hosts: /etc/vmware/config To disable smart card sharing 1 If the config.ini file does not yet exist on your host computer, choose Edit > Preferences and change at least one of the settings in the preference editor. 2 Open the config.ini file with a text editor and add the following line: usb.ccid.useSharedMode = "FALSE" 3 Save and close the file. 4 Set permissions on this file so that other users cannot change it. Support for Generic SCSI Devices
Generic SCSI gives the guest operating system direct access to SCSI devices connected to the host, such as scanners, tape drives, and other data storage devices. Using the SCSI generic driver, Workstation allows a virtual machine to run any SCSI device that is supported by the guest operating system. In theory, generic SCSI is completely device independent, but VMware has discovered it is sensitive to the guest operating system, device class, and specific SCSI hardware. Try any SCSI hardware and report problems to VMware technical support. On Windows hosts, to access host SCSI devices from within a virtual machine, you must run Workstation as a user with administrator access. On Linux hosts, you must have read and write permissions on a given generic SCSI device to use the device within a virtual machine, even if the device is a read‐only device such as a CD‐ROM drive. These devices typically default to root‐only permissions. Your administrator can create a group with access to read and write to these devices and add the appropriate users to that group. VMware, Inc. 363, Installing Required Adapters or Drivers for Some Windows Guests
On older Windows guest operating systems, you might need to install special host bus adapters. To use a SCSI device with 32‐bit Windows XP guests, you must install a special driver that VMware provides. Installing a SCSI Adapter on Windows 9.x and Me Guests If you use generic SCSI devices in a Windows 95, Windows 98, or Windows Me guest operating system and are experiencing problems with the devices, download the latest Mylex (BusLogic) BT/KT‐958 compatible host bus adapter from LSI Web site. To install the driver, follow the instructions on the Web site. This driver overrides what Windows chooses as the best driver, but it corrects known problems. Installing a SCSI Driver for 32-Bit Windows XP Guests To use SCSI devices in a 32‐bit Windows XP virtual machine, you need a special SCSI driver available from the Downloads page of the VMware Web site. Install the BusLogic Driver in a Windows NT 4.0 Guest Generic SCSI devices use the virtual Mylex (BusLogic) BT/KT‐958 compatible host bus adapter provided by the virtual machine. On Windows NT 4.0, you might need to install the driver manually if it is not already installed for a virtual SCSI disk. Do so before you add a generic SCSI device. Before you begin, have your Windows NT installation CD available. To install the BusLogic driver in a Windows NT 4.0 guest 1 To open the SCSI Adapters control panel, choose Start > Settings > Control Panel > SCSI Adapters. 2 On the Drivers tab, click Add. 3 In the list of vendors on the left, select BusLogic. 4 In the list of drivers on the right, select BusLogic MultiMaster PCI SCSI Host Adapters and click OK. 5 Insert the Windows NT CD when you are prompted and click OK. 6 Reboot when you are prompted. 364 VMware, Inc., Chapter 16 Connecting Devices Avoiding Concurrent Access on Linux Hosts
The SCSI generic driver sets up a mapping for each SCSI device in /dev. Each entry starts with sg (for the SCSI generic driver) followed by a number. For example, /dev/sg0 is the first generic SCSI device. Each entry corresponds to a SCSI device in the order specified in /proc/scsi/scsi, from the lowest device ID on the lowest adapter to the highest device ID on the lowest adapter, and so on to the highest device ID on the highest adapter. Some Linux devices such as tape drives, disk drives, and CD‐ROM drives already have a designated /dev entry (st, sd, and sr, respectively). When the SCSI generic driver is installed, Linux identifies these devices with corresponding sg entries in /dev in addition to their traditional entries. Workstation ensures that multiple programs are not using the same /dev/sg entry at the same time but cannot always ensure that multiple programs are not using the /dev/sg entry and the traditional /dev entry at the same time. When you specify which SCSI device to use in a virtual machine, do not specify /dev/st0 or /dev/sr0. CAUTION Do not attempt to use the same generic SCSI device in both host and guest. This can cause unexpected behavior and might cause loss or corruption of data. Add a Generic SCSI Device to a Virtual Machine
To map virtual SCSI devices on a virtual machine to physical generic SCSI devices on the host, you must add a generic SCSI device to the virtual machine. Before you begin, make sure you have the following required permissions: On Windows hosts, to access host SCSI devices as generic SCSI devices, you must run Workstation as a user with administrator access. On Linux hosts, generic SCSI requires version 2.1.36 or higher of the SCSI Generic (sg.o) driver, which comes with kernel 2.2.14 and higher. Also, you must be logged on as a user who has permissions to use the device (that is, read and write permissions). To add a generic SCSI device to a virtual machine 1 Select the virtual machine. 2 Choose VM > Settings. 3 On the Hardware tab, click Add to start the Add Hardware wizard. 4 On the Hardware Type page, select Generic SCSI Device and click Next. VMware, Inc. 365, 5 On the Choose SCSI Device page, from the drop‐down menu of SCSI devices, select the physical device to map. If you do not see the device you want in the list, see “Troubleshoot Problems Detecting Generic SCSI Devices” on page 366. On Linux hosts, if you type in the path to the SCSI device, do not enter /dev/st0 or /dev/sr0. 6 Select the Connect at power on check box to configure automatic connection behavior and click Finish. 7 On the Hardware tab, in the Virtual device node section, select the SCSI device identifier to use for the drive and click OK. For example, if you select SCSI 0:2, the guest operating system sees the drive as ID 2 on controller 0. Troubleshoot Problems Detecting Generic SCSI Devices
When you use the virtual machine settings editor to add a generic SCSI device to a virtual machine, occasionally the device does not appear in the list of available SCSI devices. Before you begin troubleshooting this problem, you might need to know the following: The SCSI bus number that the device uses on the host system. The SCSI bus is assigned a number by the host operating system after all IDE buses are assigned numbers. For example, if you have two IDE buses, they are numbered 0 and 1. The first SCSI bus is assigned bus number 2. If you cannot determine the SCSI bus number, try using a third‐party tool such as winobj to determine this information. You can download winobj for free from the Windows Sysinternals Web site. The target ID the device uses in the virtual machine and on the host. This ID is usually set by some jumpers or switches on the device. To determine the target ID, see the owner’s manual for the device. 366 VMware, Inc., Chapter 16 Connecting Devices The main reasons Workstation cannot detect a device include the following: A driver for that device is not installed on the host. A driver on the host prevents the device from being detected. The virtual machine uses a device for which there are no drivers available to the host operating system. In this case, add the device manually to the virtual machine’s configuration (.vmx) file. Adding a device in this manner is recommended for advanced users only. To troubleshoot problems detecting generic SCSI devices 1 Find out whether the device driver for this device is installed on the host. 2 If the device driver is not installed and you want to install it, do so and see if the device appears correctly in the virtual machine settings editor. You might not want to install the driver on the host if you want to avoid a device‐in‐use conflict between the host and guest. If a driver is installed but does not appear correctly, if you cannot install the driver on the host, or if you do not want to install the driver on the host, continue with the rest of this procedure. 3 If an original SCSI device driver is already installed on the host, disable it. Some Windows operating systems do not process the send command from the adapter if the device driver owns the device. 4 Power off the virtual machine and open the virtual machine’s configuration (.vmx) file in a text editor. 5 Add or change the following line in the .vmx file, where X is the SCSI bus number the device uses on the host system, and Y is the target ID the device uses both in the virtual machine and on the host: scsiZ:Y.fileName = "" For "" use: "scsiX:Y" The following is an example of how to set the option. The problematic device is a CD‐ROM drive, and the existing entry in the configuration file is: scsi0:4.fileName = "CdRom0" VMware, Inc. 367, If the device on the host is located on bus 2 with target ID 4, change this line to: scsi0:4.fileName = "scsi2:4" If your problem was that the virtual machine has a SCSI adapter and generic SCSI device, but Workstation did not recognize the device when the virtual machine was powered on, you can stop at this point. 6 If the virtual machine does not contain any SCSI devices, to add a generic SCSI device to a new virtual SCSI adapter, or to use an existing SCSI device as a generic SCSI device, add the following line in the .vmx file: scsiZ:Y.deviceType = "scsi-passthru" If you wanted to use an existing SCSI device as a generic SCSI device, you can stop at this point. 7 If the virtual machine does not contain any SCSI devices, or to add a generic SCSI device to a new virtual SCSI adapter, add the following lines in the .vmx file, where Z is the SCSI bus number the device uses in the virtual machine: scsiZ:Y.present = "true" scsiZ.present = "true" If the virtual machine settings editor still does not include this device in the list of available SCSI devices for this virtual machine, contact VMware technical support. Use Four-Way Virtual Symmetric Multiprocessing
With Virtual SMP, you can assign processors and cores per processor to a virtual machine on any host machine that has at least two logical processors. The following are all considered to have two or more logical processors: A multiprocessor host with two or more physical CPUs A single‐processor host with a multicore CPU A single‐processor host with hyperthreading enabled NOTE On hyperthreaded uniprocessor hosts, performance of virtual machines with Virtual SMP might be below normal. Even on multiprocessor hosts, performance is affected if you overcommit by running multiple workloads that require more total CPU resources than are physically available. You can power on and run multiple dual‐processor virtual machines concurrently. The number of processors for a given virtual machine appears in the summary view of the virtual machine. 368 VMware, Inc., To use four-way virtual symmetric multiprocessing Do one of the following: For a new virtual machine, choose the custom configuration in the New Virtual Machine wizard. On the Processor Configuration page, specify the number. For an existing virtual machine, choose VM > Settings and on the Hardware tab, select Processors and specify the number. Use a Virtual Machine That Originally Had More Than Four Virtual Processors
You can use Workstation 7.0, running on a multiprocessor host machine, to open a virtual machine created in ESX Server that has one or more virtual processors. You cannot use Workstation, however, to power on a virtual machine that has more than four virtual processors assigned, even if more processors were assigned when the virtual machine was created in ESX Server. You can see the number of processors in the virtual machine’s summary view or by using the virtual machine settings editor. To use a virtual machine that has more than four virtual processors assigned, you must change the number of processors before powering it on. To use a virtual machine that originally had more than four virtual processors 1 Select the virtual machine. 2 Make sure the virtual machine is powered off. 3 Choose VM > Settings. 4 On the Hardware tab, select Processors, and note that Number of Processors is set to Other (x), where x is the number of processors originally assigned in ESX Server. Workstation preserves this original configuration setting for the number of processors, even though two is the maximum number of processors supported. After you commit a change to this setting, the original setting for the number of processors is discarded and no longer appears as an option in the virtual machine settings editor. 5 Change the Number of processors setting to One, Two, or Four and click OK. 369 VMware, Inc., 370 VMware, Inc., Special-Purpose Configuration Options for Windows Hosts 17
You can use configuration options for tasks, such as restricting the operations a user can perform with a virtual machine or simplifying the user interface for inexperienced users. In a classroom, for example, you can ensure that virtual machine configurations remain consistent from one class session to the next. This chapter includes the following topics: “Restricting the User Interface” on page 371 “Making a Virtual Machine Always Use Full Screen Switch Mode” on page 374 “Guest ACPI S1 Sleep” on page 382 Restricting the User Interface
To enable the restricted user interface, a user must have sufficient privileges to edit the virtual machine’s configuration file and to set file permissions. The restricted user interface affects only the specific virtual machines for which the setting is created. The following changes occur when you enable the restricted user interface: The toolbar is always hidden. All functions on the VM > Power menu, Snapshot menu, Replay menu, and Removable Devices menu are disabled. No access is provided to the virtual machine settings editor (VM > Settings). VMware, Inc. 371, The user cannot change virtual networking settings (Edit > Virtual Network Editor). The user starts the virtual machine by double‐clicking the configuration (.vmx) file or a desktop shortcut. The user shuts down by closing the virtual machine (File > Exit). It is also possible to launch Workstation and open a restricted‐interface virtual machine from the Favorites list or File menu. Enable the Restricted User Interface
Although the restricted user interface provides no access to menu and toolbar controls for a snapshot, you can give users limited snapshot control. If you set up a snapshot for the restricted virtual machine and set the power‐off option to Ask Me, the standard dialog box appears when a virtual machine shuts down and the user can choose Just Power Off, Take Snapshot, or Revert to Snapshot. To enable the restricted user interface 1 Power off the virtual machine and close the VMware Workstation window. 2 Open the virtual machine’s configuration file (.vmx file) in a text editor. 3 Add the following line anywhere in the file: gui.restricted = "TRUE" 4 (Optional) Set file permissions on the configuration file to give normal users of the system only read access to the file. 5 Create a shortcut to the configuration file on the desktop and give it an appropriate name. Restrict the User Interface and Return to a Snapshot
You can combine a restricted user interface with a snapshot to ensure that users’ virtual machines always start in the same state. Typically, users running a virtual machine with a restricted user interface can only power it on and off, and the virtual machine boots when powered on. When the virtual machine has a snapshot set and is configured to return to that snapshot when powered off, the user can only start and power off the virtual machine. The virtual machine always starts from the snapshot. To restrict the user interface and return to a snapshot 1 Power on the virtual machine and be sure it is in the appropriate state. 2 Create a snapshot. See “Take a Snapshot” on page 211. 372 VMware, Inc., Chapter 17 Special-Purpose Configuration Options for Windows Hosts 3 Configure the virtual machine to return to the snapshot any time it is powered off: Choose VM > Settings > Options > Snapshot/Replay and select After Powering Off and Revert to Snapshot. 4 With the virtual machine powered off, restrict the user interface, as follows: a Close the VMware Workstation window. b Open the virtual machine’s configuration file (.vmx file) in a text editor. c Add the following line anywhere in the file. gui.restricted = "TRUE" 5 (Optional) Set file permissions on the configuration file to give normal users of the system read‐only access to the file. 6 Create a shortcut to the configuration file on the desktop and name it. 7 Run this virtual machine by double‐clicking the shortcut to the configuration file. The virtual machine starts at the snapshot, with the user interface restricted. Users do not have a toolbar or access to the VM > Power menu or the virtual machine settings editor. 8 Choose File > Close. The virtual machine powers off, and the next time a user powers it on, it returns to the snapshot. Disable the Restricted User Interface
Disable the restricted user interface to make items in the VM menu available to users again. To disable the restricted user interface 1 Power off the virtual machine and close the VMware Workstation window. 2 Open the configuration file (.vmx) file and do one of the following: Set gui.restricted = "FALSE". Remove or comment out the gui.restricted = "TRUE" line. 3 Save the changes to the configuration file and close it. 4 Start the virtual machine by double‐clicking the shortcut. The virtual machine starts at the snapshot, and the interface is not restricted. VMware, Inc. 373, Making a Virtual Machine Always Use Full Screen Switch Mode
Full screen switch mode is a runtime option for Workstation on Windows hosts. When Workstation is running in full screen switch mode, the user has no access to the Workstation user interface. The user cannot create, reconfigure, or launch virtual machines. A system administrator performs these functions. When Workstation is running in full screen switch mode, one or more virtual machines can be running, and you can use hot keys to switch from one to another. You can also provide hot‐key access to the host operating system. Specify Global Configuration Settings for Full Screen Switch Mode
To run Workstation in full screen switch mode, you must, set one or more properties in the Workstation global configuration file. The global configuration file is created when you change any of the default settings in the Workstation preferences editor (Edit > Preferences). The file location depends on the host operating system: On most Windows hosts: C:\Documents and Settings\All Users\Application Data\VMware\VMware Workstation\config.ini On most Windows Vista and Windows 7 hosts: c:\ProgramData\VMware\VMware Workstation\config.ini To specify global configuration settings for full screen switch mode 1 If the config.ini file does not yet exist on your host computer, choose Edit > Preferences and change at least one of the settings in the preference editor. 2 Open the config.ini file with a text editor and add at least one of the following lines: fullScreenSwitch.cycleHost = "TRUE" This setting causes the host operating system to be included when you use a hot key for cycling through powered on virtual machines. See “Hot Key for Cycling Through Virtual Machines and the Host Computer” on page 377. 374 VMware, Inc., Chapter 17 Special-Purpose Configuration Options for Windows Hosts FullScreenSwitch.hostDirectKey = "" Use this setting to define a hot key for switching directly to the host operating system. See “Host Operating System Hot Key” on page 378. 3 (Optional) Specify other full screen switch mode settings you want to use. To specify hot keys for switching to other virtual machines or the host computer, first, see the following sections, in the order listed: “Virtual Key Codes” on page 375 “Other Entries in the Global Configuration File” on page 378 4 Save and close the file. 5 Set permissions on this file so that other users cannot change it. 6 Open the preferences.ini file with a text editor and add the following lines: pref.fullScreen.v5 = "TRUE" pref.autoFitFullScreen = "fitGuestToHost" On most Windows hosts, this file is located in: %USERPROFILE%\Application Data\VMware\preferences.ini On Windows Vista and Windows 7 hosts, this file is located in: %USERPROFILE%\AppData\Roaming\VMware\preferences.ini To specify a hot key for switching to a specific virtual machine, see “Virtual Machine Hot Key” on page 378. Virtual Key Codes
To configure hot keys for use when running Workstation in full screen switch mode, you must specify the virtual key code for each hot key. Virtual key codes use hexadecimal format, which is a hexadecimal number preceded by 0x. For example, to use the virtual key code of 5A as a value, type 0x5A. Microsoft provides a reference list of virtual key codes. To access this reference list, enter the keyword virtual key codes on the MSDN Web site. The hot‐key entries also include modifier keys. The modifier keys are Ctrl, Alt, Shift, and Windows keys. The Windows key is the key between the Ctrl and Alt keys. You can also use a combination of those keys. Table 17‐1 lists the key codes for modifier keys. VMware, Inc. 375, Table 17-1. Modifier Keys for Hot-Key Entries Modifier Key Hexadecimal Value No modifier 0x0 Alt 0x1 Ctrl 0x2 Shift 0x4 Win (Windows) 0x8 Ctrl+Alt 0x3 Alt+Shift 0x5 Ctrl+Shift 0x6 Ctrl+Alt+Shift 0x7 Win+Alt 0x9 Win+Ctrl 0xa Win+Ctrl+Alt 0xb Win+Shift 0xc Win+Shift+Alt 0xd Win+Shift+Ctrl 0xe Win+Shift+Ctrl+Alt 0xf Keep the following limitations in mind when defining cycle keys and switch keys: Do not use the Pause key with the Ctrl key. You can use the Pause key with other modifier keys. If you use the F12 key, you must use one or more modifier keys. You cannot use the F12 key alone. You cannot use combinations that include only the Shift, Ctrl, and Alt keys. These keys can be used only as modifiers in combination with some other key. When listing a key plus a modifier, type the virtual key code for the key followed by a comma and type the value for the modifier key or keys. For example, the value entry for Ctrl+Shift+F1 is 0x70,0x6. 376 VMware, Inc., Chapter 17 Special-Purpose Configuration Options for Windows Hosts Hot Key for Cycling Through Virtual Machines and the Host Computer
You can specify a hot key or hot‐key combination for cycling through the available virtual machines on a host computer when running Workstation in full screen switch mode. Hot keys behave in the following manner: Each time you press the specified hot key, the next virtual machine appears in order. You can also include the host operating system in the cycle. If any particular virtual machine is not running, it is skipped. If only one virtual machine is running and the host operating system is not included in the cycle, pressing the hot key has no effect. The hot key for cycling through virtual machines is defined in the global configuration file (config.ini). Two options control cycling: FullScreenSwitch.cycleKey The value of this option defines the hot key. It is specified as ,. It has no default. For example, to use the Pause key with no modifier to cycle through virtual machines, add the following line to the config.ini file, or modify its value if the option is already listed: FullScreenSwitch.cycleKey = "0x13,0x0" FullScreenSwitch.cycleHost Set this option to TRUE to include the host operating system in the cycle. The default is FALSE. For example, to include the host operating system in the cycle, add the following line to the config.ini file, or modify its value if the option is already listed: FullScreenSwitch.cycleHost = "TRUE" Hot Keys for Switching Directly to Virtual Machines and the Host Computer
You can specify a hot key or combination of hot keys for switching directly to any available virtual machine on a host computer when running Workstation in full screen switch mode. Each time you press the specified hot key, the screen display switches to that of the specified virtual machine. You can also specify a hot key for switching directly to the host operating system. VMware, Inc. 377, Virtual Machine Hot Key You define the hot key used to switch to a virtual machine by adding a local configuration setting in the virtual machine’s .vmx file. Use the following format: