Results 1 to 3 of 3

Thread: Allocating physical disk drives to KVM's (using libvirt)

  1. #1
    Join Date
    Dec 2009
    Beans
    2

    Allocating physical disk drives to KVM's (using libvirt)

    I really don't get that libvirt thing and documentation is so confusing.

    I successfully installed my virtual machine inside an image file. This virtual machine is an OpenFiler NAS. I would like to make available two physical hard drives to the VM in order to configure a RAID and export some shares.

    I just don't understand how I can make those 2 physical drivers (/dev/sdc and /dev/sdd) available to the VM. Any help?

  2. #2
    Join Date
    May 2009
    Beans
    19

    Re: Allocating physical disk drives to KVM's (using libvirt)

    Here's an example. I use the LVM for my block device and virtio drivers, so your target dev and bus type may differ e.g. hda and 'ide'

    <disk type='block' device='disk'>
    <source dev='/dev/Virtual/HomeServerOS'/>
    <target dev='vda' bus='virtio'/>
    </disk>
    <disk type='block' device='disk'>
    <source dev='/dev/Virtual/HomeServerData'/>
    <target dev='vdb' bus='virtio'/>
    </disk>

    substitute source dev= for the host disk you want to provide to the guest

  3. #3
    Join Date
    Dec 2009
    Beans
    2

    Re: Allocating physical disk drives to KVM's (using libvirt)

    Many, many thanks.

    It works like a charm.

    Made the two physical drives available to the guest and been able to setup a software raid. To my great surprise, I see no noticeable performance drop!

    Thanks again!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •