[Solved] How to remove/replace raw disk from CLI

This is for discussing general topics about how to use VirtualBox.
Post Reply
Florinasdragalas
Posts: 2
Joined: 7. Jun 2019, 09:42

[Solved] How to remove/replace raw disk from CLI

Post by Florinasdragalas »

Hello
SSD broke;VM doesn't start I want to replace with new one.
I attached old one with those commands to a VM:

Code: Select all

VBoxManage internalcommands createrawvmdk -filename /home/neymar/d5.vmdk -rawdisk /dev/disk/by-id/ata-INTEL_SSDSC2CW180A3_xxxxxxxxxxxxx

VBoxManage storageattach "helios" --storagectl "SATA Controller" --port 4 --device 0 --type hdd --medium /home/neymar/d5.vmdk
How to remove d5.vmdk from virtual box from CLI ?

Thank You,
Florin
Last edited by socratis on 7. Jun 2019, 16:29, edited 2 times in total.
Reason: Marked as [Solved].
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: How to remove/replace raw disk from CLI

Post by socratis »

Did you for real obfuscate the serial number of your hard disk? Seriously now? :roll:

If you want to remove the attached medium from a VM, you got to issue a similar command, with different switches/options:
VBoxManage storageattach "helios" --storagectl "SATA Controller" --port 4 --device 0 --type hdd --medium none
Basically you replace the actual medium name with "none". For more information, see ch. 8.17 VBoxManage storageattach:
• none
  • Any existing device should be removed from the given slot.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Florinasdragalas
Posts: 2
Joined: 7. Jun 2019, 09:42

Re: How to remove/replace raw disk from CLI

Post by Florinasdragalas »

Hi,
Thank You,

It worked !

Best Regards,
Florin
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: How to remove/replace raw disk from CLI

Post by socratis »

Glad I could help. Marking as [Solved].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply