How do you set Virtual Storage serial numbers?

Discussions about using Windows guests in VirtualBox.
Post Reply
Mike Lightning
Posts: 7
Joined: 31. Jul 2016, 10:50
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Xp Pro sp3
Contact:

How do you set Virtual Storage serial numbers?

Post by Mike Lightning »

Hello, I was hoping someone could help me out with this question of mine. I know how to change a hard drive's serial number using Vboxmanage but I can't figure out how to change a virtual usb mass storage device's.

I will be eternally grateful for the solution.

-Sincerely,
Mike Lightning.
:D
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: How do you set Virtual Storage serial numbers?

Post by socratis »

Although I would appreciate your eternal gratefulness, I don't think that it is something that VirtualBox can interfere with. It does have control over its virtual hard disks, but not over every USB device out there. It simply passed through the information.

And maybe you should start thinking not in VirtualBox terms. Just think of how would you change the serial number of a USB storage device. The fact that you're using it in VirtualBox, does not make it a virtual storage device.
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.
Mike Lightning
Posts: 7
Joined: 31. Jul 2016, 10:50
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Xp Pro sp3
Contact:

Re: How do you set Virtual Storage serial numbers?

Post by Mike Lightning »

Thanks for the response. I appreciate it.

I know how to change the actual USB thumb drive's serial number in it's physical form using a program called mptools. I've made several physical copies just in case it was lost/stolen/damaged. Now I'm attempting the same process albeit in all digital form, for convenience and peace of mind.

I've backed up the USB thumb drive as a virtual hard drive. Then I'm loading the .vhd file in virtualbox as a USB controller. Which shows up in windows with no serial number. The .vhd loads as a USB controller just fine in my guest system and I have access to the files but since the serial number is blank my legacy apps don't recognize it.

-----------

Found the following commands in a post regarding hard disk drives and Vboxmanage but after tinkering all night I couldn't figure out how to apply it to USB drives. So I turn to the forums for help :) Thank you.

VBoxManage setextradata "VM name"
"VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber" "serial"
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: How do you set Virtual Storage serial numbers?

Post by socratis »

Mike Lightning wrote:I've backed up the USB thumb drive as a virtual hard drive. Then I'm loading the .vhd file in virtualbox as a USB controller. Which shows up in windows with no serial number. The .vhd loads as a USB controller just fine in my guest system and I have access to the files but since the serial number is blank my legacy apps don't recognize it.
I'm sorry but I don't quite understand what you mean by that whole paragraph. Can you elaborate on the process? Because each and every sentence in there needs some explanation.
- How did you back up the USB as a virtual hard drive???
- How do you load a VHD as a USB controller???
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.
Mike Lightning
Posts: 7
Joined: 31. Jul 2016, 10:50
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Xp Pro sp3
Contact:

Re: How do you set Virtual Storage serial numbers?

Post by Mike Lightning »

I'm sorry but I don't quite understand what you mean by that whole paragraph. Can you elaborate on the process? Because each and every sentence in there needs some explanation.
- How did you back up the USB as a virtual hard drive???
- How do you load a VHD as a USB controller???
I used a program called winimage to make a (.vhd) copy of my USB thumb drive.

Then in Virtualbox manager window I clicked on "Storage" then "Add new storage controller > USB Controller" then "Add Hard Disk > Choose Existing Disk" and loaded the .vhd file I made with winimage. (user manual section 5.1: Attach a USB MSD controller to your VM.)

It shows up in my guest OS as a USB drive just as in real life. The problem i'm trying to solve is that the serial number in the guest OS is blank. Because instead of having the physical drive mounted i'm using a virtual drive. I added a screen shot showing the information that ChipEasy gives. The red arrow indicates the serial number is blank. All other information has been generated by virtualbox except the serial number.
Chip Easy read out of a Virtual USB drive in Virtualbox
Chip Easy read out of a Virtual USB drive in Virtualbox
noserialinvirtualbox.png (62.43 KiB) Viewed 8232 times
-----
Virtualbox generated it's own vendor and model information (vendor: VBOX, model: HARDDISK) but not a serial number when it mounted the virtual USB mass storage device. For Comparison, this is the ChipEasy report for the actual physical USB thumb drive when it's plugged in to a USB slot.

Logical drive : E:\ Capacity: 0.1G
Device ID : VID = 0C76 PID = 0005
Device SN : 0507096030470
Device version : 1.00

Device vendor :
Device model : TS64MJFLASHA
Protocol : USB2.0
Max power : not support

Partition type : FAT32 Device active : OK
Aligned state : Misaligned

Controller : SSS
Controller model: 24
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: How do you set Virtual Storage serial numbers?

Post by mpack »

The serial number (*) is stored in the electronics of the USB device. It isn't part of the disk image. If it was then every time you formatted the disk, the serial number would be reset.

(*) Assuming you have a device that allows you to change the serial number. In fact I don't see why there'd be a generic interface for this, though I appreciate that specific devices might have this feature.

A USB thumb drive is (1) a USB slave chipset with (2) flash memory attached. It would be useful to recognize the difference between (1) and (2). Imaging (2) will not give you something with the features of (1).

It's exactly the same as if you had a PC with a disk drive. In effect your question is, "I have captured an image of the disk drive. How do I change the BIOS signature"? Of course the BIOS is on the motherboard, not the disk image.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: How do you set Virtual Storage serial numbers?

Post by scottgus1 »

