VirtualBox

Opened 3 years ago

Last modified 3 years ago

#20146 new defect

High CPU Kernel usage for any golang project, Windows 10 Host, Hyper-V turn on

Reported by: Slach Owned by:
Component: host support Version: VirtualBox 6.1.18
Keywords: hyper-v, golang, windows Cc:
Guest type: Linux Host type: Windows

Description

simple Vagrantfile for reproduce

# -*- mode: ruby -*-
# vi: set ft=ruby :

def total_cpus
  require 'etc'
  Etc.nprocessors
end


Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/focal64"
  config.vm.box_check_update = false
  config.vm.synced_folder ".", "/vagrant"

  if Vagrant.has_plugin?("vagrant-vbguest")
    config.vbguest.auto_update = false
  end

  if Vagrant.has_plugin?("vagrant-timezone")
    config.timezone.value = "UTC"
  end

  config.vm.provider "virtualbox" do |vb|
    vb.gui = false
    vb.cpus = total_cpus
    vb.memory = "2048"
    vb.default_nic_type = "virtio"
    vb.customize ["modifyvm", :id, "--uartmode1", "file", File::NULL ]
    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
    vb.customize ["modifyvm", :id, "--ioapic", "on"]
    vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
  end

  config.vm.provision "shell", inline: <<-SHELL
    set -xeuo pipefail
    export DEBIAN_FRONTEND=noninteractive

    # docker
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
    add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) test"
    apt-get install --no-install-recommends -y docker-ce
    apt-get install -y linux-tools-generic linux-tools-$(uname -r) 

    MINIKUBE_VERSION=1.16.0
    wget -c --progress=bar:force:noscroll -O /usr/local/bin/minikube https://github.com/kubernetes/minikube/releases/download/v${MINIKUBE_VERSION}/minikube-linux-amd64
    chmod +x /usr/local/bin/minikube
    # required for k8s 1.18+
    apt-get install -y conntrack

    minikube config set vm-driver none
    minikube config set kubernetes-version ${K8S_VERSION}
    minikube start --download-only=true
    /home/vagrant/.minikube/cache/linux/v${K8S_VERSION}/kubeadm config images pull
    minikube start --wait-timeout=20m
  SHELL
end

minikube fail with timeouts

during start docker containers and kubelet systemd service perf top -F 100 -p <kubelet_pid> perf top -F 100 -p <dockerd_pid>

show following pictures (see attach)

https://monosnap.com/file/97lWTmuXbD9zVQqBpnFtz1B8YVbz8z https://monosnap.com/file/iJPQK6YeTjVRsn3xziaY9h6LOS9cFi

any other daemons works fine

Attachments (2)

photo_2021-01-21_18-43-18.jpg (51.4 KB ) - added by Slach 3 years ago.
photo_2021-01-21_18-43-04.jpg (75.8 KB ) - added by Slach 3 years ago.

Download all attachments as: .zip

Change History (4)

by Slach, 3 years ago

by Slach, 3 years ago

comment:1 by Slach, 3 years ago

temporary workaround disable Hyper-V

bcdedit /set hypervisorlaunchtype off

comment:2 by windows XP, 3 years ago

boot up Windows XPon a virtualboxAndy virtual machine

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use