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

I spent this week documenting all the steps required and put it all into a PDF on Github:

https://github.com/bmullan/Windows-VM-RemoteApp-Configuration-Guide-for-Ubuntu

NOTE:
In this Configuration Guide I am using a Windows 7 Ultimate version because I have a license for that. In the Guide you will find other versions of Windows that Kim Knight’s RemoteAppTool also works with but the configuration steps may differ from say Windows 7 to Windows 10.

If you try this out and have a problem you can private msg (email me) and I’ll see if I can help.
Brian

3 Likes

You can also download the latest Windows 10 ISO for free from Microsoft. I think it gives you 30 days of use or something, before it starts nagging and turns your Windows background into a black image (and forbid changes in some other configuration).

There is also the option to switch to Windows Insider. You exchange your privacy altogether into using Windows for free.

A final option is to find a Windows build that is aimed at VMs. At least some time ago, Microsoft used to give such images and they would expire in a few months or so. Most likely they were specific VM images but it is worth researching.

Thanks Simos!

Simos could you give me a procedure to setup win10 in container?

You’d need to use a LXD VM rather than a container, take a look the “Running Windows” section of Running virtual machines with LXD 4.0

I have followed this guide and facing this error when start the container vm. What is the issue?

root@lxd1:~# lxc start win10 --console
Error: Failed to run: forklimits limit=memlock:unlimited:unlimited – /snap/lxd/20115/bin/qemu-system-x86_64 -S -name win10 -uuid ce3d79fe-c3df-4338-aaf3-c61b982392b9 -daemonize -cpu host -nographic -serial chardev:console -nodefaults -no-reboot -no-user-config -sandbox on,obsolete=deny,elevateprivileges=allow,spawn=deny,resourcecontrol=deny -readconfig /var/snap/lxd/common/lxd/logs/win10/qemu.conf -pidfile /var/snap/lxd/common/lxd/logs/win10/qemu.pid -D /var/snap/lxd/common/lxd/logs/win10/qemu.log -chroot /var/snap/lxd/common/lxd/virtual-machines/win10 -smbios type=2,manufacturer=Canonical Ltd.,product=LXD -runas lxd -drive file=/home/naztech/Downloads/Win.iso,index=0,media=cdrom,if=ide -drive file=/home/naztech/Downloads/virtio-win-0.1.173.iso,index=1,media=cdrom,if=ide: char device redirected to /dev/pts/3 (label console)
: Process exited with a non-zero value
Try lxc info --show-log win10 for more info

Did you capture the output of lxc info --show-log win10 ?

Also please show lxc config show <instance> --expanded

Sorry here is the latest error

root@lxd1:~# lxc start win10 --console
To detach from the console, press: +a q
BdsDxe: failed to load Boot0001 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x1): Not Found

Start PXE over IPv4.
PXE-E16: No valid offer received.
BdsDxe: failed to load Boot0002 “UEFI PXEv4 (MAC:00163E622210)” from PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x0)/MAC(00163E622210,0x1)/IPv4(0.0.0.0,0x0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0): Not Found

Start PXE over IPv6.
PXE-E16: No valid offer received.
BdsDxe: failed to load Boot0003 “UEFI PXEv6 (MAC:00163E622210)” from PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x0)/MAC(00163E622210,0x1)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000,0x0,Static,0000:0000:0000:0000:0000:0000:0000:0000,0x40,0000:0000:0000:0000:0000:0000:0000:0000): Not Found

Start HTTP Boot over IPv4…
Error: Could not retrieve NBP file size from HTTP server.

Error: Server response timeout.
BdsDxe: failed to load Boot0004 “UEFI HTTPv4 (MAC:00163E622210)” from PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x0)/MAC(00163E622210,0x1)/IPv4(0.0.0.0,0x0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0)/Uri(): Not Found

Start HTTP Boot over IPv6.
Error: Could not retrieve NBP file size from HTTP server.

Error: Unexpected network error.
BdsDxe: failed to load Boot0005 “UEFI HTTPv6 (MAC:00163E622210)” from PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x0)/MAC(00163E622210,0x1)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000,0x0,Static,0000:0000:0000:0000:0000:0000:0000:0000,0x40,0000:0000:0000:0000:0000:0000:0000:0000)/Uri(): Not Found
BdsDxe: loading Boot0006 “EFI Internal Shell” from Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)
BdsDxe: starting Boot0006 “EFI Internal Shell” from Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)

UEFI Interactive Shell v2.2
EDK II
UEFI v2.70 (EDK II, 0x00010000)
Mapping table
BLK0: Alias(s):
PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x1)
Press ESC in 1 seconds to skip startup.nsh or any other key to continue.
Shell>

