VMware Communities
tsxi
Contributor
Contributor

Idea / Feature Suggestion: Useful to have vmdk disks, usually SCSI / SATA / IDE, make possible for mounting as USB disk as well

Smiley Happy

I am a happy user of Workstation for over a decade, since days of I think version 4 workstation.

Recently, began to use Tails Linux https://tails.boum.org/ and of course it works with Workstation 12 pro.

But I had been only booting up Tails using ISO image live CD mode. In this mode it can not create a persistent file to store some info or settings. As result I am using vmware snapshots to store.

Tails only creates persistence file to store info when it boots up using USB thumb drive. Yes, I had been able to use USB thumb drive and booted up in EFI BIOS mode in vmware too. But I have to physically plug in a USB thumb drive too.

It is kind of good if VMware will allow a vmdk file virtual disk - same as those we connected via SATA / SCSI, to be also simulated to be (HOT) plugged into VMs. Then in this case it will become very convenient.

I think for more than just Tails purpose, if VMware could hot-plug VMDK disks as USB device, it serves a whole lot of useful functions for test / development and powerful usages.

There are physical USB HDD SSD and there are physical USB thumb drives. I suppose VMDK files can simulate them, but I can be ignorant or wrong.

My suggestion is to have essentially thumb drives / SDcards / MicroSD cards simulated by VMware using a VMDK like file / files, this will be a new dimension of simulation that is still a lacking now.

Smiley Happy

Thanks & regards

tsxi

14 Replies
continuum
Immortal
Immortal

Hi
your idea makes sense - I thought the same several years ago and made the same feature request several times.
So dont hold your breath while waiting for this feature.
Ulli


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
tsxi
Contributor
Contributor

Thanks for the respond

Smiley Happy

I found that this might be better if I had created it as an IDEA in this community, I will try that later.

Reply
0 Kudos
Zongmin
VMware Employee
VMware Employee

thanks tsxi and Ullli for this feature request! This sounds a user case that will be convenient to Workstation users.

Sorry for replying late for this thread. I already put it into the backlog.

-ZM

bonnie201110141
VMware Employee
VMware Employee

Hi,

Can you try adding below line to the .vmx file under your VM directory?

ehci:#.present = "TRUE"

ehci:#.deviceType = "disk"

ehci:#.fileName = "pathToFile.vmdk"

where # is a number ranging from 0 to 5 (or 7 if you configure the EHCI ports in the configuration file).

Then the .vmdk will be a USB disk in guest. Try it and let us know if it is what you want. Thanks!

continuum
Immortal
Immortal

> Try it and let us know if it is what you want. Thanks!
Are you serious ???
Man - this is great ! - why didn't you tell us about this feature ?
It seems to be implemented since at least  WS 12 - maybe even longer ?
This is a game-changer feature for all users who develope USB-bootable tools and LiveCDs.
If those users create the USB-VMDK as type monolithicFlat they can work on their USB-boot images inside a VM conveniently and transfer it to a real device with dd.
This maybe a game-changer feature for all users that want to create VMs with disks that maybe absent.
With SCSI / SATA and IDE-vmdks a VM will not boot if the files are not available.
If a USB-vmdk is missing it may still be possible to start the VM - I still need to test this though.
This maybe a game-changing feature for all those users who missed the option to feed a single partition image to a VM.
This feature is so useful that I even consider to add Workstation to my VMFS-recovery-CD again.
Thank you guys - please prepare yourself for follow-up questions Smiley Wink
Regards Ulli

To do: check if this is also implemented in ESXi


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

a_p_
Leadership
Leadership

It seems to be implemented since at least  WS 12 - maybe even longer ?

I just tried it with WS 8.0 on a Windows 2016 Server VM. It worked.

André

continuum
Immortal
Immortal

Andre - did you know about this before ?

Virtual USB-disks | VM-Sickbay

Ulli


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
a_p_
Leadership
Leadership

No, that was new to me.

Regarding the read-only issue you mentioned. Did you have e.g. a CD-ROM drive mounted on the guest OS before using the same drive letter?

André

Reply
0 Kudos
continuum
Immortal
Immortal

I used my Ubuntu-LiveCD as ISO using sata0.
This should not have any impact on this question.
My first tests suggest that the way you format the image may make the difference.
I tried to format with standard GPT and also by simply formatting the complete device.
Option A> the normal way
gdisk /dev/sda - create GPT with one Linux partition
mkfs.ext3 /dev/sda1 - create a filesystem
Option B> this would be something new - otherwise only USB-sticks typically use a single partition without MBR / GPT
mkfs.ext - create a filesystem
Both would be useful.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
bonnie201110141
VMware Employee
VMware Employee

This is not an officially released feature. But basic function works on Workstation and ESXi.

To make the USB disk in guest writable, the following option should be added:

ehci:#.readonly = "FALSE"

And you can also connect a CDROM image to the guest as a USB a usb device:

  • ehci:#.present = "TRUE"
  • ehci:#.deviceType = "cdrom"
  • ehci:#.fileName = "pathToFile.iso"
  • ehci:#.readonly = "FALSE"

Please let us know your further comments or requests. Currently this feature is a backlog in our list and we will certainly make the feature more complete and add UI to expose the feature.

continuum
Immortal
Immortal

> This is not an officially released feature. But basic function works on Workstation and ESXi.
Thank you very much for the update. Very good to know.
By the way - I believe that a large part of the Workstation "hard core" users do not care at all wether a feature is officially supported.
We will use them anyway as long as the feature is implemented in a way that is consistent in the use of the required vmx-parameters and when there is a consistency across versions and platforms.
In the past we heard the statement: we only officially support those features that we also expose in the GUI.
We accepted that long ago.
So I would not put any extra work in exposing this feature in the GUI.
This is a feature that will probably go unnoticed by most of your users.
For us powerusers it is probably sufficient if you simply keep us uptodate when ever the behaviour of this feature changes in future releases.
There is one follow up question that already came to my mind.
How - if at all,  can we change the vendor-string that is presented to the guestOS ?
This seems to be something like
VMware_Virtual_Storage_some uuid-0: partition number
Before I forget it: this "small discovery" today is the first unexpected pleasant surprise I received from the "Workstation front" in years.
Maybe there is still reason to hope ....
Thank you
Ulli


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

bonnie201110141
VMware Employee
VMware Employee

Sorry for the late response! But the developer is busy with other things. Currently changing device name is not feasible. But if there is a strong request, we can add one.

Reply
0 Kudos
raywood
Enthusiast
Enthusiast

A few years later ...

I arrive here due to a link in another discussion. My attempt to follow the foregoing steps resulted in an error:


The VMware Tools power-on script did not run successfully in this virtual machine. If you have configured a custom power-on script in this virtual machine, make sure that it contains no errors.

I think the script did contain errors. It looked like it was pausing at some error statements while executing, though they ran too fast for me to document easily.

I am wondering if (a) the recommended steps don't work in VMware Player, (b) they don't work in Workstation anymore either, and/or (c) I was working in the wrong place.

By that last remark, I mean that I edited the .vmx for the primary VM, not for the one being added as a USB disk. Possibly that was the wrong .vmx to edit.

The edits I made consisted of adding these lines to the .vmx for the primary VM on a Windows 10 host, where Ubuntu.vmdk is the VMDK for the VM that I hoped to add as a USB device:

 

ehci:0.present = "TRUE" 
ehci:0.deviceType = "disk" 
ehci:0.fileName = "V:\Ubuntu\Ubuntu.vmdk"

 

Any ideas?

Reply
0 Kudos
raywood
Enthusiast
Enthusiast

I have figured it out. See my writeup.