* [Qemu-devel] -snapshot @ 2010-12-16 16:21 Amador Pahim 2010-12-16 16:28 ` Stefan Hajnoczi 0 siblings, 1 reply; 7+ messages in thread From: Amador Pahim @ 2010-12-16 16:21 UTC (permalink / raw) To: qemu-devel Hello, Is a bad idea if I run multiples "qemu" vms pointing to the same disk img using "-snapshot" parameter? What kind of problem may I have? Thanks, ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] -snapshot 2010-12-16 16:21 [Qemu-devel] -snapshot Amador Pahim @ 2010-12-16 16:28 ` Stefan Hajnoczi 2010-12-16 16:34 ` Amador Pahim 0 siblings, 1 reply; 7+ messages in thread From: Stefan Hajnoczi @ 2010-12-16 16:28 UTC (permalink / raw) To: Amador Pahim; +Cc: qemu-devel On Thu, Dec 16, 2010 at 4:21 PM, Amador Pahim <amador@pahim.org> wrote: > Is a bad idea if I run multiples "qemu" vms pointing to the same disk > img using "-snapshot" parameter? What kind of problem may I have? It should work fine. -snapshot means that QEMU creates a temporary qcow2 file backed by the disk image you've given it. No changes will be made to your disk image - it is read-only. Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] -snapshot 2010-12-16 16:28 ` Stefan Hajnoczi @ 2010-12-16 16:34 ` Amador Pahim 2010-12-16 17:45 ` Stefan Hajnoczi 0 siblings, 1 reply; 7+ messages in thread From: Amador Pahim @ 2010-12-16 16:34 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: qemu-devel Hello Stefan, Thank you for your answer. Just one more question: If, while my "snapshot" vms are running, the main disk is modified by a non "snapshot" vm? For example, installing some extra software.. this can freeze vms or something? Regards, Pahim On Thu, Dec 16, 2010 at 2:28 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > On Thu, Dec 16, 2010 at 4:21 PM, Amador Pahim <amador@pahim.org> wrote: >> Is a bad idea if I run multiples "qemu" vms pointing to the same disk >> img using "-snapshot" parameter? What kind of problem may I have? > > It should work fine. -snapshot means that QEMU creates a temporary > qcow2 file backed by the disk image you've given it. No changes will > be made to your disk image - it is read-only. > > Stefan > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] -snapshot 2010-12-16 16:34 ` Amador Pahim @ 2010-12-16 17:45 ` Stefan Hajnoczi 2010-12-16 18:16 ` Stefan Weil 0 siblings, 1 reply; 7+ messages in thread From: Stefan Hajnoczi @ 2010-12-16 17:45 UTC (permalink / raw) To: Amador Pahim; +Cc: qemu-devel On Thu, Dec 16, 2010 at 4:34 PM, Amador Pahim <amador@pahim.org> wrote: > Thank you for your answer. Just one more question: If, while my > "snapshot" vms are running, the main disk is modified by a non > "snapshot" vm? For example, installing some extra software.. this can > freeze vms or something? Correct, it is not safe to modify the base image while there is another disk image backed off it. The reason for this is that the image only needs to store the changes that were made on top of the base image. For anything which hasn't been modified it will go back to the base image and read data from there. If you modify the base image, then the filesystem in the base image is not longer what your image file was created from and you have an inconsistent view of the disk. It leads to odd behavior and is unsafe. Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] -snapshot 2010-12-16 17:45 ` Stefan Hajnoczi @ 2010-12-16 18:16 ` Stefan Weil 2010-12-16 19:00 ` Amador Pahim 2010-12-17 9:52 ` Kevin Wolf 0 siblings, 2 replies; 7+ messages in thread From: Stefan Weil @ 2010-12-16 18:16 UTC (permalink / raw) To: Amador Pahim; +Cc: Stefan Hajnoczi, qemu-devel Am 16.12.2010 18:45, schrieb Stefan Hajnoczi: > On Thu, Dec 16, 2010 at 4:34 PM, Amador Pahim <amador@pahim.org> wrote: >> Thank you for your answer. Just one more question: If, while my >> "snapshot" vms are running, the main disk is modified by a non >> "snapshot" vm? For example, installing some extra software.. this can >> freeze vms or something? > > Correct, it is not safe to modify the base image while there is > another disk image backed off it. > > The reason for this is that the image only needs to store the changes > that were made on top of the base image. For anything which hasn't > been modified it will go back to the base image and read data from > there. > > If you modify the base image, then the filesystem in the base image is > not longer what your image file was created from and you have an > inconsistent view of the disk. It leads to odd behavior and is > unsafe. > > Stefan There are useful scenarios where using the same disk simultaneously from a snapshot vm and a real system works. If you have a hard disk with a dual boot configuration, it is sometimes useful to boot one configuration with the real system, then start qemu and boot the second configuration. Even booting the same configuration twice (once with the real machine, once with qemu snapshot) is sometimes useful and works to a limited degree. It is a simple way to try new bootloader configurations or other boot setups. Regards Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] -snapshot 2010-12-16 18:16 ` Stefan Weil @ 2010-12-16 19:00 ` Amador Pahim 2010-12-17 9:52 ` Kevin Wolf 1 sibling, 0 replies; 7+ messages in thread From: Amador Pahim @ 2010-12-16 19:00 UTC (permalink / raw) Cc: Stefan Hajnoczi, qemu-devel Thanks. Some stuff are clear now. I started a VDI Open Source project (http://www.ucs.br/projeto/osdvt/) and your information will help a lot. Pahim On Thu, Dec 16, 2010 at 4:16 PM, Stefan Weil <weil@mail.berlios.de> wrote: > Am 16.12.2010 18:45, schrieb Stefan Hajnoczi: >> >> On Thu, Dec 16, 2010 at 4:34 PM, Amador Pahim <amador@pahim.org> wrote: >>> >>> Thank you for your answer. Just one more question: If, while my >>> "snapshot" vms are running, the main disk is modified by a non >>> "snapshot" vm? For example, installing some extra software.. this can >>> freeze vms or something? >> >> Correct, it is not safe to modify the base image while there is >> another disk image backed off it. >> >> The reason for this is that the image only needs to store the changes >> that were made on top of the base image. For anything which hasn't >> been modified it will go back to the base image and read data from >> there. >> >> If you modify the base image, then the filesystem in the base image is >> not longer what your image file was created from and you have an >> inconsistent view of the disk. It leads to odd behavior and is >> unsafe. >> >> Stefan > > There are useful scenarios where using the same disk > simultaneously from a snapshot vm and a real system > works. > > If you have a hard disk with a dual boot configuration, > it is sometimes useful to boot one configuration with > the real system, then start qemu and boot the second > configuration. > > Even booting the same configuration twice > (once with the real machine, once with qemu snapshot) > is sometimes useful and works to a limited degree. > It is a simple way to try new bootloader configurations > or other boot setups. > > Regards > Stefan > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] -snapshot 2010-12-16 18:16 ` Stefan Weil 2010-12-16 19:00 ` Amador Pahim @ 2010-12-17 9:52 ` Kevin Wolf 1 sibling, 0 replies; 7+ messages in thread From: Kevin Wolf @ 2010-12-17 9:52 UTC (permalink / raw) To: Stefan Weil; +Cc: Stefan Hajnoczi, qemu-devel, Amador Pahim Am 16.12.2010 19:16, schrieb Stefan Weil: > Am 16.12.2010 18:45, schrieb Stefan Hajnoczi: >> On Thu, Dec 16, 2010 at 4:34 PM, Amador Pahim <amador@pahim.org> wrote: >>> Thank you for your answer. Just one more question: If, while my >>> "snapshot" vms are running, the main disk is modified by a non >>> "snapshot" vm? For example, installing some extra software.. this can >>> freeze vms or something? >> >> Correct, it is not safe to modify the base image while there is >> another disk image backed off it. >> >> The reason for this is that the image only needs to store the changes >> that were made on top of the base image. For anything which hasn't >> been modified it will go back to the base image and read data from >> there. >> >> If you modify the base image, then the filesystem in the base image is >> not longer what your image file was created from and you have an >> inconsistent view of the disk. It leads to odd behavior and is >> unsafe. >> >> Stefan > > There are useful scenarios where using the same disk > simultaneously from a snapshot vm and a real system > works. > > If you have a hard disk with a dual boot configuration, > it is sometimes useful to boot one configuration with > the real system, then start qemu and boot the second > configuration. > > Even booting the same configuration twice > (once with the real machine, once with qemu snapshot) > is sometimes useful and works to a limited degree. > It is a simple way to try new bootloader configurations > or other boot setups. Right, though this doesn't contradict what Stefan said. It only works because in fact you don't modify the parts that your guest reads. Kevin ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-12-17 9:51 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-12-16 16:21 [Qemu-devel] -snapshot Amador Pahim 2010-12-16 16:28 ` Stefan Hajnoczi 2010-12-16 16:34 ` Amador Pahim 2010-12-16 17:45 ` Stefan Hajnoczi 2010-12-16 18:16 ` Stefan Weil 2010-12-16 19:00 ` Amador Pahim 2010-12-17 9:52 ` Kevin Wolf
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).