SOLVED How to run Wayland in Bhyve Pop!_OS 22.04 VM?; TrueNAS to Proxmox VM migration

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
I am currently on TrueNAS core 13.0-U4 and have a running Bhyve VM of Pop!_OS 22.04 provisioned with 2/4 cores/threads, 4GB RAM, 64GB storage.
I am planning to run Waydroid on it which requires Wayland to run. I'm having trouble getting it to run on Wayland.

What I've done so far:

I modified the /etc/gdm3/custom.conf file by changing WaylandEnable=true

I also modified the /usr/lib/udev/rules.d/61-gdm.rules file by commenting out two lines:
LABEL="gdm_prefer_xorg"
#RUN+="/usr/libexec/gdm-runtime-config set daemon PreferredDisplayServer xorg"
GOTO="gdm_end"

LABEL="gdm_disable_wayland"
#RUN+="/usr/libexec/gdm-runtime-config set daemon WaylandEnable false"
GOTO="gdm_end"

LABEL="gdm_end"

Because the cogwheel on the lower right corner is missing on the login screen, I also installed i3-wm
$ sudo apt install i3-wm

The cogwheel now appears but it still does not give me the option to switch to Wayland.
1681397952980.png


1681397871323.png
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Have you passed through a GPU to your VM?
 

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
Unfortunately this is not working for me. I only have one gpu in my server and it's feeding video to a PiKVM for headless management and powering TrueNAS. The GPU is therefore in use. I know I have VT-d enabled in BIOS (AMD 5900x with SVM enabled) but typing acpidump -t | grep DMAR displays no DMAR table. Since Bhyve PCI passthrough passes the GPU exclusively to the VM, this is probably the reason why it's not working?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Yes, you would need to pass through a second GPU. If the first is already occupied within TrueNAS itself, then it's not available for VMs.

Is there any specific reason you absolutely need Wayland running on your VM?
 

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
Yes, you would need to pass through a second GPU. If the first is already occupied within TrueNAS itself, then it's not available for VMs.

Is there any specific reason you absolutely need Wayland running on your VM?
I see. I wanted to run Wayland to be able to run Waydroid as an Android Emulator but it's not really critical. Was hoping I could do it.
With the limitations of TrueNAS core as a hypervisor, I'm thinking of moving to Proxmox and emulating TrueNAS as a VM. If I do that, is there a way to migrate my TrueNAS Bhyve VMs to Proxmox?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
is there a way to migrate my TrueNAS Bhyve VMs to Proxmox?
I don't know what virtual disk format Proxmox uses, but you can always dd the bhyve zvol to a RAW disk image file, and then convert that to another virtual disk format, like VMDK.
 

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
I don't know what virtual disk format Proxmox uses, but you can always dd the bhyve zvol to a RAW disk image file, and then convert that to another virtual disk format, like VMDK.
I took a quick look and it does seem Proxmox uses VMDK. From what I understand of the process, I just copy the Bhyve volume using dd if=bhyve_vm_vol/vm_name of=destination_vol/vm_name.raw bs=1m. In my case the Bhyve zvol for my Ubuntu VM is dd if=VMs-Plugins-Jails/VMs/ubuntu/Ubuntu_srv-qhbsg of=/mnt/test/ubuntu.raw bs=1
Once I get Proxmox server running, I use QEMU command to convert it to VMDK
qm importdisk VM_ID /home/test/ubuntu.raw local --format qcow2
From there it seems I just need to attach the disk and configure the appropriate settings.

I am using this as my reference.
 
Last edited:

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
I'm having trouble attempting to dd for some reason. I tried dd if=/mnt/VMs-Plugins-Jails/VMs/ubuntu/Ubuntu_srv-qhbsg of=/mnt/Volume3/test/ubuntu.raw bs=1m but I get an error saying 'No such file or directory'

1681801863729.png

1681801972673.png
 
Last edited:

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
That's because the Ubuntu zvol actually physically resides at /dev/zvol/VMs-Plugins-Jails/VMs/ubuntu/Ubuntu_srv-qhbsg. Likewise for the other zvols.
 

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
Got it. Will try this out.
 

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
Update: I used Clonezilla to migrate my TrueNAS Ubuntu Server VM to Proxmox successfully. No issues at all.
I used the same method to clone my TrueNAS Windows 10 VM to Promox but it fails to boot:
1682070507206.png


Not exactly sure what to do now.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

sleeper52

Explorer
Joined
Nov 12, 2018
Messages
91
Update: so I've successfully moved my VMs from TrueNAS Bhyve to my temporary Proxmox machine with no issues.
The methods used were from here.
For those migrating Windows VMs, use the Clonezilla Live CDs method and don't forget to run the mergeide.reg file on the TrueNAS source VM before you start the migration process. This will resolve the Windows boot error after the migration.
 
Top