Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im running FreeNas on a KVM guest. I need to add (attach) a virtual drive.

I run: qemu-img create -f qcow2 morespace.img 10G

virsh: attach-disk freenas /space/morespace.img vdb

I restart the FreeNas guest, but the spare drive is not shown on 'gpart list or show'

To make extra sure, I did the same steps for a Debian guest. The attached drive is available.

So I can only assume this is a FreeBSD issue.

Anyone know how to attach a drive to a FreeBsD KVM guest?

share|improve this question
Is the FreeBSD kernel detecting the image as a device? Check the output of dmesg and see if it shows up in the boot messages. – D_Bye Jul 17 '12 at 12:55

After much googling, I found the following on libvirt mailinglist

The command is

virsh: attach-disk freenas /space/morespace.img sdb (as opposed to vdb)
share|improve this answer
Could you mark this as the accepted answer please. Thank you. – Chris S Aug 3 '12 at 13:12

Live attach is an exciting thing to try at the best of times. My guess is that the necessary magic isn't supported on a FreeBSD guest, and making it work is going to involve far, far more trouble than it's actually worth. I'd just edit the config to attach the disk, shutdown the VM, start it back up again, and move on.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.