As I did from the physical server virtual. Converting Physical Machines to Virtual Machines with VMware Converter

I had bit2000 accountants and everything suited them, well, almost everything. I was not satisfied with the fact that it would be necessary to link more warehouses to the program, but this did not work out. And we moved to 1s, and a server was purchased and it was good, but the old server was not very needed, but hardware is needed.

And I wondered how I could make a physical machine virtual. I started digging the Internet and even on Habré in search of p2v, there is nothing worthwhile that could help.

How do I make a snapshot of the system so that it starts without problems?

The Internet suggested several solutions, but I have an original windows server 2003 system, and even with a crack, not everything works, you need a crack for the server. I will say right away that Acronis will not work, Paragon's server disk manager can make a snapshot of the system, but unloads it not on local disks, but only on physical disks. Keep this in mind when you decide to use them.

The Internet prompted. Andrey Beshkov's blog had a link to the free disk2vhd utility. Small, but remote, allows you to take a snapshot of a running system and upload it to a local disk.

The description of how the original 300 gigabyte partition was divided into 3 partitions can be skipped.

The utility is very simple, select the disks on which the system you need is installed, and choose the path - you will have to register it manually. I have not tried it, but, probably, the program can transfer a snapshot of the system to network drives and folders. I also noted the "Prepare for use in Virtual PC" checkbox, although instead of Virtual PC, I have Hyper-V. Help doesn't work.

After creating a virtual disk, we create a virtual machine.

We choose the 1st generation.

We set the required amount of RAM - it will be allocated from the physical one, in my case the virtual machine spins on 1 gigabyte of RAM, if you set it more, it simply does not start - there is not enough memory, not only it alone is running on the server.
Consider this point.

We do not select the network adapter yet.

We tell the virtual machine to use the created virtual disk.

This is how my virtual machine works.

Let's move on to configuring the virtual machine.

We remove the existing network adapter - it will not work on the server, the server that has been virtualized simply will not see it.

We set the number of processor cores that we allocate for this virtual machine.

You can set the desired amount of RAM.

Boot from disk, no new system installation required.

We install new equipment - "Outdated network adapter", our windows server 2003 will see it.

We select the required virtual adapter. In my case, since another virtual machine is a proxy server and a separate network card is allocated for the Internet and my own network is inaccessible from a regular local network, I chose a virtual adapter created for the second network card using our local network.

Everything is ready, you can start.

After launch, most likely you will have several surprises - the mouse may not work. You will have to configure the network card using the keyboard. After configuring the network card, we managed to connect using Radmin directly to our new virtual machine.

By the way, when I tried to increase the screen resolution from 800x600, the system issued a blue screen of death, most likely, this is due to the small amount of RAM, which I allocated for the virtual machine.

Everything is very easy to do.

P.s. I almost forgot - it will be necessary to activate the system again, the system was activated normally.
p.p.s. The links could not be inserted correctly.

Once upon a time there was a server in a distant country. In terms of technical characteristics, it was not bad for its time - Intel Core Quad Q6600 2.4GHz 8GB RAM Intel DQ965GF motherboard, 3ware7xxx / 8xxx raid controller and 2 SATA 300GB disks in raid 1 array.

And then one day I decided on this server one of the disks in the raid to die - and once decided, then he died. It was natural to assume where one disk died, and the second may die there too - it is necessary to change it. And expanding the disk space will not hurt, we thought.
Somehow with a sin in half bought new 2TB disks - the crisis and in distant bourgeois countries was with hard disks. The server was critical, but it was possible to turn it off and torture it for a while - there were backups.

We also decided to update the software ...

The server had CentOS 4.5 x64, old tortured, vmware server 2 was installed and under the server there were already three virtual machines with windows 2003 server with ms sql and some programs, freebsd and suse. Over the years, of the important, only windows were needed, and in the future it was planned to add a few more virtual machines there, which means the platform needs to be changed.
We stopped at vSphere hypervisor - but for a simple ESXi. Having studied the Internet - I did not find experience in installing ESXi on such a specific hardware - the Intel 82556DM network card and raid controller might not work - a search in the official compatibility list did not give a positive result. Installing an additional network card would be inconvenient and would take time. Well, you could do without raid.

In general, we decided to try it. I am writing a letter to technical support to install new hard drives and install esxi 5.0. After a while, they answered that they had installed esxi 4.1u1, that the raid could not be seen, but the built-in ICH controller works and both hard drives are visible. They gave us a password so that we could go and see this happiness.

We went and looked. It seems to work. Now the second task is to migrate the windows server 2003 virtual machine from the vmware server to the vmware vsphere hypervisor environment. Came up with several options -
first upload a disk image or a ready-made virtual machine with centos / linux and connect old disks as Raw devices mapping, install a converter and convert to esxi.
second- try to mount the ext3 partition to esxi corny - but unfortunately this seems to be impossible.
third- copy via SCP / FTP / HTTP somewhere else, convert there and then copy back via SCP or via vclient.
fourth- put inside the old centos vmware converter and convert on the spot.
fifth- raise another virtual machine with windows and put the converter there.

While we were thinking - technical support inserted the disks into a USB-SATA adapter and connected them to the server - the naked ESXi, of course, could not figure out what could be done with this option. Then they wrote that they doubted that the raid array could be seen except from its native operating system.

We tried to install the converter in Centos - they did it, but for some reason it was not possible to connect to it remotely - perhaps because of the non-standard ports specified during the installation of the converter, since the standard ones were busy. Well, on reflection, it seemed that the entire virtual machine first downloaded through the client to my local machine, and then back - 30 gig of traffic and God forbid the Internet to fall off - in general, an unreliable option.
Plus, the converter does not convert the machine to a file just like that - it necessarily requires a connection either to the host or to the vCenter.

We did not try to mount ext3 partitions to esxi - in the options of the mount command we did not see the ext3 file system type - maybe they looked badly.

In general, we did this - I packed the virtual machine files and downloaded them to my computer. I installed a vmware converter and converted it to a local esxi host. For reliability and compatibility, I connected via ssh to the local esxi and zipped the turned off virtual machine using tar - the directories of the virtual machines are located in / vmfs / volumes / datastore /. The z parameter compresses the archive.
The resulting file is 7GB out of 17GB.

I wrote to technical support to install new hard drives and run esxi. Then I connected to the remote esxi with WinSCP and started uploading the archive. The speed just killed - 30kB / sec, about 3 days of copying. As it turned out later, resuming is not supported, tar in esxi does not know how to work with seemingly broken archives. Just in case, I decided to try to upload the archive to the storage using the standard vclient - the speed turned out to be about 10 times higher and the archive was downloaded in 7 hours.

Then I went to the remote esxi via ssh and unpacked the virtual machine with tar, added it to Inventory and started it. Updated vmware tools, network card and restored network settings.

To improve reliability, I created a virtual machine with windows 2003 server (so that the vmware memory compression technology worked and wasted less resources). I added one more network card with "gray" IP addresses to both machines, created another vSwitch, added VMKernel to it, ticked the Management traffic checkbox and assigned an IP address from the same "gray" range. I installed and configured veeam backup. To reduce paid traffic over the Internet and for security, veeam connects to esxi via a "gray" ip address and makes copies of virtual machines from one hard drive of the storage to the second - so that in case of failure, you can quickly restore operability.

If it were not for the slow speed of copying over the Internet, then the downtime would be 30 minutes maximum.

Most likely, we missed some migration options - can someone give some smart thoughts, since there are still a couple of approximately the same migration tasks ahead.

Converting or Migrating Physical Servers to VMware ESXi via VMware Converter Standalone

There are several options for converting or migrating physical servers and workstations to a virtual environment. Earlier, we looked at a simple and convenient way using a utility to transfer a running system without having to stop it on Microsoft Hyper-V. Now we will perform the same operation, but the final virtualization tool will be VMware ESXi 5.5 up2. For this we need a specialized utility VMware Converter Standalone 5.5 which is available for download from the official site.

In this case, the conversion utility is installed on a PC running MS Windows 7. Migration is performed from a physical server running MS Windows Server 2008 32bit to a VMware ESXi virtualization host. What you should pay attention to:

  • to reduce conversion time costs
  • you need to know the login and password of the local administrator account
  • to install the conversion agent, you must remove the firewall restrictions (or temporarily disable it)
  • sometimes it is required to install before starting the conversion (for the correct completion of the system image transfer)

Below is an instruction with pictures for setting up the transfer of physical servers. For clarity and brevity of the description, the necessary actions are highlighted in red:

Pay attention to the number of available conversion options. Various virtual disk images, Acronis disk images (.tib), as well as running OS.

We indicate the source of conversion. In our case, the physical server is being migrated. To do this, make the appropriate settings - IP address. login and password.

The conversion agent is installed automatically, we just have to choose in which mode (automatic or manual) the software will be uninstalled.

Destination Server - VMware ESXi

Similarly, our server or ESXi cluster indicates the source of destination - the IP address, data of the root user.

