How do I create a tmpfs virtual machine?

I’m using ext4 filesystem without lvm so I can’t create a pool, I created a tmpfs directory and mounted it, how do I run the next VMs I’m going to create entirely in tmpfs?

Check the following:

His script doesn’t work for me, I don’t have lvm, and if I use ext4 with lvm, the system corrupts into empty files at the install step.

The script creates a new pool based on the file driver and doesn’t interact with lvm. Where exactly does it stop working?

There are several scripts there, I don’t know which one is, can you copy it for me? Thanks.

Each script has a different purpose. The one that creates everything is the first one.

To create a RAM-based pool:

qvm-pool add ram_pool file -o revisions_to_keep=1 -o dir_path=/tmp/pool -o ephemeral_volatile=True

how do I run the next VMs I’m going to create entirely in tmpfs?

qvm-create --pool private=ram_pool --pool volatile=ram_pool --label=red myqube
qvm-volume config myqube:root rw False

Thanks. I want to create a one-time VM based on a certain appvm and specify the storage pool, I succeeded with graphical, do you know what I should enter at the command line?

So, your actual question is how to create a DispVM, based on a DVM template (AppVM), using a predefined tmpfs-based storage pool.

There are certain specifics which don’t allow to do this directly:

user@dom0:~ > qvm-create --pool private=ram_pool --pool volatile=ram_pool --label=red --class DispVM --template=tb-dvm myqube
app: Error creating VM: Snapshot volume private must be in the same pool as its origin (private volume of template),cannot move to pool ram_pool

That is the reason why the ram-qube script in the other thread copies the AppVM to RAM and starts it from there.