Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Convert pfsense ova file to qcow2 fails with either virt-v2v or qemu-img

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 3 Posters 381 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dutsnekcirf
      last edited by

      I'm trying to migrate away from my vmware esxi server. I've been running pfsense on it for a long time. I've exported the vm image as an ova file and now need to convert it to a qcow2 file to import into my linux hypervisor.

      I've been using the virt-v2v utility to convert all of my other VMs and it's worked well, but it appears to have failed on my pfsense VM. The error I got was:

      virt-v2v: error: libguestfs error: inspect_os: sfdisk exited with status 1: 
      sfdisk: /dev/sda: partition 5: partition table contains only 4 partitions
      

      It appears the pfsense disk image is using a complex partition table that virt-v2v is unable to support.

      I tried using qemu-img as well. qemu-img was able to actually convert the file to a .qcow2 file, but when I attempt to boot from it, I get the following error:

      BdsDxe: failed to load Boot0001 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x0): Not Found
      BdsDxe: No bootable option or device was found.
      

      So I'm wondering if my only alternative is to install a fresh image of pfsense and attempt to import a backup of the configuration. I'm wondering how well this works. I have a recent backup that I could restore. Will it include any configurations I've made in the other packages that I've installed with the package manager? What would you guys do?

      stephenw10S 1 Reply Last reply Reply Quote 0
      • sretallaS
        sretalla
        last edited by

        I really think you're wasting your time with it... It can probably be made to work, but why? I don't think any time will be saved that way and the result will certainly not be any better (maybe not different at all).

        A fresh build in the new system and a restore of the config from pfSense is all that's needed.

        All packages are reinstalled with the config if you select that in the backup (which you should take right before the cutover).

        There are a few small things that can be missing on the new side depending on the packages you have and how old they are/how they go there, but while you still have access to the old VM, those can be had easily.

        1 Reply Last reply Reply Quote 1
        • stephenw10S
          stephenw10 Netgate Administrator @dutsnekcirf
          last edited by

          @dutsnekcirf said in Convert pfsense ova file to qcow2 fails with either virt-v2v or qemu-img:

          I'm wondering how well this works.

          Very well. All the config is in that file. It should restore and be identical. The only issue you will have are he interface names will probably be different (vmx vs vtnet) so they will need to be re-assigned when you import it.

          Steve

          D 1 Reply Last reply Reply Quote 0
          • D
            dutsnekcirf @stephenw10
            last edited by dutsnekcirf

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.