Closed mdomasevicius closed 2 years ago
Another approach is to mount VHD's root fs in Linux, and do all commands inside jail. Will try to check if it works.
It works. I was able to run shell, programs, network also works.
sudo guestmount -a /media/zensey/3096EB5796EB1BDA/Users/user/Downloads/Myst.HyperV.Alpine-0.67.3\ —\ копия/Myst\ HyperV\ Alpine/Virtual\ Hard\ Disks/Myset\ HyperV\ Alpine.vhdx -m /dev/sda3 /mnt/vhd2
sudo mount --bind /dev /mnt/vhd2/dev
cp -Lf /etc/resolv.conf /mnt/vhd2/etc/
sudo chroot /mnt/vhd2 /bin/bash
Also I found out that QEMU image can be converted into VHDX image, so image build can be built from scratch using automation. For example we can boot QEMU with serial console and interact with VM using expect script.
QEMU approach works. See https://github.com/mysteriumnetwork/hyperv-myst-provision/pull/13
@mdomasevicius Can it be closed?
hyper-v in hyper-v is possible, but the machines in GitHub actions do not support it ( https://github.com/actions/virtual-environments/issues/183 ). I also tried enabling the hyper-v feature in the action but it also does not work as a restart would be required but it is not possible.