0

I have an ubuntu 13.04 server virtual machine on an ubuntu server 13.04 running libvirt 1.1.1. I want to migrate this to a hyper-v 2012 R2 server. I'm not terrible familiar with linux, and would appreciate some advice. So far, I've found https://unix.stackexchange.com/questions/8351/how-to-create-a-dupe-of-a-kvm-libvirt-virt-manager-vm which presents a way to clone the VM, which seems like a good start. Can i simply copy the VM's drive, and then create a new VM on the hyperv server with that copy? Any tips would be a great help!

2 Answers2

1

First off, download this tool:

http://www.systola.com/blog/14.01.2015/VhdTool-Is-Dead-Long-Live-VhdxTool/#.V3vdh5MrLUI

make a directory for the virtual machine on the hyper-v 2012 vhost

mkdir C:\VIRTUALMACHINE

smb mount the KVM file system

net use \\kvm-server.mydomain.com\kvm-disk-share z:

change to the mounted file system

cd \\kvm-server.mydomain.com\kvm-disk-share

copy the KVM disk to the Hyper-V server

copy VIRTUALMACHINE.disk C:\VIRTUALMACHINE

unmount the smb mounted KVM file system

net use \\kvm-server.mydomain.com\kvm-disk-share /delete

append a vhd header to the raw disk file

PS C:\disks> .\VHDToolx.exe /convert .\VIRTUALMACHINE.disk=

rename the raw disk file as a .vhd file

PS C:\disks> ren .\VIRTUALMACHINE.disk .\rhel5.vhd
El Chapo Gluzman
  • 396
  • 2
  • 16
0

Configure X server to run under Hyper-V

edit the /etc/X11/xorg.conf file

change Section "Device" Driver to "vesa"

change Section "Screen" DefaultDepth to 16

change SubSection "Display" Depth to 16

reboot to commit changes to disk

shutdown -r now
El Chapo Gluzman
  • 396
  • 2
  • 16
  • And then i can just move the drive to the VHD server and import virtual machine? – MeesterTeem Jul 05 '16 at 16:51
  • https://social.technet.microsoft.com/Forums/windowsserver/en-US/82ec8e41-7ac1-4166-97c3-d3dabc5ba29a/how-to-properly-move-a-vm-to-another-physical-server?forum=winserverhyperv – El Chapo Gluzman Jul 05 '16 at 16:56