CentOS 7 And Qemu-kvm

Home » CentOS » CentOS 7 And Qemu-kvm
CentOS 3 Comments

Still trying to migrate to CentOS 7.

I used to use qemu-kvm on CentOS 6. tried to compile on CentOS 7 and get error about undefined reference to timer_gettime searching for that says basically use virt-manager

so I installed virt-manager – I have file images and those work. some times I do directly to a USB connected disk.

I do not see how to do that in virt-manager ???

How do I use a device like /dev/sdh as my disk???

Thanks,

Jerry

3 thoughts on - CentOS 7 And Qemu-kvm

  • Click on “Add Hardware”, select “Storage”, then “Select managed or other existing storage” and type “/dev/sdh” into the box. You can choose “IDE disk” or “Virtio Disk” as the device type, and the device will be available as “/dev/sd?” or “/dev/vd?” accordingly.

  • Alternatively you might be able to do this using hotswap code. eg I have a USB based ‘scope that I want to pass through to a windows instance. To do this I have a udev rule:

    % cat /etc/udev/rules.d/90-owon.rules
    ACTION==”add”, \
    SUBSYSTEM==”usb”, \
    SYSFS{idVendor}==”5345″, \
    SYSFS{idProduct}==”1234″, \
    RUN+=”/usr/bin/virsh attach-device XP_VM1 /etc/libvirt/HotPlug/owon.xml”

    ACTION==”remove”, \
    SUBSYSTEM==”usb”, \
    SYSFS{idVendor}==”5345″, \
    SYSFS{idProduct}==”1234″, \
    RUN+=”/usr/bin/virsh detach-device XP_VM1 /etc/libvirt/HotPlug/owon.xml”

    Then the ‘owon.xml’ file determines the device as seen by the VM:
    % cat /etc/libvirt/HotPlug/owon.xml

    This passes the USB device ‘raw’ through to the VM. For Windows this means I can load the native drivers and it’ll look like I’ve plugged the ‘scope directly into the windows machine.

    Pretty sure something like this would work for hotswap disks as well. Just make sure the Vendor/product ID numbers match the device you’re plugging in!

  • Why are you trying to compile it yourself and not use the version that comes with the OS?

    Regards,
    Dennis