Ubuntu on Windows 10¶
Enable Hyper-V¶
Enable Hyper-V to create virtual machines on Windows 10
Create Virtual Machine¶
Open Hyper-V Quick Create from the start menu.
Select Ubuntu 18.04 LTS operating system
Create virtual computer
Edit the configuration
Increase the disk size
Connect..
..and start virtual appliance
Choose language,
keyboard layout,
timezone,
and user settings.
Warning
Don’t use automatic log in!
Log in, open a terminal
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:
Add a mount point for sharing
mkdir ~/shared-folder
Install cifs-utils
sudo apt-get install cifs-utils
Mount the shared folder
sudo mount.cifs //<windows-hostname>/<windows-shared-folder> ~/shared-folder -o user=<windows-username>,uid=$(id -u),gid=$(id -g)
Copy <deploy> to host (-L follow symbolic links in SOURCE)
cp -RL <deploy-folder>/. ~/shared-folder