Wednesday, September 17, 2008

Linux - Configuration VMware

Do you often faced with a situation where urgently needed to put guest OS on a virtual machine, a hand was not such a habitual GUI interface? Or, conversely, was virtualization product, for example, VMware Player, which does not have a built configurator? Not bad, because the best configuration is the one you wrote yourself!

Why I chose exactly VMware? First, most virtualization products simply do not have such functionality, which is available at the product from VMware inc. Secondly, the product most often used in a professional environment, and to the end user it is more friendly than, for example, the same Parralels Workstations. And finally, third, "January" is able to emulate many systems, to enter your machine have enough hardware resources.

All described actions carried out by me under VMware Workstation 6, but can be used and earlier versions of the program, making the configuration file minor changes. On the Fusion can not say anything, because until now the most udosuzhilsya then, I did not put it yourself and test. In many ways it influenced nelitsepriyatnye user reviews.

When you create a new virtual machine configurator creates a certain number of files, and in which all information stored on it - the type of OS, the amount of RAM, information on CD-, DVD-drives that are connected virtual hard drives. So, the main of them:

. vmx - main configuration file;

. vmdk - file with information about the virtual hard drive;

. nvram - in this file is setting BIOS;

. vmsn - in this file the data is stored. nvram, snapshot and copy. vmx;

. vmem - swap-file (in the swap) virtual machine;

. vmss - contains RAM stopped (suspended) machines;

. vmsd - description of the parameters snapshot 'Yes.

A more detailed look. Vmx-file, incidentally trying to write his own (he has a case when there is no GUI at hand!). So, looking at the subject source file (in this case ubuntu.vmx), you can see:

config.version = "8" / / actually, version configuration file;
virtualHW.version = "6" / / version VMware (in this case 6. x);
memsize = "512" / / number of dedicated memory to the machine;
scsi0: 0.present = "TRUE"
scsi0: 0.fileName = "Ubuntu.vmdk" / / description of the parameters hard disk;
ide1: 0.present = "TRUE"
ide1: 0.fileName = "D: \ Images \ Ubuntu 8.04 \ ubuntu-8.04-desktop-i386.iso"
ide1: 0.deviceType = "cdrom-image" / / description of the parameters CD-, DVD-drive;

It was a simple configuration, which describes the basic parameters of the virtual machine, a guest OS, the number of dedicated memory, the location of the image, which was installed with the OS, etc. The interests of the user cider in the subsoil configuration file and understand that what. And in the meantime we will connect our guest OS to the network (intra-or Internet). It is all quite simple:

ethernet0.present = "TRUE" / / add to our machine network adapter;
ethernet0.startConnected = "TRUE" / / allow the launch adapter, together with start guest OS;
ethernet0.virtualdev = "e1000" / / parameter indicating chipset our card;
ethernet0.connectionType = "bridged" / / specify the mode of operation maps.

I want to dwell on the last paragraph in more detail. There are four types of options for the virtual network adapter.

* Use bridged networking. In this mode, our virtual card works through the physical network card in the system.
* Use NAT. In this version of the guest OS hidden for NAT, established on the main machine. The remote node, respectively, not inits connection, because machine does not have its own IP-address.
* Use host-only networking. It creates a virtual network with the main computer, while with the lack of access to the outside.
* Do not use network. The virtual machine does not use the network.

By selecting an option, go further. And then try to connect our machine additional hard disk (for example, from another guest OS, most importantly, that it is not used at the moment).

scsi1: 0.present = "TRUE"
scsi1: 0.fileName = "imya_diska. vmdk"

In the example linked disc will lie in your virtual machine. And if you want to connect the drive to another partition? Not bad, just add the path, and the case done.

scsi1: 0.fileName = "point the way to the disc, for example C: \ Windows \ slackware.vmdk"

Adding a new system in the HDD, understand. And what to do if all of a sudden urgent need to run a LiveCD? Yes, correct. LiveCD with standard configurator not friends. But do not trouble! Add the following lines:

ide1: 0.present = "TRUE"
ide1: 0.fileName = "livecd.iso"
ide1: 0.deviceType = "cdrom-image"

Apparently, all quite simple. Instead livecd.iso specify the name of an image from a distribution. It may be simply to fall back into the folder with the image of a virtual machine, but you can point the way to it, has already applied the method described by me.

If you happen situation where you need to move urgently to the virtual machine of any file and upload guest OS no time or desire, it is possible to mount a virtual disk to the system. In the supply of products from VMware is a very useful tool - DiskMount. It works through a command line command vmware - mount. The only condition - again, the virtual disk should not be used at this point.

vmware-mount h: "C: \ Documents and Settings \ My Virtual Machines \ win2003.vmk"

You can, of course, mount a disc each time through the command line, but if it is done too often, this is beginning to work a little annoying.

At the symposium, allow to bow out.

1) "Get Money for Clicks" - Fastest Growing Domain Parking Company in the World.
2) Search your domain name wishing to have! FREE DOMAINS -

No comments:

Post a Comment