Skip to content

Commit a7ddfe9

Browse files
committed
Workaround needed to run vPTX on an AMD CPU
We have to ask libvirt to use 'svm' instead of 'vmx' in box-building VM definition and Vagrantfile
1 parent 3b4a6a0 commit a7ddfe9

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

docs/caveats.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ You can change the license file parameters within a node definition or with **de
329329
(caveats-vptx)=
330330
## Juniper vPTX
331331

332-
* *netlab* release 1.7.0 supports only vJunosEvolved releases that do not require external PFE- and RPIO links. The first vJunosEvolved release implementing internal PFE- and RPIO links is the release 23.2R1-S1.8.
332+
* *netlab* supports only vJunosEvolved releases that do not require external PFE- and RPIO links. The first vJunosEvolved release implementing internal PFE- and RPIO links is the release 23.2R1-S1.8.
333+
* vJunosEvolved software is supposed to be run on an Intel CPU. _netlab_ implements the hacks [suggested by Juniper to run vJunos on an AMD CPU](https://www.juniper.net/documentation/us/en/software/nce/nce-510-virtual-switches-mist-cloud-managed/amd-cpu_unofficial_tweaks.html), but please note that this is not supported.
333334
* The virtual MAC address of the anycast gateway is ignored. _netlab_, therefore, does not support the anycast gateway on vPTX.
334335

335336
The rest of this section lists information you might find helpful if you're a long-time Junos user:

netsim/install/libvirt/vptx.xml.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@
1919
</features>
2020
<cpu>
2121
<arch>x86_64</arch>
22+
{% if 'amd' in cpu %}
23+
<feature policy='require' name='svm'/>
24+
{% else %}
2225
<model>IvyBridge</model>
26+
<feature name="vmx" policy="require"/>
27+
{% endif %}
2328
<topology cores="4" sockets="1" threads="1"/>
2429
<model fallback="allow">qemu64</model>
25-
<feature name="vmx" policy="require"/>
2630
</cpu>
2731
<clock offset="utc"/>
2832
<on_poweroff>destroy</on_poweroff>

netsim/templates/provider/libvirt/vptx-domain.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
domain.nested = true
1616
domain.cpu_mode = "custom"
1717
domain.cpu_model = "qemu64"
18+
{% if 'amd' in defaults.processor %}
19+
domain.cpu_feature :name => 'svm', :policy => 'require'
20+
{% else %}
1821
domain.cpu_feature :name => 'vmx', :policy => 'require'
22+
{% endif %}
1923
domain.sysinfo = {
2024
"bios": {
2125
"vendor": "Bochs",

0 commit comments

Comments
 (0)