Configuring the future virtual machine

Here we set the parameters for converting - the disk of the migrating system, as well as the parameters of the created VM (CPU, RAM, LAN). Here you can also specify the parameters of the guest OS (name, domain membership, etc.), as well as its final reconfiguration (optimization for the hypervisor) and the installation of VMware Tools.

Next, the process of converting VM will start. In 90% of cases, it is successful, it is recommended to stop actively used services and databases while converting (by specifying subsequent synchronization in the transfer settings).

After that, you can start the cloned virtual system and make the necessary adjustments to the "new" OS.

At work, I had a case when it became necessary to transfer a person who had worked under Windows XP for a long time to Linux. Windows XP was on the machine for a surprisingly long time without reinstalling, it was configured and crammed with various programs, and the person did not want to part with it completely, he sometimes had to work on two systems at the same time. Naturally, the only normal way out here is virtualization. Installing Windows and all the necessary programs from scratch in a virtual machine, as well as setting it up would result in a very long and unpleasant procedure. But it turned out that there is a much simpler way out - you can virtualize an already installed system. To do this, I used the VMware Converter program. I will describe how this can be done.

First, download VMware Converter for Windows from here and install it on a physical machine that needs to be converted to a virtual one. In order to download the program, you will have to go through a simple registration on the site. During installation, select the type of installation " Local installation".

Launch VMware Converter, select the item in the main menu File -> New -> Convert Machine and proceed to setting up the conversion.

In the first step (Specify Source), you must specify the source machine. In the window that appears, make the following settings:

  • Select source type: Powered-on machine(Machine included)
  • Specify the powered-on machine: This local machine(This local machine)
Click Next and at the second step (Specify Destination) specify which virtual machine you want to get at the output:
  • Select destination type: VMware Workstation or other VMware virtual machine
  • Select VMware product: VMware Player 2.5.x
  • Name: any name
  • Choose a location for the virtual machine: any directory where the machine will be saved

At the next step (View / Edit Options), it is proposed to specify the parameters of the created virtual machine. Here you can leave everything unchanged, because then you will be able to edit everything you need in VMware Player.


At the last step, you are invited to familiarize yourself with the settings that you have chosen and click the button Finish to start the conversion process.


Conversion will most likely take quite a long time, it all depends on the fullness of the hard drives.


After the conversion process is complete, a folder with the same name that you gave to the virtual machine will appear in the directory that was specified during the preparation of the conversion. This folder will contain all the files of the created virtual machine, which can now be run on any operating system in which the VMware Player program is installed.

So, now you need to copy the folder with the resulting virtual machine to some hard disk (which you will not yet format and use to install Linux) and start installing Linux. Then, in Linux, you need to copy your virtual machine to some directory, install VMware Player (you can read how to do this) and then open your machine in VMware Player using the menu item File -> Open a Virtual Machine.

Notes:

  • After starting the virtual machine, I highly recommend downloading and installing the add-ons for the WMware Tools guest system, which will significantly increase the performance of your virtual machine. This can be done by starting the virtual machine and selecting vmplayer in the main menu "and the item VM -> Install WMware Tools.
  • The resulting virtual machine for VMware Player version 2.5 obtained during the conversion also runs without problems in version 3.
  • In addition to converting a local physical machine to a virtual one, there are other options, for example, the source can be a remote machine or an Acronis image.

The paid version of VMWare has tools for hot transfer of running servers from one VMWare host to another without interruption. We are currently using the free version of VMWare ESXi. Those. there is no organized farm, but stand-alone servers running VMWare ESXi. We needed to transfer virtual servers to another hardware in order to free the current physical server (host) for repair (there was an unclear problem with the HDD recycle bin). We already have a low-loaded server under VMWare ESXi in operation and we will temporarily raise another one nearby. So, step by step.

1. Hardware for the "new" VMWare ESXi server. Fortunately, there was a pretty decent new server at hand, which did not yet have time to go into production. Configuration: HP ML350 G6, 3 x 300 GB HDD, 8 GB RAM. The process has already been described earlier, there is no point in repeating it.

2. Toolkit. Despite the fact that virtual machines are a collection of files that can be copied from one server to another, I abandoned this idea for two reasons:
- Versions of the original virtual system and the new one did not match. The migration took place from VMWars ESXi 4 to ESXi 5. In the fifth version, both the file system format and the format of the virtual machines themselves have changed.
- VMWare has released an excellent and free converter "VMware vCenter Converter", which allows you to solve this problem, so to speak, using standard tools. Download the converter from the manufacturer's website, having previously entered the website under your own name (remember, registration is free). Installing VMware vCenter Converter is pretty trivial.

