VMWare and Virtual Box Fixes

VM Speed tests

Check out https://serverfault.com/questions/447775/virtualbox-slow-upload-speed-using-nat , https://www.virtualbox.org/manual/ch06.html and https://www.virtualbox.org/manual/ch09.html#nat-adv-settings

  • To disable offload
Get-NetAdapter
Get-NetAdapterChecksumOffload
Disable-NetAdapterChecksumOffload -Name "adapter"

  • To disable TCP Chimney feature on the guest adapter
netsh int tcp set global chimney=disabled
netsh int tcp set global rss=disabled
netsh int tcp set global netdma=disabled

  • To display current global TCP settings, use the net shell command:
netsh int tcp show global

Cant connect via the Virtual RDP server

Trying to connect with rdesktop gives "ERROR: Connection closed"
Run
VBoxManage setproperty vrdeextpack "Oracle VM VirtualBox Extension Pack"
and restart virtualbox

KVM is not created with error 16

if you have a virtualbox vm running, shut it down. The two can't run at the same time unfortunatelly

Shared clipboard does not work

If you have the virtualbox tools installed and the clipboard configured for a bidirectional mode check if you have a headless mode enabled on your VM. Headless mode prevents clipboard sharing unless you use an RDP client to connect to it, that does clipboard - like this:
xfreerdp /v:localhost /size:1800x1100 +clipboard

To check for the headless mode open your VM's xml and search for 'headless'. If it's there, shut down the VM and exit out of virtualbox gui. Then remove the <frontend>...</frontend> section and start the VM back up.

For a windows guest check HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell to make sure it is set to

vboxdrv needs to be setup after every reboot

This problem is caused the vboxdrv not starting on boot. In my case it was a collision between the /etc/init.d/virtualbox from the opensource distro and the Oracle vboxdrv. Solved by removing virtualbox remnants and reenabling vboxdrv in systemd.

sudo /usr/sbin/update-rc.d -f virtualbox remove
sudo rm /etc/init.d/virtualbox
sudo systemctl enable vboxdrv


Cloned Linux system fails to boot, reports missing disk

The ID of the disk has changed, but it is hardcoded in the configs. Happens with SUSE, openSuse or SLES. To fix first boot with some live distro, pretty much any would do.

fdisk -l # to find your root partition
mount /dev/sda2 /mnt # to mount it

Edit the following files and fix the disk IDs to be device names instead:

/dev/disk/by-id/ata-VBOX_HARDDISK... -> /dev/sda
/dev/disk/by-id/ata-VBOX_HARDDISK...-part1 -> /dev/sda1
/dev/disk/by-id/ata-VBOX_HARDDISK...-part2 -> /dev/sda2
vi /mnt/etc/fstab
vi /mnt/boot/grub/device.map
vi /mnt/boot/grub/menu.lst 

Now, it might be in grub2 or efi, and/or grub.cfg YMMW.

VMWare only starts as root, complains about kernel modules but does not rebuild them when run as non-root

VM module permissions are broken after the build. Fix them by running:

sudo find /lib/modules/$(uname -r)/ -type f ! -perm -o=r -exec sudo chmod o+r "{}" \;
sudo find /lib/modules/$(uname -r)/ -type d ! -perm -o=rx -exec sudo chmod o+rx "{}" \;

VMWare logs location

Vmware tools write verbose logs go into /tmp/vmware-($USER)/

More permanent logs go into /var/log/vmware/


@Troubleshooting @VMWareandVirtualBox