Migrate a Windows 2008 VM from VMware to OpenStack

http://www.stackops.com/2012/08/14/migrate-a-windows-2008-vm-from-vmware-to-openstack/

 

Posted on Tuesday, August 14th, 2012 at 12:17 pm.

You thought that importing a Windows Virtual Machine from VMware to KVM managed by OpenStack was a difficult task ?

Since Glance has been able to use VMDK disk format, you can easily migrate your infrastructure from VMware to OpenStack without problem. But you should know some tricks before.

Remove VMware tools

Remove the VMware tools via the Windows control panel and reboot the VM.

Enable IDE

Download and execute the mergeide.reg script. You can now boot from IDE that may be necessary for KVM.

Install VirtIO Drivers

  • Download the ISO file here.
  • Mount it on the Windows Virtual Machine.
  • Click on Start Menu, click right on Compute and Manage.
  • Select Diagnostics and Device Manager.
  • Click right on the Hostname and select Add legacy hardware :

  • Click on Next, select Search for and install the hardware automatically, Next, select “Show all devices” and Next.
  • Have disk allows you to find the drivers we have previously downloaded. If you are using Windows 2008, the drivers are located in WIN7 folder.
  • We should install at least NETKVM and VIOSTOR drivers :

  • Before shutting down the VM, be sure to have RDP enabled and also the firewall disabled.

How to merge multiple VMDK files into a single image file

It’s very common to find VMware images in multiple VMDK files (if this is not your case, you can go to next step), so before uploading the image you need to convert it to a single VMDK file.

First thing you need to do is to install VMware Server and use the vmware-vdiskmanager utility under /bin directory. Open a terminal, go the directory where the multiple paths are open and execute this command:

./vmware-vdiskmanager -r multiple_disks.vmdk -t 0 single_file.vmdk

Et voilà !  Your VMDK files are now in a single disk.

Import into Glance

Copy the VMDK to the Glance Server and import it with Glance Client :

glance add name="Win2K8" container_format=bare disk_format=vmdk < win2K8.vmdk

That’s all !

You can now run your Windows instance from Nova CLI or from the Dashboard.

At the first boot, Glance will convert the image to RAW format so don’t worry if it takes 5 minutes at the first time.

The best way to access at your VM is to use RDP. You should allow 3389 (TCP) port into VM Security Group.

Extra : Sysprep the Server

Here is the way to Sysprep the Windows 2008 Virtual Machine :

  • Run a terminal and launch “c:\Windows\System32\sysprep\sysprep.exe
  • A graphical tool will appear, we need to specify “Enter System Out-of-Box Experience (OOBE)” in the System Cleanup Action Setting, check “Generalize“, and select “Shutdown” option.
  • Click “OK” to start the configuration and the server will shut down itself.

By the way, did you know that StackOps Distro is ready to launch Windows 2008 Virtual Machines ?

Tags: , , ,

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值