Opened 5 years ago
Closed 5 years ago
#19251 closed defect (obsolete)
Hot plug disk via storageattach not visible on guest OS
Reported by: | pivotal-jmyers | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 6.1.2 |
Keywords: | Cc: | pivotal-bosh-director-eng@… | |
Guest type: | Linux | Host type: | Linux |
Description
While attempting to attach a storage disk to a paused VM using the following:
`
VBoxManage import /home/pivotal/.bosh_virtualbox_cpi/stemcells/sc-f6012493-40e0-4205-6ecf-8a573b4b6265/image.ovf VBoxManage list vms VBoxManage modifyvm df7634e0-e8af-494e-ac68-ea5713e556a5 --name sc-f6012493-40e0-4205-6ecf-8a573b4b6265 VBoxManage snapshot sc-f6012493-40e0-4205-6ecf-8a573b4b6265 take prepared-clone VBoxManage clonevm sc-f6012493-40e0-4205-6ecf-8a573b4b6265 --snapshot prepared-clone --options link --name vm-b293c0fd-4117-403d-73fa-2ad88da90596 --uuid b293c0fd-4117-403d-73fa-2ad88da90596 --register VBoxManage modifyvm vm-b293c0fd-4117-403d-73fa-2ad88da90596 --name vm-b293c0fd-4117-403d-73fa-2ad88da90596 --memory 6144 --cpus 4 --paravirtprovider default --audio none VBoxManage modifyvm vm-b293c0fd-4117-403d-73fa-2ad88da90596 --nic1 hostonly --hostonlyadapter1 vboxnet0 --macaddress1 02E290DF6E6F VBoxManage modifyvm vm-b293c0fd-4117-403d-73fa-2ad88da90596 --nic2 natnetwork --nat-network2 NatNetwork --macaddress2 02C8E2BFBB74 VBoxManage createhd --filename /home/pivotal/.bosh_virtualbox_cpi/disks/disk-b47b71cc-3b7f-4894-6f96-84bcac081af9/disk.vmdk --size 16384 --format VMDK --variant Standard VBoxManage showvminfo vm-b293c0fd-4117-403d-73fa-2ad88da90596 --machinereadable VBoxManage storageattach vm-b293c0fd-4117-403d-73fa-2ad88da90596 --storagectl IDE --port 0 --device 1 --type hdd --medium /home/pivotal/.bosh_virtualbox_cpi/disks/disk-b47b71cc-3b7f-4894-6f96-84bcac081af9/disk.vmdk --mtype normal VBoxManage storageattach vm-b293c0fd-4117-403d-73fa-2ad88da90596 --storagectl SCSI --port 0 --device 0 --type dvddrive --medium /home/pivotal/.bosh_virtualbox_cpi/vms/vm-b293c0fd-4117-403d-73fa-2ad88da90596/env.iso VBoxManage startvm vm-b293c0fd-4117-403d-73fa-2ad88da90596 --type headless VBoxManage createhd --filename /home/pivotal/.bosh_virtualbox_cpi/disks/disk-44fdcc7e-dfed-4ed1-477d-0aed45a999c8/disk.vmdk --size 65536 --format VMDK --variant Standard VBoxManage showvminfo vm-b293c0fd-4117-403d-73fa-2ad88da90596 --machinereadable VBoxManage setextradata vm-b293c0fd-4117-403d-73fa-2ad88da90596 VBoxInternal2/SilentReconfigureWhilePaused 1 VBoxManage controlvm vm-b293c0fd-4117-403d-73fa-2ad88da90596 pause VBoxManage storageattach vm-b293c0fd-4117-403d-73fa-2ad88da90596 --storagectl IDE --port 1 --device 0 --type hdd --medium /home/pivotal/.bosh_virtualbox_cpi/disks/disk-44fdcc7e-dfed-4ed1-477d-0aed45a999c8/disk.vmdk --mtype normal VBoxManage controlvm vm-b293c0fd-4117-403d-73fa-2ad88da90596 resume
`
Expected disk to be attached and displayed in the guest os. Actually do not see any reference to the disk in the guest os.
When attaching the disk when guest OS is powered off, after rebooting the VM we see that the disk appears as /dev/sdc
.
This workflow used to work on VirtualBox 6.0 and previous version.
Attachments (1)
Change History (9)
comment:2 by , 5 years ago
Please attach at least a VBox.log of the affected VM while you try to attach a disk.
comment:3 by , 5 years ago
I've attached the vbox.log
from a VM that is exhibiting this issue. While it is not the same VM that is referenced in the commands above, the process to exhibit the issue should be identical.
comment:4 by , 5 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I should've read the list of VBoxManage commands more carefully, otherwise I've noticed that you are using a SCSI controller. Only the SATA/AHCI controller supports device hotplugging.
comment:5 by , 5 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
For full context we included all of the VBoxManage
commands that were run against the VM. That being said, there are multiple devices that we are attaching to the VM and the SCSI
device is not the device that we are trying to hotplug.
Specifically the following commands were where we are seeing the issue:
VBoxManage controlvm vm-b293c0fd-4117-403d-73fa-2ad88da90596 pause VBoxManage storageattach vm-b293c0fd-4117-403d-73fa-2ad88da90596 --storagectl IDE --port 1 --device 0 --type hdd --medium /home/pivotal/.bosh_virtualbox_cpi/disks/disk-44fdcc7e-dfed-4ed1-477d-0aed45a999c8/disk.vmdk --mtype normal VBoxManage controlvm vm-b293c0fd-4117-403d-73fa-2ad88da90596 resume
Also, as mentioned before, these exact commands work on the previous version of VirtualBox 6.0+, and this issue has only been present on VirtualBox 6.1+.
comment:6 by , 5 years ago
Ah, you use the "silent storage attachment reconfigure while VM is paused" hidden setting. That is not considered hotplugging because the guest wouldn't know about the storage changes. Everything makes sense now, I'll look into the issue.
comment:7 by , 5 years ago
Hmm, doesn't make quite sense still. From the commands and VBox.log I'm seeing that you have a disk attached to port 0 device 1 (primary slave) when the VM is started. When you pause it to reconfigure the attachment you attach a disk to port 1 device 0 (secondary master). Are you 100% sure that this setup worked in the past? Because it ought not to, the IDE controller is, 1st not hotplug capable and 2nd the silent reconfiguration setting suppresses any notification if there would be, so the guest has no chance to pick up the added device because it doesn't get informed about it...