Ubuntu24.04 builds Samba server
Since Ubuntu runs in a virtual machine, when you mount a Windows shared folder through Ubuntu, some CAE software will report a calculation error when running it in the mount point. Consider sharing the Ubuntu folder with Windows, so you need to build a Samba server on the Ubuntu system.
First, install the samba package on Ubuntu:
sudo apt install samba -y
Create a shared folder:
mkdir ${HOME}/LinuxShare
Edit the Samba configuration file /etc/samba/smb.conf
:
Hyper-V Virtual Switch NAT Setting Static IP
I have mentioned before that you can use NAT+port mapping to access a virtual machine, but I found a problem during use: every time the host machine is restarted, the default Default Switch
IP address will change, causing the virtual machine to be unable to access the gateway and thus unable to connect to the Internet.
In order to ensure that the virtual machine is connected to the Internet, you must manually set the IP address of the adapter corresponding to the Default Switch
every time you restart the machine, which is very inconvenient. The following is a solution given in reference to the Microsoft official document
.