Installing Debian, XP and… Windows Vista in Vmware

[ Tuesday, 25 September 2007, paulina ]


In the first part of this article (see first part of the article Vmware Server Console – Introduction to Virtualization) learned how to set up Vmware for a LiveCD system. Now I’m going to show you how to install Debian, Windows XP and… Windows Vista under Vmware.

Author: Paulina Budzoń

A Bit Tougher – Linux Installation

Having the Live system launched (see first part of the article Vmware Server Console – Introduction to Virtualization), one might be tempted to install a typical Linux distro like Debian, for that matter. So this time we will use Debian’s “Network Install” version (Netinst) and its ISO image.

We begin as usual, in the same way we went through Live installation, but this time we define the type of the system as “Other Linux 2.6.x kernel”. We will also choose the “Use physical disk” option instead of virtual disk. Why?

A Bit Diskier – namely “why?”

The disk selection window offers three possibilities: we can create a new virtual disk (like in Live example), we can use an existing disk, or we can make use of a physical device (e.g. disk).

The first from the three options (selected in previous example) makes a .vmdk main file and several additional files. It is mounted by VMware as a real disk. Creating it, we are offered empty partitions without any file system. Thus we are able to manage the disk as if it were a normal hard disk. We can decide its type (Virtual Disk Type) – either IDE or SCSI, and set its size (Disk Size). There are two additional options – “Allocate all disk space now” and “Split disk into 2GB files”.

The first one will cause VMware to create a .vmdk file on our real disk with the same size as the defined virtual disk. Such processing is very helpful, securing the disk space and guarding it against overlapping by other files. However, the process may slow down creation of the virtual machine depending on the declared disk size. When we leave the option unmarked, VMware will create a .vmdk file having an initial size of several kilobytes. Its size will be augmented up to the defined size according to the data being saved by the virtual system.

The second option (“Split disk into 2GB files”) should be selected when the virtual machine files are to be saved to a FAT disk. VMware will split the disk image into 2 GB files (maximum file size for FAT file system). Apart from the options, we will be asked by VMware where to save the .vmdk file. Leaving it to the default option (VMware show file name without a path) we’ll make the file to be saved in the same folder as other files of the given virtual machine.

A small digression about .vmdk files: all the files I have created never achieved the same physical sizes as declared for the virtual systems – they were smaller. Besides, the .vmdk files can be mounted as typical partitions – Internet is replete with programs committed to do the tasks.

Returning to VMware – we should select the “Use an existing virtual disk” option if there was a virtual disk but — for instance — without configuration files defining another virtual machine. Here, it suffices to point the .vmdk file on our disk and it’ll be incorporated by the new virtual machine.

The third option – “Use a physical disk” – needs a physical hard disk or its partition. Contrary to what it suggests, this option will not lead to creation of a new typical partition as we know it, and it will not save data in a traditional way. VMware will create a unique partition practically read only by itself.

Coming back to Debian – why do I want to make a virtual machine on a physical disk? Because the .vmdk file was already described in earlier parts of the text and treating it as a general rule we should move ahead rather than marking time doing the same thing over and over again. Beyond that, all virtual machines can be run on all systems with VMware installed. We can create such a virtual machine at home, then copy it to a CD or a pendrive, and carry it to a friend. Then run it there after installing VMware. We should stumble upon no problems, as VMware doesn’t use underlying hardware – it make use of its own, platform independent, virtual hardware. And if you create a virtual disk on a physical device it will be easier to relocate such a machine by pulling out the device (or media it uses). In other words, it’ll be easier as nothing has to be copied.

Well then… installing Debian at last

No problem at all. After opening a new machine (see previous text in this part) I will set the Debian install disk in its virtual drive – (for those with bad memory) “Edit virtual machine settings”- “CD ROM”-”Use an ISO image”-”Browse”. Starting from here, everybody should manage the installation.

And now we’ll simply have to crank up the virtual machine (“Power on this virtual machine”) and install the Debian distribution.


Picture 1. Debian Installation

