Proxmox 3 on AMD E450: pfSense 2.1, NAS4Free, PiaF, Debian

I

irieKEN

Guest
Hi,

I have consolidated my server closet into a low-power host, and figured that I should share how I got around a few of the glitches I encountered.

Bug #1: pfSense has a kernel panic while installing on the AMD E450-based system, which says
Code:
"[COLOR=#000000][FONT=monospace]Fatal trap 9: general protection fault while in kernel mode"[/FONT][/COLOR]
.
Solution: Enter the following load option "hw.mca.enabled=0", the tell it to boot. Repeat manually disabling MCA after installation, then echo
Code:
hw.mca.enabled=0 >> /boot/loader.conf

Bug #2: pfSense won't automatically use virtio.
Solution: Append the following lines to /boot/loader.conf:
Code:
virtio_load="YES"
virtio_pci_load="YES"
virtio_blk_load="YES"
if_vtnet_load="YES"
virtio_balloon_load="YES"

Then edit /etc/fstab, so that pfSense knows to look for root/swap on /dev/vtbd0s1a and /dev/vtbd0s1b.

Bug #3: If pfSense and Linux guests use virtio for their LAN-facing NICs, routing doesn't work properly.
Solution: Set pfSense' LAN-facing NIC to use the Intel E1000 driver; I am not sure what the cause of the problem is, but but guest OSs that share the same physical adapter on the Proxmox host don't have their traffic routed properly (physical machines on the LAN are fine, though).

Bug #4: NAS4Free has a kernel panic when booting the installer.
Solution: Same as bug #1.

Bug #5: NAS4Free doesn't include virtio drivers.
Solution: Download and install the virtio kmod for FreeBSD
Code:
# setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-current/Latest/
or # setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/Latest/

# pkg_add -r virtio-kmod-9.1


## Add to /boot/loader.conf
virtio_load="YES"
virtio_pci_load="YES"
virtio_blk_load="YES"
if_vtnet_load="YES"
virtio_balloon_load="YES"

## If wanted, update /etc/fstab to use the virtio drive before shutting down.

After doing that, you can issue a qm set command on the host to make the physical disk available to the VM: e.g.
Code:
qm set 110 --virtio1 /dev/disk/by-path/pci-0000\:00\:1f.2-scsi-2\:0\:0\:0
Add virtio statements for each physical disk to the the VM config file in /etc/pve/qemu-server/. E.g.
Code:
virtio5: /dev/disk/by-path/pci-0000:00:11.0-scsi-5:0:0:0,backup=no,size=2930266584K

I hope that this saves someone else some time:)
 
Last edited by a moderator:
IrieKEN you are the man! I was trying to accomplish the same setup from yesterday. Started with Nas4free and will move on to pfsense next. Did you setup your Nas4free boot volume as virtio also, or just the storage drives?

Hi,

I have consolidated my server closet into a low-power host, and figured that I should share how I got around a few of the glitches I encountered.

Bug #1: pfSense has a kernel panic while installing on the AMD E450-based system, which says
Code:
"[COLOR=#000000][FONT=monospace]Fatal trap 9: general protection fault while in kernel mode"[/FONT][/COLOR]
.
Solution: Enter the following load option "hw.mca.enabled=0", the tell it to boot. Repeat manually disabling MCA after installation, then echo
Code:
hw.mca.enabled=0 >> /boot/loader.conf

Bug #2: pfSense won't automatically use virtio.
Solution: Append the following lines to /boot/loader.conf:
Code:
virtio_load="YES"
virtio_pci_load="YES"
virtio_blk_load="YES"
if_vtnet_load="YES"
virtio_balloon_load="YES"

Then edit /etc/fstab, so that pfSense knows to look for root/swap on /dev/vtbd0s1a and /dev/vtbd0s1b.

Bug #3: If pfSense and Linux guests use virtio for their LAN-facing NICs, routing doesn't work properly.
Solution: Set pfSense' LAN-facing NIC to use the Intel E1000 driver; I am not sure what the cause of the problem is, but but guest OSs that share the same physical adapter on the Proxmox host don't have their traffic routed properly (physical machines on the LAN are fine, though).

Bug #4: NAS4Free has a kernel panic when booting the installer.
Solution: Same as bug #1.

Bug #5: NAS4Free doesn't include virtio drivers.
Solution: Download and install the virtio kmod for FreeBSD
Code:
# setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-current/Latest/# pkg_add -r virtio-kmod-9


