Migrating ESXi 6.5 VM to bhyve using vm-bhyve

Folks,

It seemed to be easy:

- Copied the vmdx to my freebsd box
- Converted to raw with qemu
- Create a new VM with vm-bhyve, using the converted raw disk

Now the fun starts.

I assume, keep me honest here, the vm conf file uses the UUID to boot, i.e.:

loader="bhyveload"
cpu=4
memory=2048M
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="disk0.img"
network0_mac="58:9c:fc:0d:35:2e"
uuid="b3f44132-dedd-11e8-a568-0cc47a306164"

as it boots and can't find the partition to boot from:

Trying to mount root from ufs:/dev/da0s1a [rw]...
mountroot: waiting for device /dev/da0s1a...
Mounting from ufs:/dev/da0s1a failed with error 19.

Loader variables:
vfs.root.mountfrom=ufs:/dev/da0s1a
vfs.root.mountfrom.options=rw

Manual root filesystem specification:
<fstype>:<device> [options]
Mount <device> using filesystem <fstype>
and with the specified (optional) option list.

eg. ufs:/dev/da0s1a
zfs:tank
cd9660:/dev/cd0 ro
(which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

? List valid disk boot devices
. Yield 1 second (for background tasks)
<empty line> Abort manual input

mountroot>

Looking at the other server in single mode, glabel status give me:

Name Status Component
ufsid/5acf74a5c6bfdbaa N/A da0s1a

Any ideas how I can make that VM work with vm-bhyve?

Thanks!
 
Just type ? as it suggests, manually specify ufs:/dev/<the-device-name-you-got-from-?> to mount root, and once it has booted, edit the mountfrom loader variable.
 
Just type ? as it suggests, manually specify ufs:/dev/<the-device-name-you-got-from-?> to mount root, and once it has booted, edit the mountfrom loader variable.

Sorry, I think I didn't get there yet:

mountroot> ?

List of GEOM managed disk devices:
diskid/DISK-BHYVE-F515-E945-EA00 vtbd0

mountroot> vfs.root.mountfrom=ufs:/dev/vtbd0
Trying to mount root from vfs.root.mountfrom=ufs:/dev/vtbd0 []...
Mounting from vfs.root.mountfrom=ufs:/dev/vtbd0 failed with error 2: unknown file system.

It the above correct?
 
How about /dev/vtbd0s1a? :)

Nope for vtbd0s1a:

mountroot> vfs.root.mountfrom=ufs:/dev/vtbd0s1a
Trying to mount root from vfs.root.mountfrom=ufs:/dev/vtbd0s1a []...
Mounting from vfs.root.mountfrom=ufs:/dev/vtbd0s1a failed with error 2: unknown file system.

Nope for the diskID with and without /dev (with /dev below):

mountroot> vfs.root.mountfrom=ufs:/dev/DISK-BHYVE-F515-E945-EA00
Trying to mount root from vfs.root.mountfrom=ufs:/dev/DISK-BHYVE-F515-E945-EA00 []...
Mounting from vfs.root.mountfrom=ufs:/dev/DISK-BHYVE-F515-E945-EA00 failed with error 2: unknown file system.
 
Oh, sorry I didn't notice it in previous post, you don't need to specify the vfs.root.mountfrom= part, simply provide the ufs:/dev/vtbd0s1a at the prompt.
 
Oh, sorry I didn't notice it in previous post, you don't need to specify the vfs.root.mountfrom= part, simply provide the ufs:/dev/vtbd0s1a at the prompt.

Don't be sorry, you are just trying to help.

It didn't work. Tried and got error 19:

mountroot> ufs:/dev/vtbd0
Trying to mount root from ufs:/dev/vtbd0 []...
Mounting from ufs:/dev/vtbd0 failed with error 22.

mountroot> ufs:/dev/vtdb0s1a
Trying to mount root from ufs:/dev/vtdb0s1a []...
mountroot: waiting for device /dev/vtdb0s1a...
Mounting from ufs:/dev/vtdb0s1a failed with error 19.

mountroot> ?

List of GEOM managed disk devices:
diskid/DISK-BHYVE-F515-E945-EA00 vtbd0

mountroot> ufs:/dev/DISK-BHYVE-F515-E945-EA00
Trying to mount root from ufs:/dev/DISK-BHYVE-F515-E945-EA00 []...
mountroot: waiting for device /dev/DISK-BHYVE-F515-E945-EA00...
Mounting from ufs:/dev/DISK-BHYVE-F515-E945-EA00 failed with error 19.
 
You seem to have a typo in there, it's vtbd, not vtdb.

Sorry, long day. It seems would have be easier just to recreate from scratch, but like they say: Never give up! Never surrender! (Galaxy Quest)

List of GEOM managed disk devices:
diskid/DISK-BHYVE-F515-E945-EA00 vtbd0

mountroot> ufs:/dev/vtbd0
Trying to mount root from ufs:/dev/vtbd0 []...
Mounting from ufs:/dev/vtbd0 failed with error 22.

mountroot> ufs:/dev/vtbd0s1a1
Trying to mount root from ufs:/dev/vtbd0s1a1 []...
mountroot: waiting for device /dev/vtbd0s1a1...
Mounting from ufs:/dev/vtbd0s1a1 failed with error 19.
 
:) It's a long day indeed, that should be ufs:/dev/vtbd0s1a, no trailing 1.

LOL ...

mountroot> ufs:/dev/vtbd0s1a
Trying to mount root from ufs:/dev/vtbd0s1a []...
mountroot: waiting for device /dev/vtbd0s1a...
Mounting from ufs:/dev/vtbd0s1a failed with error 19.

Not going (if I typed right this time ;) )
 
Now that you got it correct, and still getting error 19 (ENODEV), it looks like we are failing in vfs_mountroot_wait_if_neccessary() because the device is simply not there, which I have only one explanation at the moment -- disk image conversion was unsuccessful.
 
Now that you got it correct, and still getting error 19 (ENODEV), it looks like we are failing in vfs_mountroot_wait_if_neccessary() because the device is simply not there, which I have only one explanation at the moment -- disk image conversion was unsuccessful.

Thanks, yuripv. I'll try another time with added know-how thanks to you. If I pass this phase will post back here.
 
Back
Top