Running Windows 8.1 inside an lxc Container Part 3 (Success!)
Get Windows 8.1 running inside an LXC Container in this successful guide.
![Running Windows 8.1 inside an lxc Container Part 3 (Success!)](/content/images/size/w2000/2023/06/Screenshot_2023-06-30_18-01-06.png)
In the last two attempts none of the guides have worked. Firstly running Windows 10 inside an lxc container via the Ubuntu guide failed. Next attempting to run rufus inside wine (which has older images of windows - also failed.) Windows simply does not play nice with linux whatsoever and basically works hard to make sure you either have windows on your machine enabled with a manufacturers secure boot registered machine - or you are on your own.
In this next attempt we have found that you can download Windows 8.1 .iso image from here - which we will try a standard Ubuntu guide for again. To double-troubleshoot we will try both the 32-bit and 64-bit install CD-ROM' iso. We will try both distro-builder images and just standard .iso images.
- Check here for the basics of installing lxc, then create your two containers:
lxc init win8-32 --vm --empty
lxc init win8-64 --vm --empty
- Resize the drives to 50GB or something minimal:
lxc config device override win8-32 root size=50GB
lxc config device override win8-64 root size=50GB
- We will add vtpm (Trusted Platform Module) to both:
lxc config device add win8-32 vtpm tpm path=/dev/tmp0
lxc config device add win8-64 vtpm tpm path=/dev/tmp0
- We will just try standard .iso's and see if they work to start:
lxc config device add win8-32 cdrom disk source=/q2/qemu/win/Win8.1_English_x32.iso boot.priority=10
lxc config device add win8-64 cdrom disk source=/q2/qemu/win/Win8.1_English_x64.iso boot.priority=10
We can inspect our containers now:
![](https://www.thinkmelt.com/content/images/2023/06/image-71.png)
Finally success! win8-64 took no distrobuilder required - it just worked - or does it??
- Just as it boots it will ask 'Press any Key to Boot from CDROM'
![](https://www.thinkmelt.com/content/images/2023/06/image-72.png)
Although it did boot it still failed - it is looking for drivers.
![](https://www.thinkmelt.com/content/images/2023/06/image-73.png)
Attempting to pack drivers in but! distrobuilder only supports the latest versions:
sudo distrobuilder repack-windows --windows-version 8.1 Win8.1_English_x64.iso win64.iso
Error: Version must be one of [w11 w10 2k19 2k12 2k16 2k22]
So try windows 10 - it might work.
sudo distrobuilder repack-windows --windows-version w10 Win8.1_English_x64.iso win64.iso
Now we will build it back into the lxc image:
lxc config device add win8-64 cdrom disk source=/q2/qemu/win/win64.iso boot.priority=10
After this point you would require a legitimate windows 8 but it would theoretically work:
![](https://www.thinkmelt.com/content/images/2023/06/image-74.png)
For our instance we only need windows temporarily to run a single application for training and therefore we will continue to see if there is a way to do this. There are VM images but they again do not seem to be designed to run inside windows.