UUID: 0ef8e73e-46df-42d2-93a1-8317df36c27c Parent UUID: base State: locked read Type: normal (base) Location: D:\Virtual\Ubuntu Server 20.04\Ubuntu Server 20.04\Ubuntu Server822-disk002.vdi Storage format: vdi Capacity: 102400 MBytes Encryption: disabled
UUID: 3047a7c4-b3f0-4dfc-a416-73a5fd772407 Parent UUID: 0ef8e73e-46df-42d2-93a1-8317df36c27c State: locked write Type: normal (differencing) Location: D:\Virtual\Ubuntu Server 20.04\Ubuntu Server 20.04\Snapshots/{3047a7c4-b3f0-4dfc-a416-73a5fd772407}.vdi Storage format: vdi Capacity: 102400 MBytes Encryption: disabled
该命令可以看到虚拟硬盘文件的 Location 及 UUID 信息。
再通过以下命令,可以查看具体虚拟硬盘的详细信息,其中包括 Format variant:
1
vboxmanage showhdinfo <UUID>
从固定大小转换为动态分配,可以这样:
1
vboxmanage clonemedium disk "C:\path\to\source.vdi" "C:\path\to\destination.vdi" --variant Fixed
1 2 3
vboxmanage clonemedium disk "D:\Virtual\Ubuntu Server 20.04 830\Ubuntu Server 20.04 830\Ubuntu Server 20.04 830.vdi" "D:\Virtual\Ubuntu Server 20.04 830\Ubuntu Server 20.04 830\Ubuntu Server 20.04 fixed.vdi" --variant Fixed