VirtualBox on Ubuntu

Last updated on May 7, 2023 pm

Install VirtualBox

  • download: https://www.virtualbox.org/wiki/Downloads

  • install

    1
    sudo dpkg -i virtualbox-6.1_6.1.36-152435_Ubuntu_bionic_amd64.deb

Install VirtualBox Extension Pack

  • download: https://www.virtualbox.org/wiki/Downloads

  • install Oracle_VM_VirtualBox_Extension_Pack-6.1.36a-152435.vbox-extpack

    Tools -> Preferences -> Extentions

New / Add Machine (.vbox)

  • new

    Machine -> New

  • add

    Machine -> Add

增强虚拟磁盘空间容量(VDI)

1
2
3
4
5
6
# 查看虚拟磁盘空间信息
VBoxManage showhdinfo VirtualBoxVMs/Win10-32/Win10-32.vdi

# 扩展虚拟硬盘空间(这里要扩展到100G(1024*1024*1024*100),
# 必须是动态分配模式的硬盘不能是固定大小模式的
VBoxManage modifymedium --resize 102400 VirtualBoxVMs/Win10-32/Win10-32.vdi

共享文件夹

  • Host系统为Windows,VM系统为Ubuntu,在Ubuntu下挂载Windows的共享文件夹
    1
    2
    # VMShareFolder 为 Windows下在VM中设置的共享文件夹名称
    sudo mount -t vboxsf VMShareFolder /mnt/share_folder

VirtualBox on Ubuntu
https://cgabc.xyz/posts/75d62ce/
Author
Gavin Gao
Posted on
December 18, 2020
Licensed under