加大VirtualBox Image大小的办法

Oracle VM VirtualBox安装配置Mac OS 准备Mac系统.iso镜像系统文件: 链接:https://pan.baidu.com/s/1JtUfCLQVKq0zd86visnqzg,提取码:ffjx。 补充说明: dmg是disk image的缩写,即磁盘映像,在Mac系统中可以直接打开,而在Windows平台上安装Mac OS的虚拟机需要iso的镜像文件。 安装Oracle VM VirtualBox: 下载地址:https://... 阅读详情

转:https://blog.jyore.com/2013/06/virtualbox-increase-size-of-rhelfedoracentosscientificos-guest-file-system/

VirtualBox: Increase Size of RHEL/Fedora/CentOS/Scientific Guest File System

Tired of running out of space on your VM and running through complicated steps in order to get your VM resized?  This article provides the steps to take without you having to boot live CDs, clone VDI’s, or anything else complicated or time consuming.  We will simply leverage VirtualBox manager commands on our host and system commands on the guest.

E:\Oracle\VirtualBox>VBoxManage modifyhd "D:\VirtualBox VMs\development\development.vdi" --resize 20480
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

First, shutdown the VM you plan to work on.  Then we will run the manager tool. the

1
2
3
cd /path/to/vm
VBoxManage modifyhd vm.vdi --resize <size>
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

The <size> parameter should be the desired size to make your VDI, in MB.  For example, if you wish to resize your 10GB disk to 25GB, then you would use 25600 (1024*25). This should resize the VDI appropriately, however, if you boot up your VM, you will soon see that you are still at your original disk space.

1
2
3
cd /path/to/vm
VBoxManage modifyhd vm.vdi --resize 25600
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

If you open a partition tool, such as gparted, you can easily see that there is the extra available disk available, but it is set to unallocated.  If your guest OS is using LVM (this is all of the Red Hat flavors), then you cannot simply extend the volume as it will be locked.  Other volume managers may let you resize the partition.  Some may let you if you boot from a live CD.

With LVM we can actually make all these changes to the logical volume on a live file system.  It never hurts to backup your filesystem, or at least anything important, but it is not required.

The following steps will allow you to resize your partition.  In a terminal run the following commands in bold (you need root permissions to run fdisk):

  • df
    • Take note of the logical volume mapping (ex. /dev/mapper/fedora-root)
  • fdisk -l
    • Take note of the filesystem partition of your physical volume sits (ex. /dev/sda2)
  • fdisk /dev/sda
    • Run fdisk of this phyisical volume
  • d
    • Delete a partition
  • 2
    • Select your partition (we are using 2 from /dev/sda2)
  • n
    • Create a new partition
  • p
    • Make it a primary partition
  • 2
    • The partition number to make it on (same as we deleted)
  • <return>
    • Set the starting block (keep the default as it is usually correct)
  • <return>
    • Set the ending block (keep the default as it is fine for our use case)
  • w
    • Write the partition (will also exit fdisk shell)
  • reboot
    • We must reboot in order to have the new partition table loaded
  • pvresize /dev/sda2
    • Resizes the physical volume
  • pvscan
    • Use to verify the new size
  • lvextend -l +100%FREE /dev/mapper/fedora-root
    • Extend the logical volume to take all free space
  • resize2fs /dev/mapper/fedora-root
    • Resize the file system
  • df
    • See your newly sized volume

And that is it! With the last df command, you should see that your volume increased! In our example, let’s say you had 9GB of the 10GB disk and you resized it to 25GB.  In the first dfcommand, you would have seen 90% full.  After the resize, you should see the system as only 36% full, thus verifying the resize success!

The commands are reposted below for easier reference:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
df
fdisk -l
fdisk /dev/sda
d
2
n
p
2
< return >
< return >
w
reboot
pvresize /dev/sda2
pvscan
lvextend -l +100%FREE /dev/mapper/fedora-root
resize2fs /dev/mapper/fedora-root
df
Oracle VM VirtualBox虚拟机安装配置 1. 首先,需要从Oracle官方网站下载VirtualBox的最新版本。 2. 下载完成后,双击安装包开始安装。按照安装向导的提示,同意许可协议,并选择安装位置。 3. 在安装过程中,可以根据需要选择是否创建快捷方式、是否安装USB支持等附加功能。 4. 完成安装后,打开VirtualBox,你会看到一个空白的虚拟机列表。 阅读详情

相关推荐

保姆级教程:用Docker一键部署vLLM大模型推理服务(附常见报错解决方案)

本文提供了一份详细的Docker化vLLM大模型推理服务部署指南,涵盖从环境准备到性能调优的全流程。通过容器化技术解决大语言模型部署中的显存利用率、吞吐量等核心问题,并附常见报错解决方案,帮助开发者快速构建高效、可扩展的AI推理服务。

weixin_29248313的博客 491

