Running VMs with data images on external storage

863 views
Skip to first unread message

DennisLfromGA

unread,
May 5, 2022, 2:03:15 PM5/5/22
to Chromium OS Discussion
I've been interested in running VMs with data images on external storage and was following the crbug linked below and noticed that it is now 'fixed':


So I followed the instructions in the Crostini documentation linked below:


I created a 4GB 'extra-disk.img' file successfully and then started the termina VM using it, also successfully I believe since there was a vmc process running with the '--extra-disk' argument.

Screenshot 2022-05-05 1.44.15 PM.png

Screenshot 2022-05-05 1.45.16 PM.png

I launched a Terminal session and started my penguin container, I can see the mountpoint for the extra-disk image but I cannot figure out a way to use it.

Screenshot 2022-05-05 1.47.04 PM.png

It doesn't appear among my 'Linux Shared folders' and I can't write to the /mnt/external/0 location with or without root permission.

So, I think there might be something I missed or it's not working as intended, possibly.

If anyone has had success with this I would be grateful if you could point out what I might be doing wrong or not doing.

We've been getting issues in the Chromebook forum from users having only a 16GB internal storage drive that would like to implement this feature but, so far, all attempts have been failing.

Thanx in advance,
~DennyL

Keith I Myers

unread,
May 5, 2022, 2:13:40 PM5/5/22
to Denny Lockhart, Chromium OS Discussion
Hello Denny,
I have gotten it to work but the instructions do need to be a bit more clear.

In crosh type
vmc enter termina
lxc config device add penguin extra_disk_0 disk source=/mnt/external/0 path=/home/username/directory

Replace username with your Lunix username and directory with the folder you wish to use. So in my case if I wanted to mount it to /home/kmyers/Workspace, I would use 

lxc config device add penguin extra_disk_0 disk source=/mnt/external/0 path=/home/kmyers/Workspace

I will warn you that your mileage will vary, it is not always consistent with remounting the disk and I have had cases where the disk will unmount randomly, often when my Chromebook goes to sleep. It is strongly recommended to keep things backed up if you try this.

-Keith

--
--
Chromium OS Discussion mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-discuss
---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dis...@chromium.org.

Denny Lockhart

unread,
May 5, 2022, 2:21:51 PM5/5/22
to Keith I Myers, Chromium OS Discussion
That worked Keith, thanx. 👍

Screenshot 2022-05-05 2.18.28 PM.png

It would be great if the Crostini docs be updated to include that crucial step.

Thanx again,
~DennyL

DennisLfromGA

unread,
May 6, 2022, 11:04:13 AM5/6/22
to Chromium OS Discussion, DennisLfromGA, Chromium OS Discussion, keithiok...@gmail.com
Now I can't start the VM & container without first inserting the external media with the extra-disk.img file. :-(

Screenshot 2022-05-06 10.53.47 AM.png

This is just to much of a pain in its current state for me to fool with, plus I don't see how having an extra-disk image for storage is any better than inserting external media and 'Sharing it with Linux'. It very well could be that I don't fully understand how it's supposed to be used I guess.

~DennyL

Keith I Myers

unread,
May 6, 2022, 11:07:20 AM5/6/22
to DennisLfromGA, Chromium OS Discussion
The main advantage is that it supports file attributes. You cannot chmod +x a file that is "shared with Linux" but you can if mounted as a extra disk, this opens up the door for applications to be installed on external storage or software developers to use it as their workspace. 

DennisLfromGA

unread,
May 6, 2022, 11:14:47 AM5/6/22
to Chromium OS Discussion, keithiok...@gmail.com, Chromium OS Discussion, DennisLfromGA
Well, those of us in Developer mode can remount the external media with the needed permissions, luckily.

Screenshot 2022-05-06 11.12.20 AM.png

Of course, that's not an option for the majority of Crostini users.

DennyL

Reply all
Reply to author
Forward
0 new messages