On Tue, Sep 23, 2014 at 06:54:48PM +0000, Boylan, Ross wrote:
> I have a couple of SATA disks (software RAID on some partitions) with a 
> system that has become unreliable on them.  I plan to add more disks and 
> install a new system on them (Debian wheezy).  I will still need to run 
> things on the old OS (simultaneously running the new OS) to migrate.
> 
> Is there a way I can use the 2 old physical disks in a VM?  How?
> 
> Searching suggests that I can't simply say -hda /dev/sdc.  There are some 
> references to using virtio, but it isn't clear to me if this would enable me 
> to use the physical disk as is.

In some cases you can simply point QEMU at /dev/sdc and it will boot
without a hitch.

However, it depends on the guest operating system.  Windows is fussy
about hardware changes and may refuse to boot.  Modern Linux distros
tend to be okay.

Booting from a pre-existing physical disk works best when the hardware
changes that the guest sees are minimal.  Even in a Linux guest there
could be a problem if /etc/fstab uses device names like /dev/sda instead
of disk labels because the device name could change if the hardware
changes (e.g. virtio disks are named /dev/vda).

If you are familiar with moving disks between physical machines or
rescuing broken systems that don't boot, then booting a pre-existing
physical disk inside KVM should feel familiar.

You may also want to look at p2v migration tools:
http://libguestfs.org/virt-v2v/

Good luck!

Stefan

Attachment: pgp5aF0DbrZSj.pgp
Description: PGP signature

Reply via email to