Converting a Debian VM from PV (paravirtualized) to PVHVM (PV-on-HVM drivers)
Well, as often there's a little bit more to do than just running a oneliner. So I created a summary based on information found here, elsewhere and the one I added to successfully convert a Debian VM 9.x from PV to PVHVM on XCP-ng 7.4.x.
Reconfigure GRUB defaults in /etc/default/grub (Debian). Make sure GRUB_TERMINAL is uncommented and set to console (disabling graphical modes, which caused a black screen in XenCenter / VNC for me):
#GRUB_CMDLINE_LINUX="console=hvc0"
GRUB_TERMINAL=console
Update GRUB:
update-grub
Poweroff the vm:
poweroff
Retrieve the UUID of the virtual machine:
xe vm-list name-label=your_vm_name_goes_here params=uuid
Set HVM boot mode:
xe vm-param-set uuid=your_vm_uuid_goes_here HVM-boot-policy="BIOS\ order"
Set local disk (c) and cdrom (d) as boot options:
xe vm-param-set uuid=your_vm_uuid_goes_here HVM-boot-params="cd"
Clear pygrub as boot loader:
xe vm-param-set uuid=your_vm_uuid_goes_here PV-bootloader=""
Clear the display arguments:
xe vm-param-set uuid=your_vm_uuid_goes_here PV-args=""
Find the UUID of the interface of the virtual disk:
xe vm-disk-list uuid=your_vm_uuid_goes_here
Set the disk device (VBD) as bootable:
xe vbd-param-set uuid=your_vbd_uuid_goes_here bootable=true
Start the VM and verify your VM actually is running in PVHVM mode:
https://wiki.xen.org/wiki/Xen_Linux_PV_on_HVM_drivers#Verifying_Xen_Project_Linux_PVHVM_drivers_are_using_optimizations
Hope this saves someone else a little bit of time.