Having trouble successfully migrating live FreeBSD server to Proxmox VE

Mattr

New Member
Apr 13, 2017
5
0
1
42
Hello,

We have a few older servers that we want to virtualize using Proxmox VE. We have had success creating new VMs on Proxmox using both CentOS and FreeBSD as guest OSs, but I have not had any luck with migrating a live server.

For testing I attempted both the Clonezilla disk-to-remote method as well as the dd method of a FreeBSD server running 103, but no luck. When I boot up the VM after doing the Clonezilla method, It hangs on "Booting from Hard Disk". When I do the dd method, it skips over the drive saying it's not bootable.

The Clonezilla method seems easy enough, but I must be missing something. The source server is using hardware raid 1, and Clonezilla saw the drive as a single drive. When I boot from a liveCD on the VM and run gpart show, it looks like the partitions are good. I ran a fsck against the disk, and it does seem to remain dirty after running it several times. I would think that FreeBSD would at least start it's boot process before giving errors if it was just a dirty disk issue. Any thoughts? I've tried QEMU32, QUEMU64, KVM64 and Host for the CPU. Tried IDE and SCSI for the VM hard drive.

Let me know what i can provide for further info, and I'll send it along!

Thank you,

Matt
 
Hi Matt,
I assume the running FreeBSD see the disk as scsi-disk? Which scsi-controller do you tried on proxmox? I guess the standard virtio-scsi will not work - perhaps you have more luck with an lsi? The kind of cpu should not make differences - because the server don't find the root-filesystem.

Udo
 
On the source physical server the main disk looks like this:

From dmesg.boot:

amrd0: <LSILogic MegaRAID logical drive> on amr0
amrd0: 17280MB (35389440 sectors) RAID 1 (optimal)

From df -h:

Filesystem Size Used Avail Capacity Mounted on
/dev/amrd0p2 15G 4.4G 9.9G 31% /


The drive is 2 physical drives in RAID 1 config on a Dell Perc 4 RAID card.

Can you change the disk controller on the vm after it's been created? Or will I need to create a new disk image with a different controller and try my Clonezilla process again?

Thanks,

Matt
 
On the source physical server the main disk looks like this:

From dmesg.boot:

amrd0: <LSILogic MegaRAID logical drive> on amr0
amrd0: 17280MB (35389440 sectors) RAID 1 (optimal)

From df -h:

Filesystem Size Used Avail Capacity Mounted on
/dev/amrd0p2 15G 4.4G 9.9G 31% /


The drive is 2 physical drives in RAID 1 config on a Dell Perc 4 RAID card.

Can you change the disk controller on the vm after it's been created? Or will I need to create a new disk image with a different controller and try my Clonezilla process again?

Thanks,

Matt
Hi,
you can change the type of scsi-controller, but you will not be able to get an "/dev/amrd0" device (imho) - don't know freeBSD enough, but perhaps you can edit on the transferred system (live cd boot) the fstab to /etc/hdap2 and use ide as controller? But then you must upgrade the boot-loader also...

Udo
 
Hi,

Yes I did find the option to change the SCSI controller on the VM and I went through each one. They either all hang at that booting from hard disk or do not detect the drive at all.

When I boot from a FreeBSD Live CD I see the drive detected by FreeBSD as da0 and I can mount it and see it's contents. Maybe I'm not going about this the right way. The end result I want is the exact same server we have running physically, but transferred to a VM on Proxmox. Now the production servers I eventually want to migrate are not using RAID (part of the reason I want them virtualized), so I might not have the same issue, but I'd like to be able to test this p2v migration of FreeBSD with a non critical server and get the kinks out ahead of time. Maybe even get the procedure documented for others.

Matt
 
Just to follow-up:
It turns out some of the issues I had were related to DD not copying properly. When I did the process again, it seemed to work. I did have a few errors that had to be cleaned via fsck while running from the liveCD.

Since this, I have decided that creating the VM, then manually creating the partitions and using dump/restore over ssh is the better method, as it does a snapshot backup and has much less chance of disk inconsistency. My trouble now, is that it looks like older versions of FreeBSD do not support the virtIO SCSI disk controller, so I'll have to use the LSI one. The boot-up of FreeBSD using the LSI controller seems to show a disk transfer rate of 3.300MB/s which seems significantly slower then the virtIO controller which shows 300MB/s. I'm not sure if that number is useful or if it's not the true speed.

Anyway, that's a different issue.

Matt
 
IIRC FreeBSD 9 has virtio-blk for disks which give a nice performance boot too ( select simply VIRTIO as the controller type for virtio-blk)
 
Thanks Manu! I was aware that 9 and up support virtIO (or can with some tweaking), it's just some of my older servers that run older versions where there might be an issue. Thinking of it afterwards though, is there any reason why I NEED to match the disk type from the physical source server to the VM? Meaning if the source server was using SCSI, is there anything preventing me from using SATA for example on the VM? I guess it would just come down the drivers etc, which shouldn't be a problem. And since I'm simply doing a dump/restore to migrate the server, as long as I fix the device names in the /etc/fstab file, I think I should be OK.
 
yes you can use any disk as long as you update /etc/fstab appropriately
if you can you should really migrate theses systems to at least 9.0, virtio provides really a significant performance boost.
 

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!