Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:guide-user:virtualization:vmware [2018/03/03 20:55] – ↷ Page moved from docs:user-guide:virtualization:vmware to docs:guide-user:virtualization:vmware bobafetthotmaildocs:guide-user:virtualization:vmware [2024/02/29 22:08] (current) – [Things you need] frkca
Line 1: Line 1:
- 
- 
 ====== OpenWrt on VMware HowTo ====== ====== OpenWrt on VMware HowTo ======
  
-This article describes how to use OpenWRT as a virtual machine with VMware virtualization.+This article describes how to use OpenWrt as a virtual machine with VMware virtualization.
  
 ===== Tested with ===== ===== Tested with =====
Line 9: Line 7:
   * Barrier Breaker 14.07 in combination with VMware ESXi 5.5 Update 2 Build 2068190   * Barrier Breaker 14.07 in combination with VMware ESXi 5.5 Update 2 Build 2068190
   * Chaos Calmer 15.05.1 with VMware Fusion and vSphere ESXi 6.0   * Chaos Calmer 15.05.1 with VMware Fusion and vSphere ESXi 6.0
 +  * 19.07.0-rc2 in combination with VMware ESXi 6.7.0 Update 2 Build 13981272
 +  * 19.07.5 in combination with VMware ESXi 6.7.0 Update 2 Build 16713306
 +  * 21.02.0-rc3 on a VMware vSphere Client version 6.7.0.42000 machine 
 +  * 23.05.2 on a VMware vSphere VM VMware ESXi, 6.7.0, 20497097 
  
 ==== Things you need ==== ==== Things you need ====
  
