Configuration Guide for creating an LXD Windows VM and Configuring RemoteAPPs to work from our Ubuntu Desktop

I am also trying to this. When I am pressing any key then it will stack in this satet

image

That only appears to be stuck. Once you’ve pressed a key, you need to quit the the console using ctrl+a-q. And then you need to run lxc console win10 --type=vga. That should get you to the installer.

image

now its stack in this state

@monstermunchkin plz any idea?

Try installing spice-client-gtk.

Once a suitable spice client is installed, the LXD snap needs to notice it, this happens on LXD startup so you’d need to do systemctl reload snap.lxd.daemon to have LXD restart and set it up for you.

1 Like

image

@monstermunchkin @stgraber

root@lxd1:/path/to/iso# sudo snap install distrobuilder --classic
snap “distrobuilder” is already installed, see ‘snap help refresh’
root@lxd1:/path/to/iso# sudo apt install -y libguestfs-tools wimtools
Reading package lists… Done
Building dependency tree
Reading state information… Done
libguestfs-tools is already the newest version (1:1.40.2-7ubuntu5).
wimtools is already the newest version (1.13.1-1).
0 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
root@lxd1:/path/to/iso# sudo distrobuilder repack-windows Win10_20H2_English_x64.iso Win10_20H2_English_x64_distrobuilder.iso
INFO Mounting Windows ISO
INFO Mounting driver ISO
INFO Modifying WIM file {“file”: “boot.wim”, “index”: 2}
INFO Modifying WIM file {“file”: “install.wim”, “index”: 1}
INFO Modifying WIM file {“file”: “install.wim”, “index”: 2}
INFO Modifying WIM file {“file”: “install.wim”, “index”: 3}
INFO Modifying WIM file {“file”: “install.wim”, “index”: 4}
INFO Modifying WIM file {“file”: “install.wim”, “index”: 5}
INFO Modifying WIM file {“file”: “install.wim”, “index”: 6}
INFO Modifying WIM file {“file”: “install.wim”, “index”: 7}
INFO Modifying WIM file {“file”: “install.wim”, “index”: 8}
INFO Modifying WIM file {“file”: “install.wim”, “index”: 9}
INFO Modifying WIM file {“file”: “install.wim”, “index”: 10}
INFO Modifying WIM file {“file”: “install.wim”, “index”: 11}
INFO Generating new ISO
root@lxd1:/path/to/iso# lxc init win10 --empty --vm -c security.secureboot=false
Creating win10
root@lxd1:/path/to/iso# lxc config device override win10 root size=30GiB
Device root overridden for win10
root@lxd1:/path/to/iso# lxc config device add win10 iso disk source=/path/to/iso/windows.iso boot.priority=10 windows.iso
root@lxd1:/path/to/iso# lxc config device add win10 iso disk source=/path/to/iso/Win10_20H2_English_x64_distrobuilder.iso boot.priority=10 Device iso added to win10
root@lxd1:/path/to/iso# lxc start win10 --console=vga
X11 connection rejected because of wrong authentication.
Unable to init server: Could not connect: Connection refused

(remote-viewer:4176671): Gtk-WARNING **: 08:02:40.776: cannot open display: localhost:10.0

no one can solve the issue :pensive:

Sounds like you’re using SSH redirection (as mentioned on Github), that’s been known to cause issues, if that’s the case, just run the lxc client tool remotely instead.

A huge thanks for this discussion! As a newbie I was very interesting to read.

After install virt-viewer (remote-viewer) or spice-gtk-client (spicy) restart lxd daemon.

if you are connected to a server using SSH, logout and log in again with: ssh -X username@ipserver