考虑到,我的Ubuntu具有以下设置:
$ VBoxManage showvminfo ubuntu
...
Storage Controller Name (0): ide
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
Storage Controller Name (1): sata
Storage Controller Type (1): IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 30
Storage Controller Port Count (1): 30
Storage Controller Bootable (1): on
ide (0, 0): Empty
sata (0, 0): /Users/dchebakov/VirtualBox VMs/ubuntu/resized.vmdk (UUID: bd4c73bc-0f0c-4b29-a01e-caefb90a5cfa)
...
有一种HDD介质以port 0
的形式连接到SATA device 0
。然后,当我尝试将另一台设备作为设备1连接到端口0时:
$ VBoxManage storageattach ubuntu --storagectl sata --device 1 --port 0 --medium cloned.vdi --type hdd
但有一个例外:
$ VBoxManage: error: The port and/or device parameter are out of range: port=0 (must be in range [0, 29]), device=1 (must be in range [0, 0])
因此,我无法将2台设备连接到一个端口。那么,实际的端口和设备是什么? 我可以将端口想象成USB端口,而将设备想象成USB记忆棒吗? 如果是这样,设备为何有数字?我可以将多个设备连接到一个端口吗?