Skip to content

Instantly share code, notes, and snippets.

@nordineb
Forked from gbraad/README.md
Created February 19, 2020 08:46
Show Gist options
  • Save nordineb/826dd1c5d7399769d3f34539d6688eed to your computer and use it in GitHub Desktop.
Save nordineb/826dd1c5d7399769d3f34539d6688eed to your computer and use it in GitHub Desktop.
Minishift on Qemu with Windows Hypervisor Platform accelerator support

Minishift on Qemu with Windows Hypervisor Platform accelerator support

Requirements

Windows 10 (updated after april 2018) with Hyper-V enabled. Download the Qemu binary from https://shadycode.com/qemu-binaries-for-windows-64-bit-with-hyper-v-and-haxm-support/ Note: build instructions are here: https://shadycode.com/how-to-build-qemu-with-hyper-v-acceleration-msys2/

Usage

Administrator command prompt

C:\>qemu-system-x86_64.exe -smp 2 -m 4096 -cdrom minishift-centos7.iso -display sdl -machine q35 -accel whpx -net nic -net user,hostfwd=tcp::10022-:22
Windows Hypervisor Platform accelerator is operational

Login using root/centos:

C:\>ssh root@localhost -p 10022
The authenticity of host '[localhost]:10022 ([127.0.0.1]:10022)' can't be established.
ECDSA key fingerprint is SHA256:u6D3acmCLTvJPxZkGN/yeEpL14r1lrEY+BSotymAJ90.
Are you sure you want to continue connecting (yes/no)?
Warning: Permanently added '[localhost]:10022' (ECDSA) to the list of known hosts.
root@localhost's password:
[root@localhost ~]# ip a show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global noprefixroute dynamic eth0
       valid_lft 86126sec preferred_lft 86126sec
    inet6 fec0::5054:ff:fe12:3456/64 scope site mngtmpaddr dynamic
       valid_lft 86127sec preferred_lft 14127sec
    inet6 fe80::5054:ff:fe12:3456/64 scope link
       valid_lft forever preferred_lft forever

You could target this VM with minishift --vm-driver generic. Note: generate keys with ssh-keygen.

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