Noob questions on virtualization and storage

Status
Not open for further replies.

gedia

Cadet
Joined
Mar 26, 2012
Messages
2
Hi,

I'm new both to the *BSD world and software-based NAS solutions. I'm considering deploying FreeNAS 8 mainly because of ZFS and AD integration, and also because of its reputation as a robust NAS solution. I would be grateful if someone could shed some light on the following two questions:

1) I've been thinking of installing FreeNAS in a virtualized environment, under Linux KVM (surprisingly, there are very few references to this on the web). However, there is no out-of-the-box virtio support in freebsd, afaik. There is, however, this project: http://people.freebsd.org/~kuriyama/virtio/
Is it possible to a) install freenas on a (fully) virtualized disk under KVM, and then b) install virtio support by following instructions on pkg_add use? And if yes, would I then be able to boot the same image after I switch to paravirtualized network and storage drivers? I think it should work for linux (after some grub/fstab tweaking) but I have no idea whether this would hold true for FreeNAS as well.

I'm reading these virtio drivers are provided as "binary modules". Is this similar to cases where linux would require an initrd before it would be able to mount the root filesystem? Does this mean I won't be able to boot off a virtio disk without an initrd?

2) Does FreeNAS require raw access to storage devices? I'm considering installing the distro on a poweredge server with hardware RAID10, but I need some of the storage for other VMs (as well as FreeNAS itself). If I exposed an LVM volume to FreeNAS as a single paravirtualized virtio disk, would that raise any issues?

Thank you in advance.
 

gedia

Cadet
Joined
Mar 26, 2012
Messages
2
I think I did it. It was so easy I find it hard to believe it's actually working:

a) Modify the KVM instance to use full virtualization for disks and network (I used disk_type=scsi and nic_type=rtl8139 with gnt-instance modify)
b) Install FreeNAS
c) Change instance boot order to disk
d) Enable SSH access via the web interface
e) Log in as root and run
mount -uw /
wget http://people.freebsd.org/~kuriyama/virtio/8.2/virtio-kmod-0.228301.tbz
pkg_add virtio-kmod-0.228301.tbz

f) Follow the instructions that appear on screen carefully (you'll need to append a few lines to a file and mofify a few other files using sed)
g) After that, run:
mount -ro /

h) shutdown the VM
i) Modify the instance again to use paravirtualized disk and network (gnt-instance modify -H nic_type=paravirtual and gnt-instance modify -H disk_type=paravirtual if you're using ganeti)
j) Start the VM
 

purrdeta

Cadet
Joined
Jul 6, 2012
Messages
3
I hate to resurrect an ancient thread, but it is relevant! I am curious, I followed what worked for you exactly, yet it still doesn't seem to recognize any of my virtio devices. I see the virtio drivers being loaded during boot as well. I've gotten the drivers working on FreeBSD just fine before, so I sort of wonder if something has been removed in the FreeNAS repackage?
 
Status
Not open for further replies.
Top