To me, Debian installation isn’t tough. Only partition creation might have come up as a problem. But in such a case anyone can run his favorite partition application (from CD or floppy) before installation – and, of course, through the VMware environment.


Picture 2. GRUB starting Debian

Now, we can fall into self-complacency mood after finishing the installation and set in motion our new virtual machine. Practically, both the virtual disk on a physical disk installation and a .vmdk file installation proceed the same way. The only snag I came across with the physical disk was a lack of direct access to the disk from user level. Of course I do not recommend to activate VMware as root (just in case…). So, if we were faced with a message about “disk access forbidden” trying to get access to our virtual machine, we might issue a command (as root, of course) “chown user /dev/hdx”. Or simply set the mounting options properly… it’d help as well.


Picture 3. Debian with GNOME

The Promised Windows XP

Just as I said in the first part of the article, I will describe Windows XP installation. It does not differ from Linux installation, so no one should have any problems with it. However, just in case, I will describe step by step the creation of a Windows virtual machine. We’ll leave the installation process alone; everyone knows how to do it, I think. We will install Windows XP Pro (32 bits) on a 12 GB virtual disk in our example. We will use default VMware folder to save the machine and no one will be given access to it except us (private option). Then we enable Internet connection through bridge option.


Picture 4. Windows XP run under VMware

Let’s start then. We need to select Create a new virtual machine – Next – Custom – Next – 1. Microsoft Windows – Version: Windows XP Professional – Next – Next – Next – Next – 224 – Next – Use bridged networking – Next – Next – Create a new virtual disk – Next – IDE – Next – Disk Size (GB): 12 – “Allocate…” and “Split…” options left unmarked – Next – Finish.

We have our machine. Now we need to mount the Windows installation CD’s ISO image:

Edit virtual machine settings – CD-ROM – the “Connect at power on” option marked – Use ISO image: – Browse – select ISO from disk – Open – OK.

All that’s left to do is to start our virtual machine now – “Power on this virtual machine” and move to installation process. We can start the new system now.

VMware Tools, or what d’ya want the drivers for?!

It can be noticed that sometimes, after starting the virtual system, the mouse cursor is running erratically or Windows didn’t find a few drivers, or a sound can’t be heard, etc. That’s why VMware Tools was written. To put it simply, VMware Tools is a group of drivers for virtual hardware. I recommend it to be installed together with Windows systems. It can be installed as a typical program and can be run during system booting. From now on, the mouse cursor won’t be blocked in the virtualized system and we will not need to use the default Ctrl+Alt buttons – when the cursor is placed within the virtualized system’s window it is controlled by the system, but when moved away from the window it is managed by a host system. It makes life easy.

The matter with Linux systems is a bit worse, at least from my perspective. They do not exhibit any problems in terms of drivers but the “trick” with a mouse cursor does not always work well. On the other hand, VMware Tools most often speeds up the system.

To install the VMware Tools we have to start a virtualized system and select the “Install VMware Tools” option from VMware’s VM menu. A warning message will be shown which will tell us that the installation can be performed only if the virtualized system runs. Of course, we click the Install option.

Then a mounted CD will be displayed in the virtualized Windows window. The system ought to start Windows installer automatically. Apart from this the system will probably find new devices. Typical Windows installations rely merely on clicking the Next button (as usual in the systems). We have three installation options. If one wants to fathom the opportunity and play with directory access on the host system, he should choose the “Custom” option. The other ones – in accordance with descriptions. I prefer the “Complete” option to have it all under my supervision. All that’s left to do is an installation via Install option and restarting the system. The system tray will gain the new VMware Tools icon. It will facilitate access to an extensive scope of functions whose names are so self descriptive I feel relieved from documenting them in detail here.

VMware Tools installation in virtualized Linux is only marginally more difficult than in Windows systems and depends on Linux distribution. We can make use of a .rpm package or a tar.gz archive – both are present on “a disk” which VMware mounts. Installation from .rpm archive is so simple that we shouldn’t expect any problems from it. It should be remembered though to issue the vmware-config-tools.pl configuration command after installation. Please keep in mind also to install/configure VMware Tools in terminal mode — that means with X Window System switched off. If you don’t do this, the CD will be mounted in a graphical environment, and we will have a good chance of finding a few files on the CD with weird names which are altogether unmanageable.

I’ll focus on archive installation now because it can be performed under every Linux system. My description will be based on the Debian distro which I installed earlier and which I have started in secure mode with a console screen.

1) Start the system and choose from VM menu the “Install VMware Tools” option. Then conform to the installation and the system’s running.

2) Start a Debian console and login as root, then mount a CD with VMware Tools.

Commands:


  $ su

  # mount /dev/cdrom /media/cdrom

3) The CD contains two files: .tar.gz and .rpm. Create a vmware-t directory in home directory and copy the .tar.gz file to it, then untar the file.

Commands:


  # ls

  VMwareTools-1.0.3-44356.i386.rpm VMwareTools-1.0.3-44356.tar.gz

  # mkdir /home/paulina/vmware-t

  # cp VMwareTools-1.0.3-44356.tar.gz /home/paulina/vmware-t

  # cd /home/paulina/vmware-t 

  # tar zxpf VmwareTools-1.0.3-44356.tar.gz 

4) Having the file untarred, go to the newly created directory of vmware-tools-distrib,

  # cd vmware-tools-distrib

  # ls

  bin doc etc FILES INSTALL installer lib vmware-install.pl

5) Then run the vmware-install.pl script.

  # ./vmware-install.pl

6) The installer is fairly clear, so it shouldn’t be a nuisance. In order to agree to default settings it suffices to press Enter. The script will ask us for a few configuration directories. It’ll also try to compile file separation and Internet connection (if There are no appropriate programs and libraries – gcc, binutils, kernel sources – a user will have to answer “no” for the files to deactivate the functions). The following conditions must be fulfilled yet – screen resolution (I selected 7th option) and rebooting of the system. According to information provided by VMware Tools, to run an additional config tool (after VMware Tools installation) one has to issue the /usr/bin/vmware-toolbox command.

7) After rebooting the system (virtual system, of course!) it’s time to run the aforementioned command: /usr/bin/vmware-toolbox or vmware-toolbox &. The best solution is to append it to autostart to gain certainty that it will be always started.

And even then we cannot have certitude that the virtualized Linux will work better than before, when VMware Tools was not installed yet. It depends mainly on Linux distro. VMware Tools is sometimes able to facilitate the work of the virtualized system, but many times it is a hindrance. I suggest to test the virtualized systems before and after VMware Tools installation.

To deinstall VMware Tools in Linux it suffices to deinstall the .rpm package, or to run the vmware-uninstall-tools.pl script if we have made use of the tar.gz archive. The script can be found in the vmware-tools-distrib/bin directory.

The Complex Case of Hardware

We are able to install additional hardware apart from the devices added by default. We can add another hard disk, CD-ROM drives, floppy disk drives, network cards, USB devices, SCSI drives, etc. All the device settings are conveniently placed in the virtual machine config window (“Edit Virtual Machine Settings”). It suffices to select the “Add” option and the device we want to incorporate.

For example, after adding a USB card and starting the virtual machine, the “Removable devices” option in VM menu will show a list of all USB devices attached to the host computer. If we want a virtual machine to have access to one of the devices we must click the device. All the active USB devices are marked in this menu.

Keyboard mapping problems

Mandriva Linux users who make use of Metisse will experience problems with keyboard mappings – all keys will be mapped at random. There are no difficulties with Beryl and Compiz, but Metisse always breaks.

So, if our keyboard works in the virtualized system incorrectly (this fault is not bound to Metisse only), the best solution is to turn off keyboard mapping for special keys. VMware must be stopped, then a config file must be created in the .vmware hidden directory (which in turn lies in home directory) with the following entry:

  xkeymap.nokeycodeMap = true. 

The changes will be applied after VMware restarts. Both the numerical keyboard on the right side and Polish characters will not be working in virtualized Windows, contrary to virtualized Linux which should run smoothly (perhaps with a few exceptions).

