Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not modify the qcow-image on runtime? #20

Open
pwFoo opened this issue Oct 12, 2016 · 4 comments
Open

Do not modify the qcow-image on runtime? #20

pwFoo opened this issue Oct 12, 2016 · 4 comments

Comments

@pwFoo
Copy link

pwFoo commented Oct 12, 2016

At the moment the changes written to the qcow image directly I think? Because delete and recreate the container keeps all the changes.

A option to keep the qcow (base) image unchanged would be great, but save the changes to be container restart save?

@methadata
Copy link
Collaborator

You can achieve what you need if you build a new container based on this one and add the image you want to run to the container.

Take a look at the dockerfile in VSC directory of this project. The image is not included in the repo because it's proprietary software from Nokia, but you can see how easy is to do it.

We use this method to launch our own services. Once you build a docker image with the VM image on it, you have the same VM each time you run it.

Anyway, I will explore this as an optional flag, if qemu has that option.

@pwFoo
Copy link
Author

pwFoo commented Oct 12, 2016

As optional flag would be fine.

The method you explained is the same way it is done with RancherVM?
Would be fine too :)

@pwFoo
Copy link
Author

pwFoo commented Aug 8, 2017

Maybe create a image with image embedded is the best way (docker image, version, tags, ...), but it should be possible with qemu snapshots?
https://wiki.qemu.org/index.php/Documentation/CreateSnapshot#Modifying_the_backing_file

@segator
Copy link

segator commented Jan 12, 2018

I did my own version of KVM in docker what I do
when the container start is create a linked qcow image from the base imatge, the newly created qcow2 file is exposed in the docker volume, so you can persist changes outside the container and can be persisted. Also created a smb service on the container and exposed as volume so the guest OS can have like a container volume system(but the performance is degraded)
Only point pending to fix is how to expose environment variables from the container to the kvm guest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants