VMware Communities
Assune
Contributor
Contributor

Kali Linux: apt update returns “Hash Sum mismatch” error Fusion 12 /Big Sur

I updated to Big Sur, Then I had to update to VMware Fusion 12. I have been having issues ever since. I saw this issue is happening to windows users but I can't find a fix for OSX. 

Screen Shot 2020-12-13 at 5.39.57 PM.pngScreen Shot 2020-12-13 at 5.40.04 PM.png

 

 



https://unix.stackexchange.com/questions/574760/kali-linux-apt-update-returns-hash-sum-mismatch-erro...

 

 

I'm experiencing exactly the same issue as described in this question: Kali Linux: apt-get update returns “Hash Sum mismatch” error. Before you mark this as a duplicate however, I have tried the solutions posted there, as well as on numerous other sites, including:

sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update

Editing /etc/apt/sources.list with alternate official mirrors, such as deb http://mirrors.ocf.berkeley.edu/kali kali-rolling main non-free contrib or deb https://http.kali.org/kali kali-rolling main non-free contrib

Everything worked after I first imported the VM. I ran sudo apt update and it found some ~650 packages to upgrade. I ran sudo apt upgrade and it encountered an error partway through. That error was solved using sudo apt --fix-broken install, but that is when this hash sum error began. Unfortunately due to hours of troubleshooting I no longer have the details of the earlier error, but I believe it was an error extracting a package due to corrupt data.

I've tried multiple official mirrors, but I get the same error. Additionally, when I downloaded the Packages.gz file here on my Windows machine (VM host) and computed the SHA256 hash, I got the exact hash that apt printed as the expected value. This led me to believe that the error was not with the mirror but with my VM.

The next thing I tried was wget https://mirrors.ocf.berkeley.edu/kali/dists/kali-rolling/main/binary-amd64/Packages.gz followed by sha256sum Packages.gz, which provided yet another different hash output.

To be clear, I have seen 3 different hashes for the same file:

  1. The "correct" hash shown by apt as expected, which is the one that windows also produced after downloading the file using a browser
  2. The incorrect hash calculated by apt, which led to the error
  3. A different hash calculated by sha256sum after downloading the file using wget using the same URL as for the browser download

I should also note that I have only been referencing the SHA256 hash in each step. The other hash functions are also mismatched when I run sudo apt update, but the file size is the same. I had considered that downloads might be failing due to limited disk space (it is a VM after all) but I don't think that's the case.

What am I missing?

Reply
0 Kudos
22 Replies
illuzian
Contributor
Contributor

Not really a forum poster but saw your post while checking for a different issue. 

I had this issue (on Catalina) with Kaspersky (KIS) installed. I believed it was intercepting the traffic and causing this issue, every time I disabled it, it came good. I imagine any other AV that intercepts traffic may cause a similar issue.

samplex
Contributor
Contributor

I have the same issue after updating to Big Sur and Vmware Fusion 12.

When in Bridge mode the problem with Hash Sum mismatch comes up, but when i change the networking to Shared mode the problem is solved.

So it can be a Vmware fusion or Big Sur problem.

 

 

balsup
Contributor
Contributor

I was facing the same issue with Ubuntu 20.04 on Big Sur 11.1 with VMware Fusion 12.1.0 (17195230).  Other suggested solutions involving /etc/gcrypt/hwf.deny did not help.  Changing settings from bridged (Wi-Fi) to Internet Sharing (Share with my Mac) solved the issue, however it is not a long term acceptable solution.  So I agree that there is either a VMware Fusion or a Big Sur issue here.

rrashidov
Contributor
Contributor

Hi, 

I tried this, but when I change the network configuration of the VM from "Bridged" to "Shared (Internet Sharing)" practically I do not have internet in the VM. 

Is there anything else that has to be configured in the VM so that it can have internet when network configuration set ti "Shared"?

Regards,

Rashid

Reply
0 Kudos
ColoradoMarmot
Champion
Champion

That's rare - if your VM is set to use DHCP for DNS and IP, it should connect once you reboot.

rrashidov
Contributor
Contributor

I rebooted the VM several times, but no change 😞 

Reply
0 Kudos
balsup
Contributor
Contributor

Try switching from Share with my Mac to one of the bridged options, and then switch back.  Hopefully, you'll see a popup from VmWare Fusion saying "The network connection type change is saving and taking effect..."  Then your Ubuntu should hopefully see the connection bounce, which is its clue to restart dhcp discovery.  Make sure you make your network adapter settings changes while the VM is running. 