If we do not use Metisse and the “true” option changes nothing, we can try to change the option to “false” (xkeymap.nokeycodeMap = false). If this doesn’t work either, we should check Google for help.

Vista


Picture 5. Vista welcome screen

Just as I said in the first part of the article, I want to prove that not only VirtualBox is able to “virtualize” Windows Vista (contrary to popular belief). It suffices to mark Windows Vista in system selection window during virtual machine creation and then follow up the procedure for Windows XP. According to documentation, VMware manages the system on an experimental basis. Nonetheless, I was able to run it without major problems, on the condition that we do not consider consumption of computer resources close to 90% an issue. I also managed to install VMware Tools which has run quite well.


Picture 6. Vista Desktop with widgets

I hope you have enjoyed this little series and learned a few new things about virtualization. Please comment below if you have any issues with the actions described in the article. We are here to help you! :)

This text is based on the article published in Dragonia Magazine, a Polish online magazine about Free and Open-Source Software. You can download the latest Dragonia issue (first one in English from our mirror). The article has been slightly modified compared with the original version by the PolishLinux team.

Proof-read by Jake Conroy


Warning: include_once(/sites/polishlinux.org/wp-content/themes/jakilinuxorg/google_article_inside.php): failed to open stream: No such file or directory in /sites/polishlinux.org/wp-content/themes/jakilinuxorg/single.php on line 48

Warning: include_once(): Failed opening '/sites/polishlinux.org/wp-content/themes/jakilinuxorg/google_article_inside.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /sites/polishlinux.org/wp-content/themes/jakilinuxorg/single.php on line 48

Subscribe to RSS feed for this article!

4 Comments

fold this thread saisai  Thursday, 17 January 2008 o godz. 6:42 am #  Add karma Subtract karma  +0

i installed vmware in windows vista and it greaty affects the performance of my pc…
i tried to uninstall the vmware but it doesnt work…
it cant b unstalled… since i cant unstall the vmware, i blocked it instead…. just to get rid of it… but it gave me onother problem… the blocked program interrupts/stops my downloads…. i cant even update my softwares…

(Comments wont nest below this level)
 
fold this thread Jamie  Tuesday, 17 March 2009 o godz. 2:07 pm #  Add karma Subtract karma  +0

I was wondering, is there any reason or benefit to running vmware tools on a debian box IF you never run the GUI? It is a server, so don’t have a GUI installed, always on the command prompt.
Thanks for the article – good job!
Jamie

(Comments wont nest below this level)
 
fold this thread James Garcia  Sunday, 9 May 2010 o godz. 7:40 pm #  Add karma Subtract karma  +0

Windows Vista is good but it can hog your CPU and Memory.:-’

(Comments wont nest below this level)
 
fold this thread Disco Lights   Thursday, 14 October 2010 o godz. 9:25 am #  Add karma Subtract karma  +0

Windows Vista actually sucks, it is full of bugs and very unstable-..

(Comments wont nest below this level)
 
Name (required)
E-mail (required - never shown publicly)
URI

Adjust field size: shrink | enlarge)


You can use simple HTML in your comments. Some examples are as follows:
  • A hyperlink: <a href="polishlinux.org">GNU/Linux for everyone!</a>,
  • Strong text: <strong>Strong text</strong>,
  • Italic text: <em>italic text</em>,
  • Strike: <strike>strike</strike>,
  • Code: <code>printf("hello world");</code>,
  • Block quote: <blockquote>Block quote</blockquote>

About the Author

Paulina Budzoń

Former Mandriva's translator, Dragonia Magazine's editor and great OpenSource fan. Lives in Warsaw, Poland.

New AdTaily ads!

Are you a film buff?

film buffs community, movie recommendations and reviews

RSS: Comments

You can follow the comments to this article through a special channel RSS 2.0 .

Related articles: Apps

 more »

Related articles: HOWTOs

 more »

PolishLinux Top Content


Become our fan on Facebook!

PolishLinux.org on Facebook

Follow PolishLinux on Twitter!

Follow polishlinux on Twitter

Google Ads