title: How to enable AVX / AVX2 in VirtualBox 6.1.16 with Ubuntu 20.04 64bit?
body: <h3>TL;DR:</h3>
  <ul>
  <li>Tensorflow 1.15 crashes on my virtual machine when imported by Python (error message is <code>Illegal instruction (core dumped)</code>), very probably thanks to AVX and AVX2 being disabled on it.</li>
  <li>My host machine (Windows 10 64bit) <strong>has</strong> AVX and AVX2 (validated using Cygwin, see more details below) [CPU is Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz]</li>
  <li>On guest machine (Ubuntu 20.04 64bit using VirtualBox 6.1.16, same happens with 18.04), AVX and AVX2 are missing.</li>
  <li>Following advice from existing threads, I ran <code>VBoxManage setextradata &quot;Ubuntu20&quot; VBoxInternal/CPUM/IsaExts/AVX 1</code> and <code>VBoxManage setextradata &quot;Ubuntu20&quot; VBoxInternal/CPUM/IsaExts/AVX2 1</code> on the host machine and restarted the guest machine - nothing changed (the guest machine's name is Ubuntu20).</li>
  </ul>
  <p>any advice?</p>
  <h2>For more details:</h2>
  <p>Output of <code>cat /proc/cpuinfo</code> on the host machine using Cygwin - it has avx in avx2:</p>
  <pre><code>.....
  processor       : 7
  vendor_id       : GenuineIntel
  cpu family      : 6
  model           : 158
  model name      : Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
  stepping        : 9
  cpu MHz         : 3600.000
  cache size      : 256 KB
  fpu             : yes
  fpu_exception   : yes
  cpuid level     : 22
  wp              : yes
  flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts
   acpi mmx fxsr sse sse2 ss ht tm pbe pni dtes64 est tm2 ssse3 fma cx16 xtpr pdcm sse4_1 sse4_2 movbe 
  popcnt aes xsave osxsave avx f16c rdrand hypervisor lahf_lm ida xsaveopt pln pts dtherm fsgsbase 
  tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt
  TLB size        : 0 4K pages
  clflush size    : 64
  cache_alignment : 64
  address sizes   : 39 bits physical, 48 bits virtual
  power management:
  </code></pre>
  <p>Output of <code>cat /proc/cpuinfo</code> on the guest machine - avx and avx2 are missing:</p>
  <pre><code>processor   : 0
  vendor_id   : GenuineIntel
  cpu family  : 6
  model       : 158
  model name  : Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
  stepping    : 9
  microcode   : 0xffffffff
  cpu MHz     : 3599.996
  cache size  : 8192 KB
  physical id : 0
  siblings    : 1
  core id     : 0
  cpu cores   : 1
  apicid      : 0
  initial apicid  : 0
  fpu     : yes
  fpu_exception   : yes
  cpuid level : 22
  wp      : yes
  flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx 
  fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid 
  tsc_known_freq pni ssse3 pcid sse4_1 sse4_2 hypervisor lahf_lm invpcid_single pti fsgsbase invpcid 
  md_clear flush_l1d arch_capabilities
  bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
  bogomips    : 7199.99
  clflush size    : 64
  cache_alignment : 64
  address sizes   : 39 bits physical, 48 bits virtual
  power management:
  </code></pre>