-  * https://downloads.openwrt.org/barrier_breaker/14.07/x86/generic/openwrt-x86-generic-combined-ext4.img.gz or +  * [[https://downloads.openwrt.org/barrier_breaker/14.07/x86/generic/openwrt-x86-generic-combined-ext4.img.gz]] or 
-  * https://downloads.openwrt.org/chaos_calmer/15.05/x86/64/openwrt-15.05-x86-64-combined-ext4.img.gz+  * [[https://downloads.openwrt.org/chaos_calmer/15.05/x86/64/openwrt-15.05-x86-64-combined-ext4.img.gz]]
   * Linux machine with qemu-utils & gunzip installed or OS X machine with qemu installed (via [[http://brew.sh|Homebrew]])   * Linux machine with qemu-utils & gunzip installed or OS X machine with qemu installed (via [[http://brew.sh|Homebrew]])
   * Hypervisor with VMware ESXi, Fusion, Player, or Workstation installed    * Hypervisor with VMware ESXi, Fusion, Player, or Workstation installed 
Line 47: Line 49:
 </code> </code>
  
-On Fusion I had to use the IDE drive controller type.+On Fusion I had to use the IDE drive controller type. This also applies to recent ESXi versions, just switch the Virtual Device Node from default SCSI controller 0 to IDE 0. Also, recent OpenWRT and ESXi versions do support running VMXNET3 virtual NIC so you can achieve 10GE speeds
  
 ===== Quick Start ===== ===== Quick Start =====
  
 Follow these steps to get an Up to Date VM with the latest code running on ESX in 15 minutes: Follow these steps to get an Up to Date VM with the latest code running on ESX in 15 minutes:
-  - you can download an OVA image from the following location: [[https://dl.dropboxusercontent.com/u/7976972/openwrt15cc.ova|https://dl.dropboxusercontent.com/u/7976972/openwrt15cc.ova]] +  - you can download an OVA image from the following location: [[https://www.dropbox.com/s/ao805tl33mqe0an/openwrt15cc.ova|https://www.dropbox.com/s/ao805tl33mqe0an/openwrt15cc.ova]]\\ This image was made by Iben in September 2015 based on a July build of CHAOS CALMER 15.05 trunk r46767 
-  - This image was made by Iben in September 2015 based on a July build of CHAOS CALMER 15.05 trunk r46767 +  - Import the OVA to VMware ESXi (tested with latest version 6 in July 2016)\\ The base image only has 1 virtual NIC setup with DHCP
-  - Import the OVA to VMware ESXi (tested with latest version 6 in July 2016)  +
-  - The base image only has 1 virtual NIC setup with DHCP+
   - Power on the VM - observe the MAC Address - find that on you DHCP server   - Power on the VM - observe the MAC Address - find that on you DHCP server
-  - Confirm the OpenWRT VM's IP address by opening the console +  - Confirm the OpenWrt VM's IP address by opening the console 
   - Press enter to get a prompt   - Press enter to get a prompt
-  - Type ifconfig | more to see the DHCP assigned IP address for the Bridge assigned to the NIC +  - Type ''ifconfig | more'' to see the DHCP assigned IP address for the Bridge assigned to the NIC 
-  - If you don't have a DHCP server on your network you can set the IP Address manually: +  - If you don't have a DHCP server on your network you can set the IP Address manually: ''vi /etc/config/network''\\ The whole goal here is to get the OpenWrt VM on the network so you can hit the LuCI Web User Interface with a web browser. This way we can update the base image.
-  - vi /etc/config/network +
-  - The whole goal here is to get the OpenWRT VM on the network so you can hit the LuCI Web User Interface with a web browser. This way we can update the base image.+
   - Once you've logged in to the LuCI web interface set a root password so you can ssh in   - Once you've logged in to the LuCI web interface set a root password so you can ssh in
-  - With the Web UI navigate to the System/Flash Operations page and find this text: +  - With the Web UI navigate to the System/Flash Operations page and find this text: //Flash new firmware image - Upload a sysupgrade-compatible image here to replace the running firmware//. Check "Keep settings" to retain the current configuration (requires an OpenWrt compatible firmware image). 
-  - Flash new firmware image - Upload a sysupgrade-compatible image here to replace the running firmware. Check "Keep settings" to retain the current configuration (requires an OpenWrt compatible firmware image). +  - On your admin system with the web browser download the latest file to prepare for the flash upgrade of OpenWrt[[https://downloads.openwrt.org/chaos_calmer/15.05.1/x86/generic/openwrt-15.05.1-x86-generic-combined-ext4.img.gz]]  <-- this was the most current available from [[https://downloads.openwrt.org/]] dated 16 March 2016 (last checked 11 Sept 2016) 
-  - On your admin system with the web browser download the latest file to prepare for the flash upgrade of OpenWRT: https://downloads.openwrt.org/chaos_calmer/15.05.1/x86/generic/openwrt-15.05.1-x86-generic-combined-ext4.img.gz  <-- this was the most current available from https://downloads.openwrt.org/ dated 16 March 2016 (last checked 11 Sept 2016) +  - Then upload that to your running OpenWrt system and click "Flash Image..."
-  - Then upload that to your running OpenWRT system and click "Flash Image..."+
   - Reboot and login again.   - Reboot and login again.
-  - Current latest version is: BusyBox v1.23.2 (2016-01-02 14:04:44 CET) built-in shell (ash) CHAOS CALMER (15.05.1, r48532) +  - Now you can add the second NIC to use the OpenWrt VM as a WAN router. I set mine up with both DHCP and Static IP addresses for the WAN - and the LAN interface was configured as a DHCP server.
-  - Now you can add the second NIC to use the OpenWRT VM as a WAN router. I set mine up with both DHCP and Static IP addresses for the WAN - and the LAN interface was configured as a DHCP server.+
   - To prepare for testing: install iperf3 and nmap from the System/Software page of the Web UI.   - To prepare for testing: install iperf3 and nmap from the System/Software page of the Web UI.
   - See the testing section below for details...   - See the testing section below for details...
-  - That's pretty much it. I'm very happy with this new setup.  I was also looking at M0n0wall (monowall), and pfsense to run as VMs but OpenWRT has a lot more going for it as far as an Open Source eco-system and developer/vendor support.+  - That's pretty much it. I'm very happy with this new setup.  I was also looking at M0n0wall (monowall), and pfsense to run as VMs but OpenWrt has a lot more going for it as far as an Open Source eco-system and developer/vendor support.
  
 ==== Testing ==== ==== Testing ====
  
-  - Start the server on OpenWRT: iperf3 -s  +  - Start the server on OpenWrt''iperf3 -s''  
-  - Download the iperf3 binaries for various Operating Systems from here: https://iperf.fr/iperf-download.php+  - Download the iperf3 binaries for various Operating Systems from here: [[https://iperf.fr/iperf-download.php]]
   - Then install and run the client on other machines on your network.   - Then install and run the client on other machines on your network.
-  - iperf3 -c <ip-address-of-the-server> +  - ''iperf3 -c <ip-address-of-the-server>''
-  - Here are some results from my system: +
-  - 2012 MacBook with 802.11n on 5GHz --> 284 Mbits/sec +
-  - 2011 MacMini with CentOS 7.1 --> 958 Mbits/sec +
-  - Ubuntu VM running on same old Dell T110 ESXi host and OpenWRT VM --> 4.14 Gbits/sec +
  
-As you can see - the OpenWRT virtual machine running on VMware ESX is very capable of keeping up with your home internet router needs! And this is with only 1 virtual CPU and no tuning at all.+Here are some results from my system: 
 +    * 2012 MacBook with 802.11n on 5GHz --> 284 Mbits/sec 
 +    * 2011 MacMini with CentOS 7.1 --> 958 Mbits/sec 
 +    * Ubuntu VM running on same old Dell T110 ESXi host and OpenWrt VM --> 4.14 Gbits/sec  
 + 
 +As you can see - the OpenWrt virtual machine running on VMware ESX is very capable of keeping up with your home internet router needs! And this is with only 1 virtual CPU and no tuning at all.
  
 ==== ToDo List ==== ==== ToDo List ====
  
-Here's a wish list of things we would like to accomplish with OpenWRT - consider this technical debt. +Here's a wish list of things we would like to accomplish with OpenWrt - consider this technical debt. 
  
 (Is there a better place to make these requests?) (Is there a better place to make these requests?)
  
-  - install open-vm-tools to enhance support on VMware hypervisors+  - install open-vm-tools to enhance support on VMware hypervisors (possible via packages sources and LuCI or opkg)
   - use vmxnet3 paravirtualized network interface    - use vmxnet3 paravirtualized network interface 
   - learn how to create fresh builds from scratch   - learn how to create fresh builds from scratch
Line 101: Line 98:
   - create jenkins job as part of CI to download and convert the raw image to qcow2 with each build   - create jenkins job as part of CI to download and convert the raw image to qcow2 with each build
   - do these conversions for both stable and trunk   - do these conversions for both stable and trunk
-  - integrate OpenWRT into the CI Pipeline for other network testing projects like OPNFV+  - integrate OpenWrt into the CI Pipeline for other network testing projects like OPNFV
  
 ===== Disk Size Issues ===== ===== Disk Size Issues =====
  
 Disk size and problems with veeam backup and enlarging the disk Disk size and problems with veeam backup and enlarging the disk
-Veeam backup and vmware will complain about the size of the virtual disk provided by the openwrt download+Veeam backup and VMware will complain about the size of the virtual disk provided by the OpenWrt download
 because the disk is not multiple of 1KB. (this means: no backups available, and could be crucial because the disk is not multiple of 1KB. (this means: no backups available, and could be crucial
 in production environments) in production environments)
  
-Vmware won't let you enlarge the disk in the normal way, so one simple way is: +VMware won't let you enlarge the disk in the normal way, so one simple way is: 
-<file> + 
-make a snapshot of the vm, for possible rollback +  make a snapshot of the vm, for possible rollback 
-move the original disk (from openwrt downloads) on ide 0:1 +  move the original disk (from OpenWrt downloads) on ide 0:1 
-add a new disk, with a whole size, like 128 MB , on ide 0:0 +  add a new disk, with a whole size, like 128 MB , on ide 0:0 
-use sysrescuecdiso +  use ''sysrescuecdiso'' 
-start the vm with the iso +  start the vm with the iso 
-with dd copy the disc on ide 0:1 to ide 0:0 like +  with dd copy the disc on ide 0:1 to ide 0:0 like ''dd if=/dev/sdb of=/dev/sda'' 
-dd if=/dev/sdb of=/dev/sda +  enter ''fdisk /dev/sda'' and write the partition table (without making changes, this helps sysrescuecd to see the partitions properly) 
-enter fdisk /dev/sda and write the partition table +  do ''fsck -f'' on the sda2 partition 
-(without making changes, this helps sysrescuecd to see the partitions properly) +  with ''fdisk'' resize the sda2 partition to occupy all the space available (but still starting with the same sector of before, normally 9135) 
-do fsck -f on the sda2 partition +  use ''resize2fs /dev/sda2'' 
-with fdisk resize the sda2 partition to occupy all the space available  +  do ''fsck -f /dev/sda2'' 
-(but still starting with the same sector of before, normally 9135) +  restart the machine and boot with OpenWrt check that the system uses the new partition 
-use resize2fs /dev/sda2 +  stop the machine, delete the previous hd (with less than 128MB
-do fsck -f /dev/sda2 +  restart the machine and verify that everything is ok. 
-restart the machine and boot with openwrt check that the system uses the new partition +
-stop the machine, delete the previous hd (with less than 128mb+
-restart the machine and verify that everything is ok. +
-</file>+
  
 ===== Community ===== ===== Community =====
Line 144: Line 138:
 </html> </html>
  
 +==== Upgrade to 19.07.5 from ova ====
 +
 +  - Create a snapshot from ESXI UI to allow easy rollback in case of issues
 +  - Use the following image from LuCi: https://downloads.openwrt.org/releases/19.07.5/targets/x86/generic/openwrt-19.07.5-x86-generic-combined-squashfs.img.gz
 +  - You should be able to access console from ESXI, but no IPv4 network will be available
 +  - Beware of keyboard layout of the console which is qwerty, type ifconfig and find IPv6 address
 +  - From LuCi, go to Network/Interface and click edit on br-lan without doing any change, and save. The configuration will be automatically fixed.
 +  - Reboot your OpenWRT VM, you should then get the IPv4 address back.
 +
 +Here is an upgraded OVA VM export with version 19.07.5, using ext4 instead of squashfs and an extended /overlay filesystem, with DHCP enabled instead of a static IP for br-lan interface: https://www.dropbox.com/s/4b0dy8d8iqf8a91/OpenWRT_x86_64_19.07.05.ova?dl=0
  
 ---- ----
 +
 +==== Upgraded/Updated OVA for OpenWRT21 ====
 +
 +After import of the previous OVA-file to VMware Sphere, I was able to upgrade to the latest OpenWrt version (21-00-RC3).
 +
 +This machine, //OpenWRT-21// has
 +  * 2 CPU
 +  * 2 GB
 +  * 2 NiCs 
 +    * WAN defined as DHCP client
 +    * LAN static address 192.168.1.1 as DHCP server
 +  * Compatibility ESXi 5.0 and later (VM version 8)
 +  * Installed VMware tools, as well as vnet drivers
 +
 +<WRAP center round download 60%>
 +https://www.dropbox.com/s/nljp8todp99qggn/OpenWRT21.ova
 +</WRAP>
 +
 +
  
 ==== Example Issues seen during VMWare Installs ==== ==== Example Issues seen during VMWare Installs ====
  • Last modified: 2018/03/03 20:55
  • by bobafetthotmail