## Add to /boot/loader.conf
virtio_load="YES"
virtio_pci_load="YES"
virtio_blk_load="YES"
if_vtnet_load="YES"
virtio_balloon_load="YES"

After doing that, you can issue a qm set command on the host to make the physical disk available to the VM: e.g.
Code:
qm set 110 --virtio1 /dev/disk/by-path/pci-0000\:00\:1f.2-scsi-2\:0\:0\:0
Add virtio statements for each physical disk to the the VM config file in /etc/pve/qemu-server/. E.g.
Code:
virtio5: /dev/disk/by-path/pci-0000:00:11.0-scsi-5:0:0:0,backup=no,size=2930266584K

I hope that this saves someone else some time:)
 
IrieKEN you are the man! I was trying to accomplish the same setup from yesterday. Started with Nas4free and will move on to pfsense next. Did you setup your Nas4free boot volume as virtio also, or just the storage drives?

Only the storage drives are virtio right now, but I am sure that it would be fairly painless to switch the system drive to virtio. I will likely make the jump when I find another SSD (for ZIL and L2ARC).
 
Just tried your steps for Nas4free. I had to change the "pkg_add -r virtio-kmod-9" command to "pkg_add -r virtio-kmod-9.1.tbz" to be able to run it. I am getting this:

nas4free:~# pkg_add -r virtio-kmod-9.1.tbzFetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-current/Latest/virtio-kmod-9.1.tbz... Done.
/usr/sbin/kldxref: not found
pkg_add: command '/usr/sbin/kldxref /boot/modules' failed


To use these modules, add loading lines in /boot/loader.conf:


virtio_load="YES"
virtio_pci_load="YES"
virtio_blk_load="YES"
if_vtnet_load="YES"
virtio_balloon_load="YES"


and edit fstab and interface config in rc.conf:


# sed -i.bak -Ee 's|/dev/ada?|/dev/vtbd|' /etc/fstab
# echo 'ifconfig_vtnet0_name="em0"' >> /etc/rc.conf


and enable virtio devices in host's domain.xml:


- <target dev='hda' bus='ide'/>
- <address type='drive' controller='0' bus='0' unit='0'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
...
- <model type='e1000'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>

I tried to boot the system after adding the /boot/loader.conf lines but with no success. I reverted loader.conf and retried by also adding the fstab and rc.conf commands suggested by the installer. Then the system boots but and I am getting "link_elf_lookup_symbol:missing symbol hash table. The IP I am getting is 127.0.0.1 so network is not recognized. I have not added any virtio drives yet. I believe the network is the root of my problems. Any ideas?

 
Last edited:
Yes I know that and I am planning to install it. I thought that you faced some issues with it on Proxmox and this is why you mentioned it. Did you?

Btw I have not tried NAS4Free. It is better than FreeNAS?

I have installed Elastix in the past with no issues at all.

Nas4free is supposed to be the continuation of the FreeNas project. However I believe that the FreeNas project is also continuing also by a different team. Nas4free is tuned for low end hardware (which I believe is regularly the case for Proxmox VMs). Its interface seems to be far more responsive that Freenas.
 
I have installed Elastix in the past with no issues at all.

Nas4free is supposed to be the continuation of the FreeNas project. However I believe that the FreeNas project is also continuing also by a different team. Nas4free is tuned for low end hardware (which I believe is regularly the case for Proxmox VMs). Its interface seems to be far more responsive that Freenas.

Did you install Elastix on a VM or a CT?
And if a CT, didn't you have issues with Dhadi?
 
Just tried your steps for Nas4free. I had to change the "pkg_add -r virtio-kmod-9" command to "pkg_add -r virtio-kmod-9.1.tbz" to be able to run it. I am getting this:



I tried to boot the system after adding the /boot/loader.conf lines but with no success. I reverted loader.conf and retried by also adding the fstab and rc.conf commands suggested by the installer. Then the system boots but and I am getting "link_elf_lookup_symbol:missing symbol hash table. The IP I am getting is 127.0.0.1 so network is not recognized. I have not added any virtio drives yet. I believe the network is the root of my problems. Any ideas?



I am glad to say that I solved all my problems by following this ridiculously easy guide http://forums.nas4free.org/viewtopic.php?f=15&t=2390#p12174 for installing virtio support on Nas4free.
 
I am a newbie with Free3NAS and particularly inside a VM.