3. Transfer of virtual machines from one physical host to another occurs simultaneously with the conversion. VMware vCenter Converter can work with different sources, including recovering virtual machines from images of “foreign” formats. In our case, there were 2 main transfer options:
- transfer of the included server, regardless of whether it is a physical machine or a virtual one;
- transfer of a virtual machine, as part of the VMWare infrastructure.

We had the opportunity to temporarily (outside of working hours) turn off all servers to be transferred, so we chose the second option so as not to waste time on synchronization and to simplify the process.

In the interface "VMware vCenter Converter" click the button Convert machine, choose source type: "VMware Infrastructure virtual machine". Enter the source server address and connection credentials. Select the server for transfer from the list. If this server is enabled, then the button Next will be unavailable because in this mode, you can convert only powered off virtual machines. Now choose destination type: "VMware Infrastructure virtual machine", enter the address and credentials to connect to the "new" VMWare ESXi host. Set the name of the virtual machine as it will be displayed in the "vSphere Client" console, Next... On the next screen of the wizard, select the storage on the destination host (if there is more than one), and the version of the virtual machine. For VMWare ESXi 4 is Version 4 or Version 7... If there is no good reason to stick to the old version, then choose the last one, Next... And here CAREFULLY!

On the screen Options DO NOT need to immediately, without looking, press the button Next... Even if the original virtual machine was thin ( thin) hard disk, the file size of which on the physical disk increases as needed, the converter will set the disk type thick... For this, click on the section Data to copy and select the required type from the drop-down list. The disk size cannot be changed here. Another important configuration section to pay attention to here is Advanced options... If you want the transferred virtual machine to automatically start after conversion, then put the top checkbox "Power on destination machine". Also here you can set an automatic installation VMware Tools... The switch "Customize guest preferences for the virtual machine" deserves special attention here. If it is installed, then a NEW SID will be automatically generated for the new virtual machine. It is important to set this switch when cloning when it is planned to leave both the original and the converted virtual machines in operation. When you install it, an additional stage appears in the conversion wizard Customizations that prompts you to set a new DNS name for the machine and configure other settings, including network settings. In the VMWare ESXi 4 version, it was useless to set the domain membership parameters here, after conversion it was necessary to re-enter the domain into the domain. But in our case, we needed exactly postpone machine from one host to another "as is". Therefore, we leave the "Customize guest preferences for the virtual machine" switch unchecked. Next, Finish... The converter adds a new task to its list and shows its progress. In my experience, the remaining time shown by VMware vCenter Converter is not reliable even when the progress bar is already in the middle.

While the conversion is taking place, one more important thing to do is to disable the automatic start of the portable virtual machine on the original virtualization host so that it does not start up accidentally later, for example, after a power outage. Go to the root of the source system, the Configuration tab, in the section Software click on item Virtual Machine Startup / Shutdown, in the upper right corner there is a link Properties ..., in the window that appears using the button Move down we transfer the converted virtual machine from the section Automatic startup to section Manual Startup.

4. Setting up the converted virtual machine. Moving between different platforms and even between different versions of the same virtualization platform can change the virtual hardware on which the virtual machine is installed. In this case, when migrating from VMWare ESXi 4 to VMWare ESXi 5, the network adapters have changed. In the fourth version, these were Intel adapters, and in the fifth version - AMD. As a result, despite the fact that we left the "Customize guest preferences for the virtual machine" switch unchecked and did not reconfigure the system, the static IP address of the virtual machine was not saved. The IP address belongs to the adapter and it has changed. Moreover, if we now try to enter the old address for the new adapter, we will receive a warning that such an address is already in use on another adapter and an address conflict may occur. In fact, this warning can be ignored, but for the sake of order, you can delete the settings of a nonexistent adapter. For this alone, we need to display hidden devices that are not visible in the hardware manager by default.

Show hidden devices... At the command prompt, enter the command

Set devmgr_show_nonpresent_devices = 1

Start DEVMGMT.MSC

In the window that opens in the menu View select item Show hidden devices.

Expand the Network Adapters tree. Unavailable adapters will be shaded. Delete them. After that, you can safely configure the settings for the new network adapters.

After migrating to another version of VMWare ESXi as a result of changing virtual hardware, you may need to reactivate Windows 2008 and Windows 7. To activate on a local network, it is useful to have. If it is not online, then it's time to think about it, because KMS does not count the number of activations, and the MAK counter decreases with each activation.