summaryrefslogtreecommitdiffstats
path: root/docs/getting-started/machines/qemu.md
blob: 7bd14c099ae2a803658c68ec585c4975e5760859 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Building the AGL Demo Platform for QEMU

To build the QEMU version of the AGL demo platform use machine **qemux86-64** along with features **agl-demo** and **agl-devel**:

```bash
source meta-agl/scripts/aglsetup.sh -f -m qemux86-64 agl-demo agl-devel
bitbake agl-demo-platform
```

By default, the build will produce a compressed *vmdk* image in **tmp/deploy/images/qemux86-64/agl-demo-platform-qemux86-64.vmdk.xz**

## Deploying the AGL Demo Platform for QEMU

### Prepare an image for boot

Decompress the **agl-demo-platform-qemux86-64.vmdk.xz** image to prepare it for boot.

#### Linux

```bash
cd tmp/deploy/images/qemux86-64
xz -d agl-demo-platform-qemux86-64.vmdk.xz
```

#### Windows

Download [7-Zip](http://www.7-zip.org/) and select **agl-demo-platform-qemux86-64.vmdk.xz** to be decompressed.

## Boot an image

### QEMU

#### Install QEMU

**Note**: if an AGL crosssdk has been created, it will contain a qemu binary for the host system. This SDK qemu binary has no graphics support and cannot currently be used to boot an AGL image.

*Arch*:

```bash
sudo pacman -S qemu
```

*Debian/Ubuntu*:

```bash
sudo apt-get install qemu-system-x86
```

*Fedora*:

```bash
sudo yum install qemu-kvm
```

#### Boot QEMU

Boot the **agl-demo-platform-qemux86-64.vmdk** image in qemu with kvm support:

```bash
qemu-system-x86_64 -enable-kvm -m 2048 \
    -hda agl-demo-platform-qemux86-64.vmdk \
    -cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt \
    -vga virtio -show-cursor \
    -device virtio-rng-pci \
    -serial mon:stdio -serial null \
    -soundhw hda \
    -net nic,vlan=0 \
    -net user,hostfwd=tcp::2222-:22
```

### VirtualBox

#### Install VirtualBox

Download and install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) 5.2.0 or later.

#### Boot VirtualBox

Boot the **agl-demo-platform-qemux86-64.vmdk** image in VirtualBox:

* Start VirtualBox
* Click **New** to create a new machine
  * Enter **AGL QEMU** as the *Name*
  * Select **Linux** as the *Type*
  * Select **Other Linux (64-bit)** as the *Version*
  * Set *Memory size* to **2 GB**
  * Click **Use an existing virtual hard disk file** under *Hard disk*
        * Navigate to and select the **agl-demo-platform-qemux86-64.vmdk** image
* Ensure that the newly created **AGL QEMU** machine is highlighted and click **Start**

### VMWare Player

#### Install VMWare Player

Download and install [VMWare Player](https://www.vmware.com/products/player/playerpro-evaluation.html)

#### Boot VMWare Player

Boot the **agl-demo-platform-qemux86-64.vmdk** image in VMWare Player:

* Start VMWare Player
* Select **File** and **Create a New Virtual Machine**
  * Select **I will install the operating system later** and click **Next**
  * Select **Linux** as the *Guest Operating System*, **Other Linux 3.x kernel 64-bit** as the *Version*, and click **Next**
  * Enter **AGL QEMU** as the *Name* and click **Next**
  * Leave *disk capacity settings* unchanged and click **Next**
  * Click **Finish**
* Select/highlight **AGL QEMU** and click **Edit virtual machine settings**
  * Select/highlight **Memory** and click **2 GB**
  * Select/highlight **Hard Disk (SCSI)** and click **Remove**
  * Click **Add**
    * Select **Hard Disk** and click **Next**
    * Select **SCSI (Recommended)** and click **Next**
    * Select **Use an existing virtual disk** and click **Next**
    * Browse and select the **agl-demo-platform-qemux86-64.vmdk** image
    * Click **Finish**
    * Click **Keep Existing Format**
  * Click **Save**
* Ensure that the newly created **AGL QEMU** machine is highlighted and click **Power On**