Mounting a virtual drive as a USB device in a guest appears to be a new version 5 thing, manual, section 5.1. It's entirely possible the developers haven't put in the code for editing the serial number. See the manual, section 8.18 and 8.19 for the commands they seem to have now for attaching disks via the command line, to see if there's anything that may help. (I didn't notice anything myself.)

If you really need this then post it as an enhancement on the Bugtracker. The developers may have forgotten about it or never noticed it, or they may have deliberately chosen not to do it. Maybe they'll let you know.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: How do you set Virtual Storage serial numbers?

Post by mpack »

Hmm. I didn't think that was what he was talking about (and it's a feature I haven't checked out yet), but I wouldn't expect it to make a difference to the above discussion. The serial number can't be in the disk image, it must be in the USB controller electronics, even if the latter is virtual. And, I don't believe there will be a standard tool for configuring that serial number that comes from the physical world - if it exists then it'll exist as metadata in the media registry.
Mike Lightning
Posts: 7
Joined: 31. Jul 2016, 10:50
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Xp Pro sp3
Contact:

Re: How do you set Virtual Storage serial numbers?

Post by Mike Lightning »

mpack wrote:The serial number (*) is stored in the electronics of the USB device. It isn't part of the disk image. If it was then every time you formatted the disk, the serial number would be reset.

(*) Assuming you have a device that allows you to change the serial number. In fact I don't see why there'd be a generic interface for this, though I appreciate that specific devices might have this feature.

A USB thumb drive is (1) a USB slave chipset with (2) flash memory attached. It would be useful to recognize the difference between (1) and (2). Imaging (2) will not give you something with the features of (1).

It's exactly the same as if you had a PC with a disk drive. In effect your question is, "I have captured an image of the disk drive. How do I change the BIOS signature"? Of course the BIOS is on the motherboard, not the disk image.
Hey everyone, been busy at work. Thank you scottgus1 and everyone/anyone taking time out of their day to contribute to this thread.

I know the serial number doesn't transfer with the disk image, but neither did the USB's Vendor, model, VID or PID, information. Vbox is assigning the vendor "Vbox" and Model "HardDisk" and different values for pid and vid. My theory is since Vbox is assigning custom names and values for those fields then it may also be able to assign a serial number.

The device I have that changes serial numbers in the real world is not generic, it is software specific to the USB chip. It's called MpTools and each USB device uses a different build. Finding the software was hard and then learning how to use it wasn't easy either because all information about it is in Chinese. (I don't speak Chinese :mrgreen:)

Thanks for any input. :)
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: How do you set Virtual Storage serial numbers?

Post by socratis »

Mike Lightning wrote:Vbox is assigning the vendor "Vbox" and Model "HardDisk" and different values for pid and vid.
Nooooowwwww, it makes sense. Sort of...

You don't want to change the serial number of a USB device, you want to change the serial number of a USB-presented virtual hard disk!!! Two completely different things! Wrong use of terminology that can lead to a misunderstanding.

I had a chance to read your last post, before you edited it and left out the parts about the what, the why and the how you want to use this. You should have left it in there, because it makes your thoughts clearer. Especially the part where the manufacturer told you of a way to turn the device into something ... portable/clonable. I'll summarize from what I can remember from (really late) last night. Please feel free to correct what I've understood so far. I might be missing a couple of details, bug the gist of it is:
  • You had a USB device (A), controlling hardware of $$,$$$ that was not supported anymore. You managed (after many years) to successfully clone said device.
  • It works on a desktop (as a USB device), but you'd like to have working it on a Surface tablet (somehow?). Which has one USB port only and which is already occupied.
  • So cloning A as a virtual HD was your best option. You cloned A and you attached it as a virtual HD.
  • VirtualBox presents the virtual HD (your cloned A) as ... an HD, with its own vID (VBOX) and pID (HARDDISK), but no serial number.
  • Since you attached it a USB HD, you cannot change the serial number via the normal (VBoxManage) methods.
  • Your software fails. You need that serial to be presented to the software.
My advice? A USB splitter. Done.
Mike Lightning wrote:Then in Virtualbox manager window I clicked on "Storage" then "Add new storage controller > USB Controller" then "Add Hard Disk > Choose Existing Disk" and loaded the .vhd file I made with winimage.
It didn't hit me until I re-read your whole thread. Why a USB controller? Because it originates from a USB device? Have you tried instead of a USB controller to attach it through an IDE or a SATA controller? I have a feeling that the built-in VBoxManage commands could work then. Try it out...

PS. I saw that you opened up ticket #15756 for this. Unless you make your case crystal clear, not too many of the developers are going to know what you're referring to, or, more importantly, what you're trying to achieve. And, BTW, this is where you should have started. Your end goal, not the problems with an unknown path to a potential solution.
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.
Mike Lightning
Posts: 7
Joined: 31. Jul 2016, 10:50
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Xp Pro sp3
Contact:

Re: How do you set Virtual Storage serial numbers?

Post by Mike Lightning »

socratis wrote: Wrong use of terminology that can lead to a misunderstanding.
Indeed :lol:
socratis wrote: I had a chance to read your last post, before you edited it and left out the parts about the what, the why and the how you want to use this. You should have left it in there, because it makes your thoughts clearer.
Thank you, I was feeling that it was a "Wall of text" shortened it to a tldr :mrgreen:
socratis wrote: It didn't hit me until I re-read your whole thread. Why a USB controller? Because it originates from a USB device? Have you tried instead of a USB controller to attach it through an IDE or a SATA controller? I have a feeling that the built-in VBoxManage commands could work then. Try it out...
I like the idea, I'm going to figure this out :P
Post Reply