I have also had problems if I change the network adapter settings while the VM is not actually running.  So there may be a hole there...

 

 

Reply
0 Kudos
rrashidov
Contributor
Contributor

It worked. I guess it needed some time to detect the change.

 

Thanks a million, @balsup !

Reply
0 Kudos
samplex
Contributor
Contributor

Mac OS 11.2 doesnt solve the problem 😞

Tags (1)
Reply
0 Kudos
slowrunner
Contributor
Contributor

 


@balsup wrote:

I was facing the same issue with Ubuntu 20.04 on Big Sur 11.1 with VMware Fusion 12.1.0 (17195230).  ...Changing settings from bridged (Wi-Fi) to Internet Sharing (Share with my Mac) solved the issue, 


 

 THANK YOU! Solved my issue updating the OS and installs - I'll switch back to WiFi MAC for my reserved IP when I run stuff, but I couldn't get past updating and installing.

 

THANK YOU, THANK YOU, THANK YOU!

Reply
0 Kudos
virgiliofornazi
Contributor
Contributor

Lots of reports like this, I have the same issue.

Is VMware looking at it?

Reply
0 Kudos
wila
Immortal
Immortal

Try switching the virtual NIC to a vmxnet3 one.

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

@virgiliofornazi 

“Is VMware looking at it?”

VMTN is a user community forum, with occasional appearances from VMware employees who have some product responsibility.

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
balsup
Contributor
Contributor

Can you clarify?  How does one switch the virtual NIC?  Is this a guest OS specific configuration?  I do not see any choices within VmWare Fusion 12 settings to set the NIC type.  Under Network Adaptor, I can choose the host networking adaptor (vmxnet3 is not a choice).  I can also choose a new MAC address, and I can restrict bandwidth.  Choosing "Add Device..." to add a new Network Adapter doesn't give me any choices for vmxnet3 either.  There is one more option under "Custom" which is "Private to my Mac".  Unfortunately this window can't be resized to show it...

Screen Shot 2021-07-01 at 4.00.30 PM.png

Reply
0 Kudos
wila
Immortal
Immortal

Hi,

You can't do that there. In fact there is no user interface in Fusion for changing the virtual network adapter.


You'll have to edit a config file by hand.

The steps are as follows:

Shut down your VM

Take a backup of the VM if you're not comfortable editing configuration files.. (for this particular scenario a snapshot is sufficient as well as it keeps a copy of the file we change)

In VMware Fusion, go to Virtual Machine Library

Right Click the VM, hold down the option key, select "Open Config File in Editor"

TextEdit will appear with the VM's .vmx file

Locate the line:

ethernet0.virtualDev = "e1000"

change it into:

ethernet0.virtualDev = "vmxnet3"

Choose "Save" .. "Close" from the menu in Text Edit.

Start your VM again.

The network should still work and hopefully no longer have any issues.

Note that the line you change might also be a "e1000e" network adapter or even something, but it looks like that the e1000 adapter is the default for Linux guests.

If it works.. commit the snapshot if you made one (don't keep those lingering around for any longer than you need them)

--
Wil

 

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
bfs1
Contributor
Contributor

Scott -- you're a VMware employee, so have you reported it to where it needs to go?

I'm totally unable to do anything with Linux guests with Fusion 12 on Big Sur. Even trying to download over https with curl or wget gets me openssl errors. This is renders the product totally useless for me and leaves me not being able to get any work done...

None of these workarounds, or those found elsewhere, seem to help at all. Changing to vmxnet3 has no effect on things.

Reply
0 Kudos
liamlows
Contributor
Contributor

Using the shared with my mac network adapter seems to work fine with updating and I am not getting the issues I was before, that being said, for some of my tasks I need that VM to have its own IP (WiFi Bridge). Is there any workaround solution to fixing this so that the VM will work in bridged mode?

This is a pretty substantial issue so I'm surprised that VMWare has failed to catch it yet.

Reply
0 Kudos
MattPieklik
Contributor
Contributor

I am having exactly the same issue, changing adapter type to vmxnet3 did not resolve it.  Only way I was able to resolve this issue is by choosing to NAT from my Mac's, but I really want to use a bridged adapter for a number of reasons. 

Reply
0 Kudos
mjfroman
Contributor
Contributor

Same issue, vmxnet3 edit did not fix, only shared network works.

Reply
0 Kudos