Skip to content

Instantly share code, notes, and snippets.

@swrogers
Created February 29, 2020 16:33
Show Gist options
  • Save swrogers/40af1dcb3c709d952b5e6646d9a74195 to your computer and use it in GitHub Desktop.
Save swrogers/40af1dcb3c709d952b5e6646d9a74195 to your computer and use it in GitHub Desktop.
Manjaro On HyperV

What I needed to do to install Manjaro 19.0 KDE on Hyper-V

  • After initial bootup, need to change the video driver
    • wait for bootup to complete, takes a few minutes, then Control+F2 to change to console
    • run the following commands:
    su
    pacman -Sy
    pacman -S xf86-video-fbdev
    systemctl start sddm
    
    • the display manager should start now and you can complete the installation
  • Power down the vm after the installation, remove the ISO image in the settings, and power back on the vm.
  • Give the system a few minutes to come back online, then Control+F2 once again. We need to install xrdp and xorgxrdp via the Microsoft github
  • Log in using the account you set up in the installation
  • Run the following commands:
sudo pacman -Sy
sudo pacman -S git
git clone https://github.com/Microsoft/linux-vm-tools
cd linux-vm-tools/arch
  • Currently, the xorgxrdp package is not compilable without some changes - so before we run the makepkg.sh command edit makepkg.sh to prevent removal of the $TEMPDIR directory (comment out the last line).
  • Go ahead and run ./makepgk.sh after that, to grab the proper packages and attempt the build.
  • If both packages build, then awesome. Otherwise....
    • I have needed to fix the xrdpMouse.c file, changing the WM_BUTTON[8,9][UP,DOWN] case statements back to a prepatched state. Replace them with the integers 115,116,117,118.
    • From within the temp build directory, edit the PKGBUILD to comment out the source line.
    • Run makepkg -si --skipinteg, which prevents the command from complaining about the checksums being different.
    • After that, both xrdp and xorgxrdp should be installed
  • Back into the linux-vm-tools/arch directory, run sudo ./install.sh
  • Now to make some changes to the ~/.xinitrc file
    • Near the top of the file, change the DEFAULT_SESSION=startkde to DEFAULT_SESSION=startplasma-x11
    • Change local dbus_args=(--sh-syntax --exit-with-session) to local dbus_args=(--sh-syntax)
  • If you also want audio to work, we need to install a couple more things
    • sudo pacman -S yay to install the yay package manager
    • yay pulseaudio-module-xrdp to install the audio forwarder.
  • Shutdown the vm.
  • Open an Admin Powershell prompt and run set-vm -vmname <vmnamehere> -EnhancedSessionTransportType HvSocket
  • Power back on and you should be prompted with an RDP session window. It may take some time to show up.
  • If you need to get back to a terminal, re-enable VMBus with set-vm -vmname <vmnamehere> -enhancedsessiontransporttype vmbus
@iongion
Copy link

iongion commented Oct 7, 2021

I did additional install of gdm and sddm and then I was able to see the graphical ui, after second login

See here https://wiki.manjaro.org/index.php/Install_Display_Managers

sudo pacman -S gdm
sudo pacman -S sddm

sudo systemctl restart lightdm

Then two logins and able to see the desktop and proceed with the installation, maybe recent manjaro needs some additional deps that sudo pacman -S lightdm does not resolve

Also, be sure you have Type 2 VMs and you boot without proprietary drivers first

@swrogers
Copy link
Author

swrogers commented Dec 6, 2023

An additional note to self here: lately, due to package requirements of xorgxrdp-git, I have needed to install xrdp-devel-git instead of plain xrdp. This has worked in at least one case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment