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?

Brent
  • 305
  • 2
  • 11
  • 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

2 Answers2

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)
Chris S
  • 77,337
  • 11
  • 120
  • 212
Brent
  • 305
  • 2
  • 11
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.

womble
  • 95,029
  • 29
  • 173
  • 228