Re: [Hampshire] Converting real servers to virtualised ones

Top Page

Reply to this message
Author: Tony Whitmore
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Converting real servers to virtualised ones

On Fri, 29 Feb 2008 12:10:11 +0000, Hugo Mills <hugo@???> wrote:
> On Fri, Feb 29, 2008 at 11:21:40AM +0000, Tony Whitmore wrote:
>> At work we have a few (primarily Windows) servers which don't really do
>> very much. They are ideal fodder for virtualisation. We are currently
>> running a Xen server with Linux domUs but bootstrapped these from
> scratch.
>>
>> I know VMWare has a utility to convert physical hosts to VMWare virtual
>> machines (or just disk images?). Can one convert a physical server to a
>> disk image or partition for use with Xen? Or do other virtualisation
>> solutions support this better?*
> 
>    Well, trivially -- bring the machine down, boot into your favourite
> live CD, dd the disk over the network onto the VM host's
> storage... all done.


I had thought about that. I wasn't sure how well Windows would cope with
the change in host environment etc. Presumably the virtualised hardware is
significantly different from the random server hardware it is currently on
and this can sometimes throw Windows into a BSOD.

>    More practically, qemu-img will do format conversions, if you need
> it. I haven't tried exactly this method, but something like the
> following would be my first port of call:
> 
> $ dd if=/dev/hda | qemu-img convert -f host_device - -O qcow2 - | netcat
> ...
> 
> (Replace qcow2 with vmdk for a VMWare image, or just leave out the
> qemu-img if you want to do a direct copy, of course).


Cool, thanks.

>    If you want to shrink the overall size of the disk used by the VM,
> then you'll probably have to play games with a suitable
> resizing/partitioning tool as well. Finally, you haven't decided on
> the storage format for your VMs -- this will depend on your choice of
> VM host environment, and on how you want to manage storage.


Currently each Xen domU is a LVM logical volume because I understood
performance to be better than using disk images on a filesystem. I'd like
to consider moving to a SAN for our data and VM images in the future
though.

>    Host environments derived from the qemu device model should support
> three output modes for their guests: VNC, SDL (requires a GUI display
> on the host; close the SDL window and kill the guest), and "none" (all
> graphical output from the guest is binned). This includes (k)qemu, kvm
> and Xen. There are probably others. I would recommend running VNC for
> installation, and then moving to "none" for production use.


I used VNC for a test install of Windows on a VT host under Xen. I'm still
unsure whether to continue down the Xen route in production or consider
using Qemu with kvm etc. under Linux. I like the hypervisor model but
perhaps it doesn't really produce any significant benefits.

Thanks,

Tony