User Tools

Site Tools


docs:guide-user:virtualization:vmware

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
docs:guide-user:virtualization:vmware [2018/03/03 20:55]
bobafetthotmail ↷ Page moved from docs:user-guide:virtualization:vmware to docs:guide-user:virtualization:vmware
docs:guide-user:virtualization:vmware [2018/05/13 09:44] (current)
tmomas formatting adjusted
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 12: Line 10:
 ==== 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 52: Line 50:
  
 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://​dl.dropboxusercontent.com/​u/​7976972/​openwrt15cc.ova|https://​dl.dropboxusercontent.com/​u/​7976972/​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?)
Line 101: Line 94:
   - 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 =====
docs/guide-user/virtualization/vmware.txt · Last modified: 2018/05/13 09:44 by tmomas