root@lxd1:~# lxc config show win10 --expanded
architecture: x86_64
config:
limits.cpu: “4”
limits.memory: 4GB
raw.apparmor: /home/** rwk,
raw.qemu: -drive file=/home/naztech/Downloads/Win10.iso,index=0,media=cdrom,if=ide
-drive file=/home/naztech/Downloads/virtio-win-0.1.173.iso,index=1,media=cdrom,if=ide
security.secureboot: “false”
volatile.eth0.host_name: tapd67edba1
volatile.eth0.hwaddr: 00:16:3e:62:22:10
volatile.last_state.power: RUNNING
volatile.uuid: ce3d79fe-c3df-4338-aaf3-c61b982392b9
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
root:
path: /
pool: mypool
size: 100GB
type: disk
ephemeral: false
profiles:

  • default
    stateful: false
    description: “”

lxc list shows vm running. Is it ok? if ok how can I access it without IP or Setup?

You have raw.qemu which is not mentioned in the “Running Windows” section steps here Running virtual machines with LXD 4.0, please can you try with a fresh VM and follow the steps, and let me know if it still doesn’t work.

Thanks

I have follow bellow steps. Is this step ok? Then I ma trying again. If not ok then which is the change ?

The basic steps are:

  • Grab a Windows ISO image from Microsoft
  • Install distrobuilder: snap install distrobuilder --classic
  • Repack your ISO with: distrobuilder repack-windows /path/to/iso win.iso
  • Create an empty VM with beefier CPU/RAM and SecureBoot disabled:
    lxc init win10 --empty --vm -c security.secureboot=false -c limits.cpu=4 -c limits.memory=4GB
  • Grow its root disk to a reasonable size:
    lxc config device override win10 root size=20GB
  • Add the ISO as boot drive:
    lxc config device add win10 install disk source=/path/to/win.iso boot.priority=10
  • Start the VM: lxc start win10 --console
  • Repeatedly hit ESC in that console (even before any output) to enter the firmware menu.
  • Select Boot Manager and then the QM00001 drive. Then hit ENTER a few times to answer an invisible boot prompt.
  • Disconnect using ctrl+a-q
  • Use the VGA console with lxc console win10 --type=vga, you’ll see the installer boot
  • Once installed you can remove the install drive with:
    lxc config device remove win10 install
  • Boot the system to confirm it all works, install all the other drivers from the virtio drive, then run the Windows sysprep tool
  • Finally publish your VM as an image with:
    lxc publish win10 --alias win10

Where did this part of your config (lxc config show <instance> --expanded) come from? I can’t see it mentioned in those steps, which leads me to think it may be causing the problem.

@monstermunchkin any ideas with this, as you’ve used Windows with LXD more than I have :slight_smile:

We don’t need raw.qemu here anymore. Instead, we use lxc config device add win10 install disk source=/path/to/win.iso boot.priority=10.

2 Likes

root@lxd1:~# ll /path/to/
total 4784268
drwxr-xr-x 2 root root 4096 Apr 21 06:21 ./
drwxr-xr-x 3 root root 4096 Apr 21 06:20 …/
-rwxrwxrwx 1 root root 4899078144 Apr 19 06:40 win.iso*

lxc init win10 --empty --vm -c security.secureboot=false -c limits.cpu=4 -c limits.memory=4GB
lxc config device override win10 root size=100GB
lxc config device add win10 install disk source=/path/to/win.iso boot.priority=10
lxc start win10 --console

l2

There is no “QM00001” drive. Now?

@monstermunchkin @tomp

Have you tried without hitting ESC, and just simply let it boot?

after run lxc start win10 --console this command I am pressing Esc button repeatedly then the firmware box appear

Try NOT hitting ESC.

root@lxd1:~# lxc start win10 --console
To detach from the console, press: +a q
BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x1)
BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x1)
Press any key to boot from CD or DVD…

BdsDxe: failed to start Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x1): Time out
BdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x1,0x1): Not Found

Start PXE over IPv4.
PXE-E16: No valid offer received.
BdsDxe: failed to load Boot0003 “UEFI PXEv4 (MAC:00163EE8FC68)” from PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x0)/MAC(00163EE8FC68,0x1)/IPv4(0.0.0.0,0x0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0): Not Found

Start PXE over IPv6.
PXE-E16: No valid offer received.
BdsDxe: failed to load Boot0004 “UEFI PXEv6 (MAC:00163EE8FC68)” from PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x0)/MAC(00163EE8FC68,0x1)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000,0x0,Static,0000:0000:0000:0000:0000:0000:0000:0000,0x40,0000:0000:0000:0000:0000:0000:0000:0000): Not Found

Start HTTP Boot over IPv4…
Error: Could not retrieve NBP file size from HTTP server.

Error: Server response timeout.
BdsDxe: failed to load Boot0005 “UEFI HTTPv4 (MAC:00163EE8FC68)” from PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x0)/MAC(00163EE8FC68,0x1)/IPv4(0.0.0.0,0x0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0)/Uri(): Not Found

Start HTTP Boot over IPv6.
Error: Could not retrieve NBP file size from HTTP server.

Error: Unexpected network error.
BdsDxe: failed to load Boot0006 “UEFI HTTPv6 (MAC:00163EE8FC68)” from PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x0)/MAC(00163EE8FC68,0x1)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000,0x0,Static,0000:0000:0000:0000:0000:0000:0000:0000,0x40,0000:0000:0000:0000:0000:0000:0000:0000)/Uri(): Not Found
BdsDxe: loading Boot0007 “EFI Internal Shell” from Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)
BdsDxe: starting Boot0007 “EFI Internal Shell” from Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)
UEFI Interactive Shell v2.2
EDK II
UEFI v2.70 (EDK II, 0x00010000)
Mapping table
FS0: Alias(s):CD0a1b:;BLK2:
PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x1)/CDROM(0x1)
FS1: Alias(s):F0a1:;BLK3:
PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x1)/VenMedia(C5BD4D42-1A76-4996-8956-73CDA326CD0A)
BLK0: Alias(s):
PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x1)
BLK1: Alias(s):
PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x1)/CDROM(0x0)
BLK4: Alias(s):
PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x1,0x1)

Press ESC in 1 seconds to skip startup.nsh or any other key to continue.
Shell>

DId you do that? The next line (“…: Time out”) suggests you didn’t.