Ubuntu on Windows 10

Enable Hyper-V

  1. Enable Hyper-V to create virtual machines on Windows 10

    See Install Hyper-V on Windows 10

Create Virtual Machine

  1. Open Hyper-V Quick Create from the start menu.

  2. Select Ubuntu 18.04 LTS operating system

  3. Create virtual computer

  4. Edit the configuration

  5. Increase the disk size

  6. Connect..

  7. ..and start virtual appliance

  8. Choose language,

  9. keyboard layout,

  10. timezone,

  11. and user settings.


    Don’t use automatic log in!

  12. Log in, open a terminal

  13. and update apt

    sudo apt update

Change partition size

Install gparted - sudo apt install gparted


Start gparted - sudo gparted


Resize /dev/sda1 partition:


Image Deployment

After a Yocto build is complete, the created images and files are stored in a <deploy> directory. The target usually is programmed with these files over USB. Unfortunately USB pass-through between host and a Hyper-V guest is not supported by default. Programming a target should therefore be done from the Windows host. The data built on a virtual machine has to be shared to the host. One possible approach is shown here.

On your Windows host:

Add a network share - e.g. \\<windows-hostname>\<windows-shared-folder>

On your Ubuntu machine:

  1. Add a mount point for sharing

    mkdir ~/shared-folder
  2. Install cifs-utils

    sudo apt-get install cifs-utils
  3. Mount the shared folder

    sudo mount.cifs //<windows-hostname>/<windows-shared-folder> ~/shared-folder -o user=<windows-username>,uid=$(id -u),gid=$(id -g)
  4. Copy <deploy> to host (-L follow symbolic links in SOURCE)

    cp -RL <deploy-folder>/. ~/shared-folder