Virtualbox和VMware 内存不足修改虚拟机镜像大小

目录 VirtualBox 更新:在 VirtualBox 中使用虚拟媒体管理器 在 VirtualBox 中放大虚拟磁盘 在 VMware 中扩大虚拟磁盘 扩大虚拟机的分区 更简单方法 在 VirtualBox 或 VMware 中创建虚拟硬盘时,需要指定最大磁盘大小。如果以后想要在虚拟机硬盘上有更多空间,则必须扩大虚拟硬盘和分区。 请注意,您可能希望在执行这些操作之前备份您的虚拟硬盘文件 - 总是有可能出现问题,因此备份总是好的。然而,这个过程对我们来说很好。 VirtualBo.

xfxuezhang.cn 2万+

[原创]Linux 802.11n CSI tool安装教程(亲测可用)

Linux 802.11n CSI tool安装教程 前言 网上关于Intel5300 CSI tool的教程繁多,实际有效的可以说极少,各种疏漏错误。装的时候被坑无数次,终于调通。其实装这个工具并不太难,但是很多人把它弄得极其复杂,所以写这篇博客来帮助和我有一样困扰的人。我基本沿用的是官方文档旧版本的安装方案,针对其冗杂之处做了大量改进。 旧版安装教程: http://dhalperi....

u014645508的博客 4万+

VirtualBox解决分辨率问题

在VirtualBox中安装了Ubuntu后,Ubuntu的屏幕调整不太好,操作起来非常不方便,需要安装Vbox的增强功能。具体如下: 1, 在  设备--》 安装增强功能 这时会自动加载VBOXADDITIONS的虚拟光盘 2,/media/VBOXADDITIONS_4.0.10_72479 (4.0.10_72479是版本号)找到对应的操作系统的文件,比如Linux的是,VBoxLin

TRAMP~ 2304

从零构建高精度温控系统:ADN8835的单电感拓扑与0.01℃稳定性实战解析

本文深入解析了如何利用ADN8835构建高精度温控系统,重点介绍了其创新的单电感拓扑架构如何实现0.01℃的长期稳定性。内容涵盖精密PCB布局、电源滤波设计,并详细阐述了针对不同热容负载的数字PID控制参数整定策略,为开发精密仪器和医疗设备提供了实战指南。

r2s3t4的博客 238

libopus 实现pcm 编码到opus

opus 是一种音频格式,常用于语音通话、视频会议中。最近做了个pcm 到opus 的编码,踩了不少坑,特此记录一下。

sinat_27720649的博客 9464

Virtual Box安装时出现严重错误的解决方法

严重错误,Virtual Box 安装失败

weixin_55491071的博客 1万+

台达伺服B3驱动器参数的设定和CN1的接法

3. B2的电子齿轮比是直接设定P1-44(分子)和P1-45(分母)就就可以的,但是B3的有个隐藏的细节,就是P1-44的默认值77216不用去更改,这是官方客服说的,需要改的是P1-45这个参数,比如说,我使用的丝杆螺距是5mm的,那么就是以5000脉冲走完5mm为一圈,则就把P1-45设定为5000即可;我的是三菱FX3S系列的PLC,是NPN型的,输出点是24V-作为信号的,所以接41、37,具体可参考B3的。,跟着客服的讲解操作才解决的,以下就是解决方法,希望能够帮到需要的各位。

qq_38681017的博客 1万+

【虚拟机】Virtualbox又报错了,今天是真的运行不起来了

全网求助啊,找了一圈也没有相关解答,说要重新安装,都试过了 VirtualBox - Error In supR3HardenedWinReSpawn (rc=-5640) Please try reinstalling VirtualBox. where: supR3HardenedWinReSpawn what: 1VERR SUP VP THREAD NOT ALONE(-5640) - ProcessVerification Failure: The process has more than o

wenchun001的博客 4038

MIPI RFFE 信号完整性与硬件设计

MIPI RFFE信号完整性设计关键点 摘要:MIPI RFFE作为射频前端控制总线,其信号完整性设计需平衡速率、驱动能力与抗干扰性。核心挑战在于确保接收端在52Mb/s速率下保持足够的电压和时序裕量。关键设计考量包括: 驱动能力优化:过强导致过冲/振铃和射频杂散,过弱则恶化时序裕量,需与总线负载匹配。 波形质量指标:严格控制上升/下降时间(兼顾EMC和时序要求),抑制过冲/振铃幅度,管理VIO电源纹波和耦合噪声。

sinat_15150363的博客 237

华为OD机试:查找接口成功率最优时间段 (C/C++/Py/Java/JS/GO)

华为OD机试双机位C卷 查找接口成功率最优时间段,提供C语言、Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解。

qq_45776114的博客 4686

调整virtualbox 虚拟硬盘大小

