1

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?

1
  • 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, 2012 at 12:55

2 Answers 2

2

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)
1
  • Could you mark this as the accepted answer please. Thank you.
    – Chris S
    Aug 3, 2012 at 13:12
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .