.. _ubuntu_on_windows: Ubuntu on Windows 10 ==================== Enable Hyper-V -------------- #. Enable Hyper-V to create virtual machines on Windows 10 See `Install Hyper-V on Windows 10 `_ Create Virtual Machine ---------------------- #. Open Hyper-V Quick Create from the start menu. .. figure:: images/01.jpg :width: 30% :figwidth: 100% :align: left #. Select Ubuntu 18.04 LTS operating system .. figure:: images/02.jpg :width: 50% :figwidth: 100% :align: left #. Create virtual computer .. figure:: images/03.jpg :width: 50% :figwidth: 100% :align: left #. Edit the configuration .. figure:: images/05.jpg :width: 50% :figwidth: 100% :align: left #. Increase the disk size .. figure:: images/06.jpg :width: 50% :figwidth: 100% :align: left .. figure:: images/08.jpg :width: 50% :figwidth: 100% :align: left .. figure:: images/09.jpg :width: 50% :figwidth: 100% :align: left .. figure:: images/10.jpg :width: 50% :figwidth: 100% :align: left #. Connect.. .. figure:: images/12.jpg :width: 50% :figwidth: 100% :align: left #. ..and start virtual appliance .. figure:: images/14.jpg :width: 50% :figwidth: 100% :align: left .. figure:: images/15.jpg :width: 50% :figwidth: 100% :align: left #. Choose language, .. figure:: images/16.jpg :width: 50% :figwidth: 100% :align: left #. keyboard layout, .. figure:: images/17.jpg :width: 50% :figwidth: 100% :align: left #. timezone, .. figure:: images/18.jpg :width: 50% :figwidth: 100% :align: left #. and user settings. .. warning:: Don't use automatic log in! .. figure:: images/19.jpg :width: 50% :figwidth: 100% :align: left #. Log in, open a terminal .. figure:: images/20.jpg :width: 50% :figwidth: 100% :align: left #. and update apt .. prompt:: :prompts: $ sudo apt update Change partition size --------------------- Install gparted - **sudo apt install gparted** .. figure:: images/21.jpg :width: 50% :figwidth: 100% :align: left Start gparted - **sudo gparted** .. figure:: images/22.jpg :width: 50% :figwidth: 100% :align: left Resize ``/dev/sda1`` partition: .. figure:: images/23.jpg :width: 50% :figwidth: 100% :align: left .. figure:: images/24.jpg :width: 50% :figwidth: 100% :align: left Image Deployment ---------------- After a Yocto build is complete, the created images and files are stored in a 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. ``\\\`` **On your Ubuntu machine:** #. Add a mount point for sharing .. prompt:: :prompts: $ mkdir ~/shared-folder #. Install cifs-utils .. prompt:: :prompts: $ sudo apt-get install cifs-utils #. Mount the shared folder .. prompt:: :prompts: $ sudo mount.cifs /// ~/shared-folder -o user=,uid=$(id -u),gid=$(id -g) #. Copy to host (-L follow symbolic links in SOURCE) .. prompt:: :prompts: $ cp -RL /. ~/shared-folder