Migrate a VMware Virtual Machine Running Windows to ProfitBricks

Table of Contents


This tutorial is designed to assist in moving a virtual machine (VM) running Windows under the VMware hypervisor into the ProfitBricks cloud.


Before you begin you will need to have signed-up for a ProfitBricks account. It will also help to be familiar with working inside the ProfitBricks Data Center Designer. You will need to have created a data center to hold the imported virtual machines. This process has been tested with Windows Server 2008 R2 Standard and Windows Server 2012 Essentials. Other versions of Windows Server should work similarly. There could be VirtIO driver issues in versions before Windows Server 2008 R2.

Locate Image

The location of your existing VMware virtual machine image can be determined from inside vSphere, VMware Player, or other VMware management tool you are using. The VMware virtual machine image file will have a file extension of .vmdk. These two particular screenshots are from VMWare Player. The Hardware tab shows the name of the .vmdk file:

vmdk Machine Settings Hardware

The Options tab shows the path to the .vmdk file under Working directory:

vmdk Machine Settings Options

Since this particular VM is from VMware Player, it is already present on our workstation. We can see the file is about 7.5G in size.

VM filesize

If you are using vSphere to manage a VM hosted at a remote location, you may choose to browse the datastore inside vSphere and pull it down to your workstation, or find some other means of transferring the .vmdk file.

One method that can work well, especially with "thin-provisioned" virtual machines in vSphere, is to use the File->Export->Export OVF Template menu option. These screenshots are for a different VM we aren't using is this particular tutorial, but it gives you an idea of what the export process inside vSphere looks like.

Export OVF Template

This results in a locally stored copy of the .vmdk file.

Exported OVF Files

Convert Image

ProfitBricks is able to accept a direct upload of your .vmdk file. Therefore converting the virtual machine image to another format should NOT be required. However, if you run into issues getting your virtual machine image to appear in the "Image Manager", you could try converting it to another format.

VMware's vCenter Converter allows conversion between some disk image formats. Information is available at vCenter Converter.

Third-party tools also exist for virtual machine disk image conversion. One example is the StarWind V2V Image Converter. It is free for use after registering with StarWind Software.

The ProfitBricks system will automatically expand the image to its full size before you can use it in the DCD. In this particular case, we have a 15GB virtual machine that was initially configured using "thin-provisioning". Therefore the .vmdk file was only about 7.5GB. Regardless of the size uploaded, the conversion process will expand it to the fully provisioned (15GB) size.

Upload Image

The virtual machine image file needs to get loaded into your ProfitBricks account. This can be done using FTPS. Information on this process is available under FTP Access.

FTP Upload

In this example, we will be uploading the image to the 'us/las' location for use in ProfitBricks data centers provisioned in the Las Vegas regional facility. You will want to upload your images to the appropriate region for the data center you have created.

Once you establish the FTPS connection, you will see two directories: hdd-images/ and iso-images/. Upload the virtual machine image file into hdd-images/.

FTP Upload Progress

Depending on the size of your virtual image file, the upload can take a significant amount of time to complete. This particular ~7.5GB .vmdk took around three hours to upload.

Shortly after the image has been uploaded, it will be available inside the Data Center Designer Image Manager. The short delay is due to ProfitBricks scanning and preparing the image for use inside the DCD.

DCD Image Manager

Provision Server

Create a server with resources similar to what your VMware VM was using before. In this example, we are moving a Windows Server 2008 R2 Standard VM that was provisioned with one processor core and 2048 MB of memory.

Provision Server

Provision Storage

Create a new storage volume and connect it to the server you just provisioned.

Provision Storage

Use the Image dropdown menu to select the image we previously uploaded. It will be located under 'Own Images'.

Provision Storage Own Image

We will get a brief notification that the storage size was adjusted to 17GB to accommodate the image.

Provision Networking

Now connect the new server to the Internet. Then we will go ahead and provision the changes.

Add Network

Issues Booting

Because our Windows VM doesn't yet contain the VirtIO drivers, booting our server will likely fail and drop us to "Windows Error Recovery".

Boot Failure

We do not want to utilize "Startup Repair" at this time. Instead we will move into configuring the VirtIO drivers.

Configure VirtIO

ProfitBricks provides a bootable ISO that contains an installer for the VirtIO drivers. We will go ahead and configure the VM to boot from a new CD-ROM and go through the install process.

VirtIO cd boot

Select windows-VirtIO-driver-1.81.iso from the ProfitBricks Images menu as shown above and make sure the Bootdevice radio button is selected to boot from the CD-ROM.

VirtIO cd boot

Choose the appropriate OS, in our case, it is Windows Server 2008 R2, so we will enter 2:

VirtIO cd choose os

The driver installation process will run and eventually complete:

VirtIO cd install complete

We now need to configure the server to boot from HDD storage instead of the CD-ROM. Do this by using the Bootdevice radio button:

VirtIO boot success

Provision the changes:

VirtIO boot success

The server reboots successfully and we can see the VirtIO drivers in the "Device Manager".

VirtIO boot success device manager

If your VM is still having issues booting, you can try changing the Bus Type to IDE on your boot image and attach an extra storage volume with the Bus Type set to VirtIO. For example:

VirtIO change to IDE

When it boots with Bus Type set to IDE, you can check to see if the VirtIO drivers are installed properly in the "Device Manager". They may appear as 'Unidentified Device". If you still have the VirtIO CD-ROM attached to the system, you can then install the missing drivers

VirtIO boot success IDE

There is some additional information available on VirtIO at ProfitBricks Help: VirtIO

There are some network settings that can be configured to optimize performance of your virtual machine in the ProfitBricks Cloud. We want to verify that the network MTU has been set to 64000 and a few other related settings.

We will go ahead and go through setting the MTU for the network interface and configuring the other network parameters to optimal settings.

We can see the current interfaces and their MTU value by running:

PS C:\> netsh int ipv4 show int

Idx     Met         MTU          State                Name
---  ----------  ----------  ------------  ---------------------------
  1          50  4294967295  connected     Loopback Pseudo-Interface 1
 13           5        1500  connected     Local Area Connection 2

We can change the MTU value to 64000 by running the following with Administrative rights:

PS C:\> netsh int ipv4 set subinterface "13" mtu=64000 store=persistent

You will need to change the value for subinterface "13" in the above command to match the correct Idx value for the interface on your system.

Now we will verify the change:

PS C:\> netsh int ipv4 show int

Idx     Met         MTU          State                Name
---  ----------  ----------  ------------  ---------------------------
  1          50  4294967295  connected     Loopback Pseudo-Interface 1
 13           5       64000  connected     Local Area Connection 2

Now we'll update the other network settings:

PS C:\> netsh int tcp set global chimney=disabled

PS C:\> netsh int tcp set global rss=disabled

PS C:\> netsh int tcp set global congestionprovider=none

PS C:\> netsh int tcp set global netdma=disabled dca=disabled

PS C:\> netsh int tcp set global ecncapability=disabled

PS C:\> netsh int tcp set global timestamps=enabled

PS C:\> netsh int tcp set global autotuninglevel=normal

Here are a couple screenshots showing the values before:

Netsh before

and after:

Netsh after

Congratulations! You have successfully imported and optimized a VMware VM to run in the ProfitBricks cloud.


If you have comments or questions, you are welcome to add them below or on the DevOps Community Site.