It is a full installation to the USB key. I boot off the USB key and use the copy to RAM feature. Once the OS is loaded in RAM, I pull the key out so that nothing gets written to it.
I think this is contradictory ..... copy to ram is available for Live installs not full installs.
Seems to me you have a live install.
****
Log in to your install, with the USB device free to be inserted and withdrawn.
Run the command from there.
If you are running live then change the path of the 'of=/' part of the command to point to some place you have space for the resulting file ...... 4GB for a 4GB USB stick; 32GB for a 32GB USB stick etc.
@Just18, I saw your command dd if=/dev/sdX of=/home/<user name>/MyUSB.iso bs=2048 conv=sync,notrunc
How do I know what the X stands for and what user name to use?
Also, you mentioned, "You should be able to create an ISO of the USB device and then use that in Virtualbox."
<user name> is the user name of your log in account
You can determine 'X' by using
fdisk -l
in a terminal, as root, and checking the details of the disks that it lists.
If you do it without the USB device plugged in, and then with it plugged in, it will become apparent what the device designation is.
Change the command to
dd if=/dev/sdX of=/home/<user name>/MyUSB.
hdd bs=2048 conv=sync,notrunc
and use the MyUSB.hdd file as a virtual HDD for VBox to boot.
I did it here earlier today.
It works well.