Can someone please tell me:

1) Why Free4NAS instead of FreeNAS (current versions)?
2) What type of filesystem should I create on the data-storage disk inside Free4NAS? I have done the VIRTIO part and I am not sure whether I should format it USF or ZFS.

I have a simple setup really. I just want a KVM inside my proxmox to act as my FTP and NFS server. The disk used by proxmox is already on HW Raid1.
Any help is much appreciated!

Thank you.
 
Yes I know that and I am planning to install it. I thought that you faced some issues with it on Proxmox and this is why you mentioned it. Did you?

Btw I have not tried NAS4Free. It is better than FreeNAS?


I didn't run into any trouble while installing PiaF.

I use NAS4Free, because it seems to be more open than FreeNAS, and also seems to be a little more modern (uses FreeBSD 9.1, instead of 8.3.1).
 
I'm having problems installing pfsense 2.1RC2 x64 on proxmox 3.1 from the live cd (I checksumed it). I set processor to qemu64, cd/dvd/hdd to scsi, net to E1000 and disabled acpi, like recommended here http://pve.proxmox.com/wiki/FreeBSD_Guest_Notes. Whatever boot option I try doesn't work, after the timer goes off or after selecting an option it displays a newline with a backslash and that's it. if I select option 7. Escape to loader prompt and type set hw.mca.enabled=0 and then boot it makes no difference, it just hangs. Do you have any suggestions? And how did you get the Fatal trap 9: general protection fault while in kernel mode msg? I don't get an error even if I boot with verbose logging - it just hangs. Any help would be greatly appreciated.

Hi,

I have consolidated my server closet into a low-power host, and figured that I should share how I got around a few of the glitches I encountered.

Bug #1: pfSense has a kernel panic while installing on the AMD E450-based system, which says
Code:
"[COLOR=#000000][FONT=monospace]Fatal trap 9: general protection fault while in kernel mode"[/FONT][/COLOR]
.
Solution: Enter the following load option "hw.mca.enabled=0", the tell it to boot. Repeat manually disabling MCA after installation, then echo
Code:
hw.mca.enabled=0 >> /boot/loader.conf

Bug #2: pfSense won't automatically use virtio.
Solution: Append the following lines to /boot/loader.conf:
Code:
virtio_load="YES"
virtio_pci_load="YES"
virtio_blk_load="YES"
if_vtnet_load="YES"
virtio_balloon_load="YES"

Then edit /etc/fstab, so that pfSense knows to look for root/swap on /dev/vtbd0s1a and /dev/vtbd0s1b.

Bug #3: If pfSense and Linux guests use virtio for their LAN-facing NICs, routing doesn't work properly.
Solution: Set pfSense' LAN-facing NIC to use the Intel E1000 driver; I am not sure what the cause of the problem is, but but guest OSs that share the same physical adapter on the Proxmox host don't have their traffic routed properly (physical machines on the LAN are fine, though).

I hope that this saves someone else some time:)
 
Hi, I have the AMD Turion processor. I have the same error with pfsense in proxmox 3.0:

"Fatal trap 9: general protection fault while in kernel mode"
I try the solution comment in this post:

Solution: Enter the following load option "hw.mca.enabled=0", the tell it to boot. Repeat manually disabling MCA after installation, then echo
Code:
hw.mca.enabled=0 >> /boot/loader.conf


But the error is the same...

Attach image

.pfsense-error.png


Can I help me please??
 
I have 3 pfSense VM running in Proxmox. 2 of them are recent installs. Did not have any issue with any of these 3 VMs during boot. Only time i had issue was when i tried to install with default vCPU(kvm64).
vCPU : qmeu64
vHDD : IDE
vNET : e1000
pve-kernel : 2.6.32-114
 
I have 3 pfSense VM running in Proxmox. 2 of them are recent installs. Did not have any issue with any of these 3 VMs during boot. Only time i had issue was when i tried to install with default vCPU(kvm64).
vCPU : qmeu64
vHDD : IDE
vNET : e1000
pve-kernel : 2.6.32-114


I had the same problem. changing vCPU to qemu64 is the fix!
 
I had the same problem. changing vCPU to qemu64 is the fix!

yes, this is a bug in kvm kernel code and amd processor. (this should be fixed soon in 3.10 host kernel)

all virtual processor with amd64 vendor (so kvm64,opteron_gX or host) will not work with physical amd processor currently.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!