Re: [Qemu-devel] Live Migration with different block devices

2014-06-25 Thread Paolo Bonzini
Il 25/06/2014 16:32, Xiongzi Ge ha scritto: I should make it clearer. I want to use a device for caching for the guest in host A. Then after the guest migrating to Host B, there is also a device for caching in Host B. I want to the guest can access the new cache device in Host B at first automa

Re: [Qemu-devel] Live Migration with different block devices

2014-06-25 Thread Xiongzi Ge
Hi Paolo, I should make it clearer. I want to use a device for caching for the guest in host A. Then after the guest migrating to Host B, there is also a device for caching in Host B. I want to the guest can access the new cache device in Host B at first automatically. I also want the guest can

Re: [Qemu-devel] Live Migration with different block devices

2014-06-25 Thread Paolo Bonzini
Il 25/06/2014 16:14, Xiongzi Ge ha scritto: Is there a good way to handle the memory in the guest via qemu? I'm not sure what you're asking exactly, but I'm pretty sure the answer is no. You're confusing what QEMU is doing and what the guest is doing. And you still haven't told us what you

Re: [Qemu-devel] Live Migration with different block devices

2014-06-25 Thread Xiongzi Ge
Is there a good way to handle the memory in the guest via qemu? On Wed, Jun 25, 2014 at 2:18 AM, Paolo Bonzini wrote: > Il 25/06/2014 02:08, Xiongzi Ge ha scritto: > > Will the cache data in the guest be migrated to the other host? >> > > Again, cache data is _not_ managed by QEMU. It is mana

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Paolo Bonzini
Il 25/06/2014 02:08, Xiongzi Ge ha scritto: Will the cache data in the guest be migrated to the other host? Again, cache data is _not_ managed by QEMU. It is managed by the guest kernel. Its content and state is migrated together with the rest of RAM. Paolo

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Eric Blake
On 06/24/2014 06:08 PM, Xiongzi Ge wrote: > Hi Eric, [we tend to avoid top-posting on technical lists] > > This really works if I set up the same configuration (/dev/vda in the > guest) but the physical block devices are not the same after migration.The > ABI is the same. When the guest cache s

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Hi Eric, This really works if I set up the same configuration (/dev/vda in the guest) but the physical block devices are not the same after migration.The ABI is the same. When the guest cache stores a page like 'aaa' which is in the block device of Host A. If the cache in the guest is also migrat

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Eric Blake
On 06/24/2014 03:29 PM, Brian Jackson wrote: > > > On 6/24/2014 2:22 PM, Xiongzi Ge wrote: >> Hi, >> >> >> When I do live migration, in the source and destination host, there are >> different block devices, but qemu can not detect this. I used virtio >> as the >> driver in kvm and in the vdi devi

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Christopher Covington
On 06/24/2014 05:26 PM, Xiongzi Ge wrote: > Hi , > > This is just related to migration, but it may be not in the standard > migration. The cache device in different hosts can only be accessed by the vm > running in the host. The problem for me is to find the interface of the cache > in the guest

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Brian Jackson
On 6/24/2014 2:22 PM, Xiongzi Ge wrote: Hi, When I do live migration, in the source and destination host, there are different block devices, but qemu can not detect this. I used virtio as the driver in kvm and in the vdi device in the guest is /dev/vda. So, the vm guest can read different d

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Hi , This is just related to migration, but it may be not in the standard migration. The cache device in different hosts can only be accessed by the vm running in the host. The problem for me is to find the interface of the cache in the guest or like first doing it in the qemu, after migration,

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Paolo Bonzini
Il 24/06/2014 22:41, Eric Blake ha scritto: > > I am trying to do migration with two different block devices in the source > and destination hosts. For example, in the source the data in /dev/vda > are 'a'. The guest has a cache. These data are cached. In the other > host, the data in this

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Eric Blake
On 06/24/2014 01:55 PM, Xiongzi Ge wrote: > Hi Paolo, > > I am trying to do migration with two different block devices in the source > and destination hosts. For example, in the source the data in /dev/vda > are 'a'. The guest has a cache. These data are cached. In the other > host, the dat

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Hi Paolo, Why the data changed is because the block device is used for a cache device in each host. So, after migration, such block device will be changed, but I still want this vm can access the data in the new block device. Thanks On Tue, Jun 24, 2014 at 4:25 PM, Paolo Bonzini wrote: > Il

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Paolo Bonzini
Il 24/06/2014 21:55, Xiongzi Ge ha scritto: Hi Paolo, I am trying to do migration with two different block devices in the source and destination hosts. For example, in the source the data in /dev/vda are 'a'. The guest has a cache. These data are cached. In the other host, the data in thi

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Hi Paolo, I am trying to do migration with two different block devices in the source and destination hosts. For example, in the source the data in /dev/vda are 'a'. The guest has a cache. These data are cached. In the other host, the data in this device are 'b'. If we do migration, I

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Paolo Bonzini
Il 24/06/2014 21:18, Xiongzi Ge ha scritto: When I do live migration, in the source and destination host, there are different block devices, but qemu can not detect this. I used virtio as the driver in kvm and in the vdi device in the guest is /dev/vda. So, the vm guest can read different data

[Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Hi, When I do live migration, in the source and destination host, there are different block devices, but qemu can not detect this. I used virtio as the driver in kvm and in the vdi device in the guest is /dev/vda. So, the vm guest can read different data from the same /dev/vda device. I am stu

[Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Hi, When I do live migration, in the source and destination host, there are different block devices, but qemu can not detect this. I used virtio as the driver in kvm and in the vdi device in the guest is /dev/vda. So, the vm guest can read different data from the same /dev/vda device. I am stu