refs: http://blog.163.com/fj_ltls/blog/static/138027111201171833044925/ http://www.tuicool.com/articles/jYrQVv 1)windows 首先:找到 VBoxManage.exe 它在安装《VirtualBox 4.0.8》文件中 D:\Program F

Henry_Wu001的专栏 1223

GB 47955—2026 L2组合驾驶辅助强制国标全解、合规方案与工程代码落地

GB 47955—2026 L2辅助驾驶国标合规工程代码# 运行环境:Python3.8+,适配车载仿真、台架测试、算法验证场景# 依赖安装:pip install numpy dataclasses tqdm struct time json# ===================== 国标强制时序参数(完全对标GB 47955—2026) =====================HAND_OFF_FIRST_WARN = 5.0 # 手部脱离5s触发一级预警。

lin_xiu的博客 296

VirtualBox下使用debian cloud image

cloud images是面向公有云用户的通用镜像,即可以跑在AWS/Azure/阿里云/腾讯云这种云服务器上。能够二次定制、批量部署,适用于虚拟机环境,虚拟机在初始化的时候使用cloud-init进行初始化,本文介绍如何在本地虚拟机软件VirtualBox上使用debian cloud image , 其他系统入 Ubuntu等大同小异.

小白的博客 897

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

如何调整VirtualBox vmdk文件的大小

I've run out of space on a virtual machine disk which is a vmdk and need to resize the virtual imag

w36680130的博客 961

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

Ubuntu系统安装VirtualBox后无发安装“增强功能”的解决办法

Ubuntu系统安装VirtualBox后, 在设备选项中点击曾倩功能没有反应,也不能是用多动和剪切板功能,解决办法如下。

zhanghao_Hulk的专栏 4563

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

关于VirtualBox 和 Ubuntu 不能全屏的解决办法

这两天在安装Ubuntu,遇到了虚拟机桌面不能随着窗口大小而改变的问题。之前上课也在VB上装过Oracle Developer VM,Devices (设备) - Insert Guest Additions CS image (安装增强功能)就可以,这次就不起作用。 [How to Install Ubuntu 20.04 LTS on VirtualBox in Windows 10](https://www.youtube.com/watch?v=x5MhydijWmc) 这个视频里,博主先在终端里运

PiYuan314159265的博客 2397

转换 Vmware Image to Virtualbox Image 或者 导入 Vmware Imagee into Virtu

VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers...

Just Code 394

ubuntu下用VirtualBox安装Windows虚拟机

windows虚拟机安装以及虚拟机屏幕大小调整,共享文件夹和虚拟机USB接口配置

Leefir的博客 3万+

VirtualBox 报错VERR_VD_IMAGE_READ_ONLY

VirtualBox 无法打开虚拟机,报错VERR_VD_IMAGE_READ_ONLY,详细报错如下: 不能为虚拟电脑 Primary11gRAC2 打开一个新任务. Failed to open image 'E:\Vbox\Primary11gRAC2\11.2.0.4RAC2\11.2.0.4RAC2.vdi' for writing due to wrong permission

yang00322的博客 6345

使用VirtualBox安装Ubuntu虚拟机 - 完整教程

使用 VirtualBox 7.0.2 安装 Ubuntu 虚拟机 - 完整教程

Amentos的博客 5万+

Kali Linux VirtualBox 虚拟机安装

Kali Linux VirtualBox 虚拟机安装欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程...

Jeremy.Rin的博客 3217

win10 virtualbox报VERR_VD_IMAGE_READ_ONLY

今天一早来公司开机之后发现打开虚拟机报错VERR_VD_IMAGE_READ_ONLY。上网查了一些方法均未解决,看到是权限问题,灵机一动右键以管理员身份运行,竟然可以了!

weixin_41306771的博客 993

virtualbox安装VBoxGuestAdditions

在 http://download.virtualbox.org/virtualbox下,寻找自己合适的版本。若添加中无你所下载的iso文件,则在右边框attributes中Optical Drive中选择一个disk file,找到下载的文件位置,自己导入;#然后挂载光驱到这个目录下:sudo mount /dev/cdrom /mnt/cdrom。打开virtualbox,在主窗口,选择需要安装的虚拟机,但不要打开。#这样我们就可以在 /mnt 目录下访问光驱中的内容了。依赖包的问题,可能提示不同。

sunwill010的专栏 2943

Windows下安裝VirtualBox+Ubuntu

Windows VirtualBox VirutalBox下載連結 Download VirtualBox Download VirtualBox (Old Builds): VirtualBox 5.2 VirtualBox安裝Ubuntu VirtualBox 5.2安裝Ubuntu 16.04 安裝Ubuntu系統重啟後卡住 安装Ubuntu14.10重启后卡住 調整VirtualBox內視...

keineahnung2345的博客 881
上一篇: Spring Spel 与 Placeholder
下一篇: Fedora Reset Password
开心的D哥
博客等级 码龄22年 63粉丝 110原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值