Difference between revisions of "VMWare"
(35 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | ;[[ | + | <b>We no longer use VMWare! See the [[kvm]] page for information on our virtualization.</b> |
+ | |||
+ | ;[[VMWare Server (Host) and Guest Setup Procedure]] | ||
;[[Virtual Hosts and Guests]] | ;[[Virtual Hosts and Guests]] | ||
+ | ;[[Copying VM from one machine to another]] | ||
+ | ;[[Using VMWare vmrun]] | ||
+ | ;[[Using VNC to connect to Virtual Machines]] | ||
+ | ;[[VMware vSphere Hypervisor]] | ||
+ | == Using VMWare Server 2 Web Interface == | ||
+ | VMWare uses a web interface for managing virtual systems. These interfaces are not accessible from outside the farm network for security reasons. If you are not connected to the farm you can forward the ports used by VMWare to your local machine over an ssh connection. To do so use the following command: | ||
+ | |||
+ | ssh -L 8222:localhost:8222 -L 8333:localhost:8333 -L 8334:localhost:8334 user@host | ||
+ | |||
+ | Once you've done that you can connect to the VMWare interface by pointing your browser to http://localhost:8222/ | ||
+ | |||
+ | '''Note''': Port 8333 is the SSL secured port for connecting to VMWare. It is generally a good idea to connect using this port, but for some reason it doesn't seem to work quite right when forwarding over an ssh connection. In this case it's ok to use the unencrypted port (8222) because the data is being sent over and encrypted ssh connection. | ||
+ | |||
== VMWare Appliance Sites == | == VMWare Appliance Sites == | ||
http://www.vmware.com/appliances/ | http://www.vmware.com/appliances/ | ||
Line 6: | Line 21: | ||
http://virtualappliances.org/ | http://virtualappliances.org/ | ||
http://thincrust.org/aos.html | http://thincrust.org/aos.html | ||
− | == VMWare | + | == VMWare Server Utilities == |
− | + | <pre> | |
− | + | vmnet-bridge - Checks the status of the virtual bridges setup on each physical interface. | |
− | + | vmnet-dhcpd - Creates a DHCP server for any virtual machine connected to the virtual network. | |
− | + | vmnet-natd - Creates NAT tables to be used by dhcp and virtual machines. | |
− | + | vmnet-netifup - Used to force the start of the virtual interface needed by the virtual machine before it starts. | |
− | + | vmnet-sniffer - Used to sniff packets on a virtual network in vmware | |
− | + | vmrun - Will start, stop, restart a virtual and can also be used to take snapshots of virtual machines. | |
− | + | vmstat - Shows the status of virtual machines. THIS IS BULLSHIT - IT SHOWS THE STATUS OF VIRTUAL MEMORY! | |
− | + | vm-support - This will create a tarball of info based on attributes of your computer to submit with an incident report to vmwares support page. | |
− | + | vmware-authtrusted - Used to authenticate vmware server against a domain. | |
− | + | vmware-cmd - This tool allows you to change system variables, get status on different virtual machines and alot more. | |
− | + | vmware-config.pl - Used in initial setup and can be used to change hardware parameters, such as network bridges and web server configuration. | |
− | + | vmware-loop - Used by vmware-mount to mount virtual drives. | |
− | + | vmware-mount.pl - Used to mount a virtual hard disk on the host operating system. | |
− | + | vmware-ping - Will send a ping to a remote host at a specified interval. | |
− | + | vmware-uninstall.pl - Uninstall script for vmware server. | |
− | + | vmware-vdiskmanager - Resize a virtual disk. | |
+ | </pre> | ||
+ | |||
== VMWare Terminology and Concepts == | == VMWare Terminology and Concepts == | ||
− | [http://nuclear.unh.edu/wiki/ | + | [http://nuclear.unh.edu/wiki/pdfs/vmware/vmserver2.pdf VMWare Server User Guide] |
+ | [http://nuclear.unh.edu/wiki/pdfs/vmware/server_admin_manual.pdf VMWare Server Administration Guide] | ||
+ | [http://nuclear.unh.edu/wiki/pdfs/vmware/Virtual_networking_concepts.pdf VMWare Virtual Network Concepts] | ||
+ | [http://nuclear.unh.edu/wiki/pdfs/vmware/VMWareServerTipsandTricks.pdf VMWare Server Tips and Tricks] | ||
+ | |||
== External Links == | == External Links == | ||
+ | [http://www.google.com/url?sa=t&source=web&ct=res&cd=4&url=http%3A%2F%2Fvmcreator.com%2F&ei=aV8hSrvQGdKktwfswaTJBg&usg=AFQjCNE5I3mWD5zWnp9f_PL9dOKl1sPtrQ&sig2=Fy95Ts_KMynCL-nerpNl9A Virtual Machine Creator] | ||
+ | [http://www.virtuatopia.com/index.php/VMware_Server_2.0_Essentials virtuatopia.com VMWare Server 2.0 Essentials] | ||
+ | |||
+ | = Important Configuration Issues = | ||
+ | |||
+ | == Hostd (vmware-mgmt the web management interface) crashes == | ||
+ | |||
+ | This is a known issue between VMware and the glibc-2.5-42 release, which appears in Red Hat 5.4 and CentOS 5.4 releases. The trick to fix it is documented here: [http://bugs.centos.org/view.php?id=3884 Centos Bug 3884]. | ||
+ | |||
+ | mkdir /usr/lib/vmware/lib/libc.so.6 | ||
+ | cd /tmp; mkdir tmp; cd tmp | ||
+ | wget http://mirror.centos.org/centos/5.3/os/x86_64/CentOS/glibc-2.5-34.x86_64.rpm [^] | ||
+ | rpm2cpio glibc-2.5-34.x86_64.rpm | cpio -ivd | ||
+ | mkdir /usr/lib/vmware/lib/libc.so.6 | ||
+ | mv lib64/libc-2.5.so libc.so.6 /usr/lib/vmware/lib/libc.so.6/ | ||
+ | Use editor to edit /usr/sbin/vmware-hostd and add the line: | ||
+ | export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libc.so.6:$LD_LIBRARY_PATH | ||
+ | to the one but last line of the file. | ||
+ | |||
+ | I implemented this fix on both Taro and Gourd (the new einstein). It appears to work fine. At a later date, the edit of the | ||
+ | |||
+ | == Firefox 3 compatibility issues == | ||
+ | |||
+ | The VMWare virtual console plugin is not compatible with Firefox 3.6 or greater. This creates a significant problem for us since all of our systems run distributions that now ship 3.6 as their default version of Firefox. My solution was to track down a copy of Firefox 3.5 (codename Shiretoko) and install it on my workstation ([[Feynman]]) as well as all of the systems currently acting as VMware hosts. The only pre-built package available (that I could find) for 3.5 was for 32-bit systems, so I downloaded the source and compiled a 64-bit version. There is a package in /root/packages on [[Gourd]] which contains the 64-bit compatible build of Firefox 3.5.11. | ||
+ | |||
+ | The files for firefox 3.5 are installed in /opt/firefox on all VMWare host systems. The executable is symlinked to /usr/local/bin/firefox-35 so that you can run it by simply typing firefox-35 from the console. If you already have an instance of another version of Firefox running you will need to close it before running firefox-35, or it will just open another instance of the version you're already running. It's not a perfect solution but it will work until we can come up with something a bit more universally effective (or until VMWare fixes their browser plugin). | ||
+ | |||
+ | == Keyboard and Mouse issues in Virtual Guests == | ||
+ | |||
+ | There is an issue with the VMWare console plugin which causes the mouse and keyboard to not be captured correctly by the virtual guest's graphical interface. This leads to all sorts of problems, mainly not being able to click on things in the guest interface in the web console window. This can be fixed by setting the following environment variable before launching Firefox: | ||
+ | |||
+ | VMWARE_USE_SHIPPED_GTK=yes | ||
+ | |||
+ | A convenient way to set this permanently is to add this line: | ||
+ | |||
+ | export VMWARE_USE_SHIPPED_GTK=yes | ||
+ | |||
+ | To the top of the script located in your Firefox profile located at | ||
+ | |||
+ | ~/.mozilla/firefox/<your profile>/extensions/VMwareVMRC\@vmware.com/plugins/lib/wrapper-gtk24.sh | ||
+ | |||
+ | This should automatically set this variable whenever you run an instance of the VMware plugin. |
Latest revision as of 15:16, 24 October 2012
We no longer use VMWare! See the kvm page for information on our virtualization.
- VMWare Server (Host) and Guest Setup Procedure
- Virtual Hosts and Guests
- Copying VM from one machine to another
- Using VMWare vmrun
- Using VNC to connect to Virtual Machines
- VMware vSphere Hypervisor
Using VMWare Server 2 Web Interface
VMWare uses a web interface for managing virtual systems. These interfaces are not accessible from outside the farm network for security reasons. If you are not connected to the farm you can forward the ports used by VMWare to your local machine over an ssh connection. To do so use the following command:
ssh -L 8222:localhost:8222 -L 8333:localhost:8333 -L 8334:localhost:8334 user@host
Once you've done that you can connect to the VMWare interface by pointing your browser to http://localhost:8222/
Note: Port 8333 is the SSL secured port for connecting to VMWare. It is generally a good idea to connect using this port, but for some reason it doesn't seem to work quite right when forwarding over an ssh connection. In this case it's ok to use the unencrypted port (8222) because the data is being sent over and encrypted ssh connection.
VMWare Appliance Sites
http://www.vmware.com/appliances/ http://www.virtualappliances.net/ http://virtualappliances.org/ http://thincrust.org/aos.html
VMWare Server Utilities
vmnet-bridge - Checks the status of the virtual bridges setup on each physical interface. vmnet-dhcpd - Creates a DHCP server for any virtual machine connected to the virtual network. vmnet-natd - Creates NAT tables to be used by dhcp and virtual machines. vmnet-netifup - Used to force the start of the virtual interface needed by the virtual machine before it starts. vmnet-sniffer - Used to sniff packets on a virtual network in vmware vmrun - Will start, stop, restart a virtual and can also be used to take snapshots of virtual machines. vmstat - Shows the status of virtual machines. THIS IS BULLSHIT - IT SHOWS THE STATUS OF VIRTUAL MEMORY! vm-support - This will create a tarball of info based on attributes of your computer to submit with an incident report to vmwares support page. vmware-authtrusted - Used to authenticate vmware server against a domain. vmware-cmd - This tool allows you to change system variables, get status on different virtual machines and alot more. vmware-config.pl - Used in initial setup and can be used to change hardware parameters, such as network bridges and web server configuration. vmware-loop - Used by vmware-mount to mount virtual drives. vmware-mount.pl - Used to mount a virtual hard disk on the host operating system. vmware-ping - Will send a ping to a remote host at a specified interval. vmware-uninstall.pl - Uninstall script for vmware server. vmware-vdiskmanager - Resize a virtual disk.
VMWare Terminology and Concepts
VMWare Server User Guide VMWare Server Administration Guide VMWare Virtual Network Concepts VMWare Server Tips and Tricks
External Links
Virtual Machine Creator virtuatopia.com VMWare Server 2.0 Essentials
Important Configuration Issues
Hostd (vmware-mgmt the web management interface) crashes
This is a known issue between VMware and the glibc-2.5-42 release, which appears in Red Hat 5.4 and CentOS 5.4 releases. The trick to fix it is documented here: Centos Bug 3884.
mkdir /usr/lib/vmware/lib/libc.so.6 cd /tmp; mkdir tmp; cd tmp wget http://mirror.centos.org/centos/5.3/os/x86_64/CentOS/glibc-2.5-34.x86_64.rpm [^] rpm2cpio glibc-2.5-34.x86_64.rpm | cpio -ivd mkdir /usr/lib/vmware/lib/libc.so.6 mv lib64/libc-2.5.so libc.so.6 /usr/lib/vmware/lib/libc.so.6/ Use editor to edit /usr/sbin/vmware-hostd and add the line: export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libc.so.6:$LD_LIBRARY_PATH to the one but last line of the file.
I implemented this fix on both Taro and Gourd (the new einstein). It appears to work fine. At a later date, the edit of the
Firefox 3 compatibility issues
The VMWare virtual console plugin is not compatible with Firefox 3.6 or greater. This creates a significant problem for us since all of our systems run distributions that now ship 3.6 as their default version of Firefox. My solution was to track down a copy of Firefox 3.5 (codename Shiretoko) and install it on my workstation (Feynman) as well as all of the systems currently acting as VMware hosts. The only pre-built package available (that I could find) for 3.5 was for 32-bit systems, so I downloaded the source and compiled a 64-bit version. There is a package in /root/packages on Gourd which contains the 64-bit compatible build of Firefox 3.5.11.
The files for firefox 3.5 are installed in /opt/firefox on all VMWare host systems. The executable is symlinked to /usr/local/bin/firefox-35 so that you can run it by simply typing firefox-35 from the console. If you already have an instance of another version of Firefox running you will need to close it before running firefox-35, or it will just open another instance of the version you're already running. It's not a perfect solution but it will work until we can come up with something a bit more universally effective (or until VMWare fixes their browser plugin).
Keyboard and Mouse issues in Virtual Guests
There is an issue with the VMWare console plugin which causes the mouse and keyboard to not be captured correctly by the virtual guest's graphical interface. This leads to all sorts of problems, mainly not being able to click on things in the guest interface in the web console window. This can be fixed by setting the following environment variable before launching Firefox:
VMWARE_USE_SHIPPED_GTK=yes
A convenient way to set this permanently is to add this line:
export VMWARE_USE_SHIPPED_GTK=yes
To the top of the script located in your Firefox profile located at
~/.mozilla/firefox/<your profile>/extensions/VMwareVMRC\@vmware.com/plugins/lib/wrapper-gtk24.sh
This should automatically set this variable whenever you run an instance of the VMware plugin.