S
S
Sergey Torop2016-08-18 18:45:01
linux
Sergey Torop, 2016-08-18 18:45:01

Why won't KVM guest boot from a disk image of a physical machine?

Hello everyone,
there is a task to migrate from a physical machine to a virtual one. I 'm probably wrong, but it
seems like you can make an image "dd if=/ source_disk of=virthost.img " and try to boot from it.
Original Centos 6 machine with one /dev/sda, bootloader in MBR, and virtualization done on another,
KVM/libvirt with typical config:

<devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/lib/libvirt/images/virthost.img'/>
      <target dev='hda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>

When starting the machine, the message appears on the screen: Boot failed: could not read the boot disk. No bootable device
Do not tell me, is this method completely utopian, or can it be launched (having just a disk image of a physical machine),
having achieved boot (the idea comes to mind to boot into livecd, see what the system sees about this device)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2016-08-19
@opium

It's an idiotic way to read at least one manual on migrating to kvm from a physical host, you didn't make any edits for this at all.
The easiest way is to install a bare centos and syncnet files with rights from the old cents to the new one, except for the system boot folders of the sys devs and all sorts of tabs and network interfaces, and voila you have a copy of the centos

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question