[libvirt] Using Restore in another host.

Hello: I need to know if I can use the restore operation (virsh o the equivalent in libvirt) to recover a previous state of a guest, but recovered previously in another host. I did a test, but I got an error: The exactly sequence using virsh I testes is: On [HOST SOURCE]: Using virsh 1) save [domain] [file] 2) restore file 3) destroy [domain] On [HOST SOURCE] using ubuntu sh 4) cp [guest.img] [guest.xml] [file] to HOST2 On [HOST TARGET] using virsh 5) define [guest.xml] (using image on destination in HOST2) 6) restore [file] The restore troughs the following message: *virsh # restore sv-chubut-2011-04-01-09:58 error: Failed to restore domain from sv-chubut-2011-04-01-09:58 error: monitor socket did not show up.: Connection refused* Thank you very much. Marcela.

On Sun, Apr 03, 2011 at 10:43:45AM +0200, Marcela Castro León wrote:
Hello: I need to know if I can use the restore operation (virsh o the equivalent in libvirt) to recover a previous state of a guest, but recovered previously in another host. I did a test, but I got an error:
The exactly sequence using virsh I testes is: On [HOST SOURCE]: Using virsh 1) save [domain] [file] 2) restore file 3) destroy [domain]
On [HOST SOURCE] using ubuntu sh 4) cp [guest.img] [guest.xml] [file] to HOST2
On [HOST TARGET] using virsh 5) define [guest.xml] (using image on destination in HOST2) 6) restore [file]
As a general rule you should only ever 'restore' from a file *once*. This is because after the first restore operation, the guest may have made writes to its disk. Restoring a second time the guest OS will likely have an inconsistent view of the disk & will cause filesystem corruption. If you want to be able to restore from a saved image multiple times, you need to also take a snapshot of the disk image at the same time, and restore that snapshot when restoring the memory image. That aside, saving on one host & restoring on a different host is fine. So if you leave out steps 2+3 in your example above, then your data would still be safe.
The restore troughs the following message: *virsh # restore sv-chubut-2011-04-01-09:58 error: Failed to restore domain from sv-chubut-2011-04-01-09:58 error: monitor socket did not show up.: Connection refused*
There is probably some configuration difference on your 2nd host that prevented the VM from starting up. If you're lucky the file /var/log/libvirt/qemu/$NAME.log will tell you more Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Hello Daniel Thank you for all your information, but I still didn't solve the problem. I tried the option you mention, with two differents guest into two differents host, but all the cases I've got: *virsh # restore sv-chubut-2011-04-04-17:38* *error: Failed to restore domain from sv-chubut-2011-04-04-17:38* *error: monitor socket did not show up.: Connection refused*** I cannot get any useful information (at least form me) on the log you mention. I'd appreciate a lot a new suggestion. Thanks Marcela 2011/4/4 Daniel P. Berrange <berrange@redhat.com>
On Sun, Apr 03, 2011 at 10:43:45AM +0200, Marcela Castro León wrote:
Hello: I need to know if I can use the restore operation (virsh o the equivalent in libvirt) to recover a previous state of a guest, but recovered previously in another host. I did a test, but I got an error:
The exactly sequence using virsh I testes is: On [HOST SOURCE]: Using virsh 1) save [domain] [file] 2) restore file 3) destroy [domain]
On [HOST SOURCE] using ubuntu sh 4) cp [guest.img] [guest.xml] [file] to HOST2
On [HOST TARGET] using virsh 5) define [guest.xml] (using image on destination in HOST2) 6) restore [file]
As a general rule you should only ever 'restore' from a file *once*. This is because after the first restore operation, the guest may have made writes to its disk. Restoring a second time the guest OS will likely have an inconsistent view of the disk & will cause filesystem corruption.
If you want to be able to restore from a saved image multiple times, you need to also take a snapshot of the disk image at the same time, and restore that snapshot when restoring the memory image.
That aside, saving on one host & restoring on a different host is fine. So if you leave out steps 2+3 in your example above, then your data would still be safe.
The restore troughs the following message: *virsh # restore sv-chubut-2011-04-01-09:58 error: Failed to restore domain from sv-chubut-2011-04-01-09:58 error: monitor socket did not show up.: Connection refused*
There is probably some configuration difference on your 2nd host that prevented the VM from starting up. If you're lucky the file /var/log/libvirt/qemu/$NAME.log will tell you more
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/:| |: http://libvirt.org -o- http://virt-manager.org:| |: http://autobuild.org -o- http://search.cpan.org/~danberr/:| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc:|

Hi Marcela, is any other guest on the host that cannot restore this VM working fine ? You could also try running the: */# LIBVIRT_DEBUG=1 virsh restore sv-chubut-2011-04-04-17:38 2> virsh-restore.log /*command which would enable the libvirt logging and output the debug log into the virsh-restore.log file. This file could be sent to the list for analysis what's wrong. Thanks, Michal On 04/05/2011 11:57 AM, Marcela Castro León wrote:
Hello Daniel Thank you for all your information, but I still didn't solve the problem. I tried the option you mention, with two differents guest into two differents host, but all the cases I've got:
*/virsh # restore sv-chubut-2011-04-04-17:38/* */error: Failed to restore domain from sv-chubut-2011-04-04-17:38/* */error: monitor socket did not show up.: Connection refused/*
I cannot get any useful information (at least form me) on the log you mention. I'd appreciate a lot a new suggestion. Thanks Marcela
2011/4/4 Daniel P. Berrange <berrange@redhat.com <mailto:berrange@redhat.com>>
On Sun, Apr 03, 2011 at 10:43:45AM +0200, Marcela Castro León wrote: > Hello: > I need to know if I can use the restore operation (virsh o the equivalent in > libvirt) to recover a previous state of a guest, but recovered previously in > another host. > I did a test, but I got an error: > > The exactly sequence using virsh I testes is: > On [HOST SOURCE]: Using virsh > 1) save [domain] [file] > 2) restore file > 3) destroy [domain] > > On [HOST SOURCE] using ubuntu sh > 4) cp [guest.img] [guest.xml] [file] to HOST2 > > On [HOST TARGET] using virsh > 5) define [guest.xml] (using image on destination in HOST2) > 6) restore [file]
As a general rule you should only ever 'restore' from a file *once*. This is because after the first restore operation, the guest may have made writes to its disk. Restoring a second time the guest OS will likely have an inconsistent view of the disk & will cause filesystem corruption.
If you want to be able to restore from a saved image multiple times, you need to also take a snapshot of the disk image at the same time, and restore that snapshot when restoring the memory image.
That aside, saving on one host & restoring on a different host is fine. So if you leave out steps 2+3 in your example above, then your data would still be safe.
> The restore troughs the following message: > *virsh # restore sv-chubut-2011-04-01-09:58 > error: Failed to restore domain from sv-chubut-2011-04-01-09:58 > error: monitor socket did not show up.: Connection refused*
There is probably some configuration difference on your 2nd host that prevented the VM from starting up. If you're lucky the file /var/log/libvirt/qemu/$NAME.log will tell you more
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ <http://search.cpan.org/%7Edanberr/> :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
-- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

Hello This is the log I got doing the restore. It's says that it coun't get the image, but the image is ok, because I can startup the guest. Neither I can migrate the guest, so I suppose I've a problem in my configuration. Thank you very much in advance. Marcela. 2011/4/5 Michal Novotny <minovotn@redhat.com>
Hi Marcela, is any other guest on the host that cannot restore this VM working fine ?
You could also try running the:
*/# LIBVIRT_DEBUG=1 virsh restore sv-chubut-2011-04-04-17:38 2> virsh-restore.log
/*command which would enable the libvirt logging and output the debug log into the virsh-restore.log file. This file could be sent to the list for analysis what's wrong.
Thanks, Michal
On 04/05/2011 11:57 AM, Marcela Castro León wrote:
Hello Daniel Thank you for all your information, but I still didn't solve the problem. I tried the option you mention, with two differents guest into two differents host, but all the cases I've got:
*/virsh # restore sv-chubut-2011-04-04-17:38/* */error: Failed to restore domain from sv-chubut-2011-04-04-17:38/* */error: monitor socket did not show up.: Connection refused/*
I cannot get any useful information (at least form me) on the log you mention. I'd appreciate a lot a new suggestion. Thanks Marcela
2011/4/4 Daniel P. Berrange <berrange@redhat.com <mailto:berrange@redhat.com>>
On Sun, Apr 03, 2011 at 10:43:45AM +0200, Marcela Castro León wrote: > Hello: > I need to know if I can use the restore operation (virsh o the equivalent in > libvirt) to recover a previous state of a guest, but recovered previously in > another host. > I did a test, but I got an error: > > The exactly sequence using virsh I testes is: > On [HOST SOURCE]: Using virsh > 1) save [domain] [file] > 2) restore file > 3) destroy [domain] > > On [HOST SOURCE] using ubuntu sh > 4) cp [guest.img] [guest.xml] [file] to HOST2 > > On [HOST TARGET] using virsh > 5) define [guest.xml] (using image on destination in HOST2) > 6) restore [file]
As a general rule you should only ever 'restore' from a file *once*. This is because after the first restore operation, the guest may have made writes to its disk. Restoring a second time the guest OS will likely have an inconsistent view of the disk & will cause filesystem corruption.
If you want to be able to restore from a saved image multiple times, you need to also take a snapshot of the disk image at the same time, and restore that snapshot when restoring the memory image.
That aside, saving on one host & restoring on a different host is fine. So if you leave out steps 2+3 in your example above, then your data would still be safe.
> The restore troughs the following message: > *virsh # restore sv-chubut-2011-04-01-09:58 > error: Failed to restore domain from sv-chubut-2011-04-01-09:58 > error: monitor socket did not show up.: Connection refused*
There is probably some configuration difference on your 2nd host that prevented the VM from starting up. If you're lucky the file /var/log/libvirt/qemu/$NAME.log will tell you more
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ <http://search.cpan.org/%7Edanberr/> :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
-- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

Hi Marcela, I was investigating the log file and it seems like the image file cannot be opened on the remote host. According to the lost you're doing the restore on the host named rionegro so not the localhost. This seems like the saved guest image is not accessible from the rionegro system. Could you please try to connect to rionegro system using SSH and then connect to the default system hypervisor using: # virsh restore <image> with no specification of remote system to connect to the default hypervisor (default is qemu:///system under root account). Also, what may be causing issues is the colon character (':') AFAIK so try renaming the image from sv-chubut-2011-04-04-17:38 to some other name without spaces and colon characters, e.g. to sv-chubut-2011-04-04-17-38 and try to restore this way. Since according to the code it's about opening file error I guess the remote system is not having access to the file. Michal On 04/05/2011 04:54 PM, Marcela Castro León wrote:
Hello This is the log I got doing the restore. It's says that it coun't get the image, but the image is ok, because I can startup the guest. Neither I can migrate the guest, so I suppose I've a problem in my configuration. Thank you very much in advance. Marcela.
2011/4/5 Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com>>
Hi Marcela, is any other guest on the host that cannot restore this VM working fine ?
You could also try running the:
*/# LIBVIRT_DEBUG=1 virsh restore sv-chubut-2011-04-04-17:38 2> virsh-restore.log
/*command which would enable the libvirt logging and output the debug log into the virsh-restore.log file. This file could be sent to the list for analysis what's wrong.
Thanks, Michal
On 04/05/2011 11:57 AM, Marcela Castro León wrote: > Hello Daniel > Thank you for all your information, but I still didn't solve the > problem. I tried the option you mention, with two differents guest > into two differents host, but all the cases I've got: > > */virsh # restore sv-chubut-2011-04-04-17:38/* > */error: Failed to restore domain from sv-chubut-2011-04-04-17:38/* > */error: monitor socket did not show up.: Connection refused/* > > I cannot get any useful information (at least form me) on the log you > mention. > I'd appreciate a lot a new suggestion. > Thanks > Marcela > > > > > 2011/4/4 Daniel P. Berrange <berrange@redhat.com <mailto:berrange@redhat.com> > <mailto:berrange@redhat.com <mailto:berrange@redhat.com>>> > > On Sun, Apr 03, 2011 at 10:43:45AM +0200, Marcela Castro León wrote: > > Hello: > > I need to know if I can use the restore operation (virsh o the > equivalent in > > libvirt) to recover a previous state of a guest, but recovered > previously in > > another host. > > I did a test, but I got an error: > > > > The exactly sequence using virsh I testes is: > > On [HOST SOURCE]: Using virsh > > 1) save [domain] [file] > > 2) restore file > > 3) destroy [domain] > > > > On [HOST SOURCE] using ubuntu sh > > 4) cp [guest.img] [guest.xml] [file] to HOST2 > > > > On [HOST TARGET] using virsh > > 5) define [guest.xml] (using image on destination in HOST2) > > 6) restore [file] > > As a general rule you should only ever 'restore' from a > file *once*. This is because after the first restore > operation, the guest may have made writes to its disk. > Restoring a second time the guest OS will likely have > an inconsistent view of the disk & will cause filesystem > corruption. > > If you want to be able to restore from a saved image > multiple times, you need to also take a snapshot of > the disk image at the same time, and restore that > snapshot when restoring the memory image. > > > That aside, saving on one host & restoring on a > different host is fine. So if you leave out steps > 2+3 in your example above, then your data would > still be safe. > > > The restore troughs the following message: > > *virsh # restore sv-chubut-2011-04-01-09:58 > > error: Failed to restore domain from sv-chubut-2011-04-01-09:58 > > error: monitor socket did not show up.: Connection refused* > > There is probably some configuration difference on your 2nd host > that prevented the VM from starting up. If you're lucky the file > /var/log/libvirt/qemu/$NAME.log will tell you more > > Daniel > -- > |: http://berrange.com -o- > http://www.flickr.com/photos/dberrange/ :| > |: http://libvirt.org -o- > http://virt-manager.org :| > |: http://autobuild.org -o- > http://search.cpan.org/~danberr/ <http://search.cpan.org/%7Edanberr/> > <http://search.cpan.org/%7Edanberr/> :| > |: http://entangle-photo.org -o- > http://live.gnome.org/gtk-vnc :| > > > > -- > libvir-list mailing list > libvir-list@redhat.com <mailto:libvir-list@redhat.com> > https://www.redhat.com/mailman/listinfo/libvir-list
-- Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com>>, RHCE Virtualization Team (xen userspace), Red Hat
-- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

On 04/05/2011 09:09 AM, Michal Novotny wrote:
Hi Marcela, I was investigating the log file and it seems like the image file cannot be opened on the remote host.
Are you using SELinux, and is your shared storage on NFS? If so, did you run 'setsebool -P virt_use_nfs on' to let the destination properly access the shared storage from NFS? -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 04/05/2011 05:15 PM, Eric Blake wrote:
On 04/05/2011 09:09 AM, Michal Novotny wrote:
Hi Marcela, I was investigating the log file and it seems like the image file cannot be opened on the remote host. Are you using SELinux, and is your shared storage on NFS? If so, did you run 'setsebool -P virt_use_nfs on' to let the destination properly access the shared storage from NFS?
Eric, I'm not too familiar with SELinux. Do you think the virFileOpenAs() would fail if the SELinux context won't be set properly? Michal -- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

On 04/05/2011 09:17 AM, Michal Novotny wrote:
On 04/05/2011 05:15 PM, Eric Blake wrote:
On 04/05/2011 09:09 AM, Michal Novotny wrote:
Hi Marcela, I was investigating the log file and it seems like the image file cannot be opened on the remote host. Are you using SELinux, and is your shared storage on NFS? If so, did you run 'setsebool -P virt_use_nfs on' to let the destination properly access the shared storage from NFS?
Eric, I'm not too familiar with SELinux. Do you think the virFileOpenAs() would fail if the SELinux context won't be set properly?
Yes, if you are running with SELinux enforcing, then it is possible for all attempts to open() to fail due to denied permissions, even with virFileOpenAs() trying different uids, if you haven't told SELinux to allow NFS images. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Hellol I've downloaded the policycoreutils, and then I execute on the nfs clients: *radic@santacruz:~/discoguest/aplicaciones/virsh$ setsebool -P virt_use_nfs on setsebool: SELinux is disabled. * It's enough? I understand that it's not working, but I don't find good information at internet. Thank you. Marcela 2011/4/5 Michal Novotny <minovotn@redhat.com>
On 04/05/2011 05:15 PM, Eric Blake wrote:
On 04/05/2011 09:09 AM, Michal Novotny wrote:
Hi Marcela, I was investigating the log file and it seems like the image file cannot be opened on the remote host. Are you using SELinux, and is your shared storage on NFS? If so, did you run 'setsebool -P virt_use_nfs on' to let the destination properly access the shared storage from NFS?
Eric, I'm not too familiar with SELinux. Do you think the virFileOpenAs() would fail if the SELinux context won't be set properly?
Michal
-- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

On 04/05/2011 06:16 PM, Marcela Castro León wrote:
Hellol I've downloaded the policycoreutils, and then I execute on the nfs clients:
*radic@santacruz:~/discoguest/aplicaciones/virsh$ setsebool -P virt_use_nfs on setsebool: SELinux is disabled. *
It's enough? I understand that it's not working, but I don't find good information at internet.
Thank you. Marcela
That's fine since you have the SELinux disabled and therefore it can't cause any issues. Michal -- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

Hello: I repeated all the test again and reproduce a similar situation. Apparently the restore is finished ok, and the guest is running but: a) I cannot connect to the guest trough ssh. b) I cannot enter to the guest using the virt-manager: It's say " Connecting to graphical console for guest". c) on the log /var/log/libvirt(qemu/chompi1.log say that an error happened during the restore. I'm sending the trace I did while restoring the file and the log. (both on target rionegro Thank you very much in advance. Marcela. 2011/4/5 Michal Novotny <minovotn@redhat.com>
On 04/05/2011 06:16 PM, Marcela Castro León wrote:
Hellol I've downloaded the policycoreutils, and then I execute on the nfs clients:
*radic@santacruz:~/discoguest/aplicaciones/virsh$ setsebool -P virt_use_nfs on setsebool: SELinux is disabled. *
It's enough? I understand that it's not working, but I don't find good information at internet.
Thank you. Marcela
That's fine since you have the SELinux disabled and therefore it can't cause any issues.
Michal
-- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

Hi, the interesting thing is the "Permission denied" message in the log file: LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -S -M pc-0.12 -enable-kvm -m 4096 -smp 4 -name chompi1 -uuid 22f013aa-25d4-b317-9eac-b232692db8c7 -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/chompi1.monitor,server,nowait -monitor chardev:monitor -boot c -drive file=/home/radic/mvdata/imagenes/chompi1.img,if=ide,index=0,boot=on,format=raw -drive if=ide,media=cdrom,index=2,format=raw -net nic,macaddr=52:54:00:82:ce:80,vlan=0,model=virtio,name=virtio.0 -net tap,fd=34,vlan=0,name=tap.0 -chardev pty,id=serial0 -serial chardev:serial0 -parallel none -usb -vnc 0.0.0.0:0 -vga cirrus -incoming exec:cat char device redirected to /dev/pts/2 cat: -: Permission denied <== THIS ONE load of migration failed I don't know much about the internal libvirt design since libvirt is not my primary space so I hope my e-mails from yesterday helped a little but I'll leave the rest for libvirt guys since I'm not having any other ideas what could be wrong there. Michal On 04/06/2011 10:43 AM, Marcela Castro León wrote:
Hello: I repeated all the test again and reproduce a similar situation. Apparently the restore is finished ok, and the guest is running but: a) I cannot connect to the guest trough ssh. b) I cannot enter to the guest using the virt-manager: It's say " Connecting to graphical console for guest". c) on the log /var/log/libvirt(qemu/chompi1.log say that an error happened during the restore.
I'm sending the trace I did while restoring the file and the log. (both on target rionegro
Thank you very much in advance. Marcela.
2011/4/5 Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com>>
On 04/05/2011 06:16 PM, Marcela Castro León wrote: > Hellol > I've downloaded the policycoreutils, and then I execute on the nfs > clients: > > *radic@santacruz:~/discoguest/aplicaciones/virsh$ setsebool -P > virt_use_nfs on > setsebool: SELinux is disabled. > * > > It's enough? I understand that it's not working, but I don't find good > information at internet. > > Thank you. > Marcela
That's fine since you have the SELinux disabled and therefore it can't cause any issues.
Michal
-- Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com>>, RHCE Virtualization Team (xen userspace), Red Hat
-- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

On 04/06/2011 04:09 AM, Michal Novotny wrote:
Hi, the interesting thing is the "Permission denied" message in the log file:
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -S -M pc-0.12 -enable-kvm -m 4096 -smp 4 -name chompi1 -uuid 22f013aa-25d4-b317-9eac-b232692db8c7 -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/chompi1.monitor,server,nowait -monitor chardev:monitor -boot c -drive file=/home/radic/mvdata/imagenes/chompi1.img,if=ide,index=0,boot=on,format=raw -drive if=ide,media=cdrom,index=2,format=raw -net nic,macaddr=52:54:00:82:ce:80,vlan=0,model=virtio,name=virtio.0 -net tap,fd=34,vlan=0,name=tap.0 -chardev pty,id=serial0 -serial chardev:serial0 -parallel none -usb -vnc 0.0.0.0:0 -vga cirrus -incoming exec:cat char device redirected to /dev/pts/2 cat: -: Permission denied <== THIS ONE load of migration failed
I don't know much about the internal libvirt design since libvirt is not my primary space so I hope my e-mails from yesterday helped a little but I'll leave the rest for libvirt guys since I'm not having any other ideas what could be wrong there.
That's a weird error - cat is complaining that it can't read stdin, which is usually a symptom associated with SELinux permissions. But you said earlier in this thread that you aren't using SELinux. Are you using AppArmor? At any rate, does upgrading to libvirt 0.9.0 improve the situation? exec: migration has always been risky (there are various data races involved in coordinating multiple processes, where qemu is using popen() to manage the use or even opening the file), and so newer libvirt uses fd: migration (where the fd is already open, so we don't even have to worry about permissions from qemu's point of view). -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Hello I'm thinking to upgrade the libvirt to solve the problem as you said in your last mail. But I've installed the package using "apt-get install" and I can''t get higher version of all the packages involves doing an upgrade in ubuntu (I'm using 10.04) Can you suggest-me "an easy" way to upgrate the libvirt? Thank you very much. Marcela 2011/4/6 Eric Blake <eblake@redhat.com>
On 04/06/2011 04:09 AM, Michal Novotny wrote:
Hi, the interesting thing is the "Permission denied" message in the log file:
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -S -M pc-0.12 -enable-kvm -m 4096 -smp 4 -name chompi1 -uuid 22f013aa-25d4-b317-9eac-b232692db8c7 -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/chompi1.monitor,server,nowait
-monitor chardev:monitor -boot c -drive
file=/home/radic/mvdata/imagenes/chompi1.img,if=ide,index=0,boot=on,format=raw
-drive if=ide,media=cdrom,index=2,format=raw -net nic,macaddr=52:54:00:82:ce:80,vlan=0,model=virtio,name=virtio.0 -net tap,fd=34,vlan=0,name=tap.0 -chardev pty,id=serial0 -serial chardev:serial0 -parallel none -usb -vnc 0.0.0.0:0 -vga cirrus -incoming exec:cat char device redirected to /dev/pts/2 cat: -: Permission denied <== THIS ONE load of migration failed
I don't know much about the internal libvirt design since libvirt is not my primary space so I hope my e-mails from yesterday helped a little but I'll leave the rest for libvirt guys since I'm not having any other ideas what could be wrong there.
That's a weird error - cat is complaining that it can't read stdin, which is usually a symptom associated with SELinux permissions. But you said earlier in this thread that you aren't using SELinux. Are you using AppArmor?
At any rate, does upgrading to libvirt 0.9.0 improve the situation? exec: migration has always been risky (there are various data races involved in coordinating multiple processes, where qemu is using popen() to manage the use or even opening the file), and so newer libvirt uses fd: migration (where the fd is already open, so we don't even have to worry about permissions from qemu's point of view).
-- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Hi, I think the best thing would be to download it directly from libvirt.org site and install it. It's not the easiest way but it's the best way IMHO. You can find relevant information there: http://libvirt.org/compiling.html Michal On 04/08/2011 10:18 AM, Marcela Castro León wrote:
Hello I'm thinking to upgrade the libvirt to solve the problem as you said in your last mail. But I've installed the package using "apt-get install" and I can''t get higher version of all the packages involves doing an upgrade in ubuntu (I'm using 10.04) Can you suggest-me "an easy" way to upgrate the libvirt? Thank you very much. Marcela
2011/4/6 Eric Blake <eblake@redhat.com <mailto:eblake@redhat.com>>
On 04/06/2011 04:09 AM, Michal Novotny wrote: > Hi, > the interesting thing is the "Permission denied" message in the log file: > > LC_ALL=C > PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin > QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -S -M pc-0.12 > -enable-kvm -m 4096 -smp 4 -name chompi1 -uuid > 22f013aa-25d4-b317-9eac-b232692db8c7 -chardev > socket,id=monitor,path=/var/lib/libvirt/qemu/chompi1.monitor,server,nowait > -monitor chardev:monitor -boot c -drive > file=/home/radic/mvdata/imagenes/chompi1.img,if=ide,index=0,boot=on,format=raw > -drive if=ide,media=cdrom,index=2,format=raw -net > nic,macaddr=52:54:00:82:ce:80,vlan=0,model=virtio,name=virtio.0 -net > tap,fd=34,vlan=0,name=tap.0 -chardev pty,id=serial0 -serial > chardev:serial0 -parallel none -usb -vnc 0.0.0.0:0 <http://0.0.0.0:0> -vga cirrus -incoming > exec:cat > char device redirected to /dev/pts/2 > cat: -: Permission denied <== THIS ONE > load of migration failed > > I don't know much about the internal libvirt design since libvirt is not > my primary space so I hope my e-mails from yesterday helped a little but > I'll leave the rest for libvirt guys since I'm not having any other > ideas what could be wrong there.
That's a weird error - cat is complaining that it can't read stdin, which is usually a symptom associated with SELinux permissions. But you said earlier in this thread that you aren't using SELinux. Are you using AppArmor?
At any rate, does upgrading to libvirt 0.9.0 improve the situation? exec: migration has always been risky (there are various data races involved in coordinating multiple processes, where qemu is using popen() to manage the use or even opening the file), and so newer libvirt uses fd: migration (where the fd is already open, so we don't even have to worry about permissions from qemu's point of view).
-- Eric Blake eblake@redhat.com <mailto:eblake@redhat.com> +1-801-349-2682 Libvirt virtualization library http://libvirt.org
-- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

Hello I don't do this, I'd find out about it and set it. But, i don't know if this avoid the error, but I'm trying to restore the image from the host that is nfs server. I will execute, try again and tell you if I succeed. Thank you. Marcela 2011/4/5 Eric Blake <eblake@redhat.com>
On 04/05/2011 09:09 AM, Michal Novotny wrote:
Hi Marcela, I was investigating the log file and it seems like the image file cannot be opened on the remote host.
Are you using SELinux, and is your shared storage on NFS? If so, did you run 'setsebool -P virt_use_nfs on' to let the destination properly access the shared storage from NFS?
-- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Hello OK, this is the new log. Now, the old error appeared again... *error: Failed to restore domain from XX error: monitor socket did not show up.: Connection refused * Regards. 2011/4/5 Michal Novotny <minovotn@redhat.com>
Hi Marcela, I was investigating the log file and it seems like the image file cannot be opened on the remote host.
According to the lost you're doing the restore on the host named rionegro so not the localhost. This seems like the saved guest image is not accessible from the rionegro system. Could you please try to connect to rionegro system using SSH and then connect to the default system hypervisor using:
# virsh restore <image>
with no specification of remote system to connect to the default hypervisor (default is qemu:///system under root account).
Also, what may be causing issues is the colon character (':') AFAIK so try renaming the image from sv-chubut-2011-04-04-17:38 to some other name without spaces and colon characters, e.g. to sv-chubut-2011-04-04-17-38 and try to restore this way.
Since according to the code it's about opening file error I guess the remote system is not having access to the file.
Michal
Hello This is the log I got doing the restore. It's says that it coun't get the image, but the image is ok, because I can startup the guest. Neither I can migrate the guest, so I suppose I've a problem in my configuration. Thank you very much in advance. Marcela.
2011/4/5 Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com
Hi Marcela, is any other guest on the host that cannot restore this VM working fine ?
You could also try running the:
*/# LIBVIRT_DEBUG=1 virsh restore sv-chubut-2011-04-04-17:38 2> virsh-restore.log
/*command which would enable the libvirt logging and output the debug log into the virsh-restore.log file. This file could be sent to the list for analysis what's wrong.
Thanks, Michal
On 04/05/2011 11:57 AM, Marcela Castro León wrote: > Hello Daniel > Thank you for all your information, but I still didn't solve the > problem. I tried the option you mention, with two differents guest > into two differents host, but all the cases I've got: > > */virsh # restore sv-chubut-2011-04-04-17:38/* > */error: Failed to restore domain from sv-chubut-2011-04-04-17:38/* > */error: monitor socket did not show up.: Connection refused/* > > I cannot get any useful information (at least form me) on the log you > mention. > I'd appreciate a lot a new suggestion. > Thanks > Marcela > > > > > 2011/4/4 Daniel P. Berrange <berrange@redhat.com <mailto:berrange@redhat.com> > <mailto:berrange@redhat.com <mailto:berrange@redhat.com>>> > > On Sun, Apr 03, 2011 at 10:43:45AM +0200, Marcela Castro León wrote: > > Hello: > > I need to know if I can use the restore operation (virsh o
On 04/05/2011 04:54 PM, Marcela Castro León wrote: the
> equivalent in > > libvirt) to recover a previous state of a guest, but
recovered
> previously in > > another host. > > I did a test, but I got an error: > > > > The exactly sequence using virsh I testes is: > > On [HOST SOURCE]: Using virsh > > 1) save [domain] [file] > > 2) restore file > > 3) destroy [domain] > > > > On [HOST SOURCE] using ubuntu sh > > 4) cp [guest.img] [guest.xml] [file] to HOST2 > > > > On [HOST TARGET] using virsh > > 5) define [guest.xml] (using image on destination in HOST2) > > 6) restore [file] > > As a general rule you should only ever 'restore' from a > file *once*. This is because after the first restore > operation, the guest may have made writes to its disk. > Restoring a second time the guest OS will likely have > an inconsistent view of the disk & will cause filesystem > corruption. > > If you want to be able to restore from a saved image > multiple times, you need to also take a snapshot of > the disk image at the same time, and restore that > snapshot when restoring the memory image. > > > That aside, saving on one host & restoring on a > different host is fine. So if you leave out steps > 2+3 in your example above, then your data would > still be safe. > > > The restore troughs the following message: > > *virsh # restore sv-chubut-2011-04-01-09:58 > > error: Failed to restore domain from sv-chubut-2011-04-01-09:58 > > error: monitor socket did not show up.: Connection refused* > > There is probably some configuration difference on your 2nd
host
> that prevented the VM from starting up. If you're lucky the
file
> /var/log/libvirt/qemu/$NAME.log will tell you more > > Daniel > -- > |: http://berrange.com -o- > http://www.flickr.com/photos/dberrange/ :| > |: http://libvirt.org -o- > http://virt-manager.org :| > |: http://autobuild.org -o- > http://search.cpan.org/~danberr/ <http://search.cpan.org/%7Edanberr/> > <http://search.cpan.org/%7Edanberr/> :| > |: http://entangle-photo.org -o- > http://live.gnome.org/gtk-vnc :| > > > > -- > libvir-list mailing list > libvir-list@redhat.com <mailto:libvir-list@redhat.com> > https://www.redhat.com/mailman/listinfo/libvir-list
-- Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com>>, RHCE Virtualization Team (xen userspace), Red Hat
-- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

Hi, what about /var/log/libvirt/qemu/$NAME.log file from the attempt? This seems like the monitor socket cannot be connected which may be the result of different version of QEMU on source and target system IMHO. Could you please provide result of # virsh version command from both source and target machine and most likely install both source and target machine? Thanks, Michal On 04/05/2011 05:20 PM, Marcela Castro León wrote:
Hello OK, this is the new log. Now, the old error appeared again... /*error: Failed to restore domain from XX error: monitor socket did not show up.: Connection refused */
Regards.
2011/4/5 Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com>>
Hi Marcela, I was investigating the log file and it seems like the image file cannot be opened on the remote host.
According to the lost you're doing the restore on the host named rionegro so not the localhost. This seems like the saved guest image is not accessible from the rionegro system. Could you please try to connect to rionegro system using SSH and then connect to the default system hypervisor using:
# virsh restore <image>
with no specification of remote system to connect to the default hypervisor (default is qemu:///system under root account).
Also, what may be causing issues is the colon character (':') AFAIK so try renaming the image from sv-chubut-2011-04-04-17:38 to some other name without spaces and colon characters, e.g. to sv-chubut-2011-04-04-17-38 and try to restore this way.
Since according to the code it's about opening file error I guess the remote system is not having access to the file.
Michal
On 04/05/2011 04:54 PM, Marcela Castro León wrote: > Hello > This is the log I got doing the restore. It's says that it coun't get > the image, but the image is ok, because I can startup the guest. > Neither I can migrate the guest, so I suppose I've a problem in my > configuration. > Thank you very much in advance. > Marcela. > > 2011/4/5 Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com> <mailto:minovotn@redhat.com <mailto:minovotn@redhat.com>>> > > Hi Marcela, > is any other guest on the host that cannot restore this VM working > fine ? > > You could also try running the: > > */# LIBVIRT_DEBUG=1 virsh restore sv-chubut-2011-04-04-17:38 2> > virsh-restore.log > > /*command which would enable the libvirt logging and output the debug > log into the virsh-restore.log file. This file could be sent to > the list > for analysis what's wrong. > > Thanks, > Michal > > On 04/05/2011 11:57 AM, Marcela Castro León wrote: > > Hello Daniel > > Thank you for all your information, but I still didn't solve the > > problem. I tried the option you mention, with two differents guest > > into two differents host, but all the cases I've got: > > > > */virsh # restore sv-chubut-2011-04-04-17:38/* > > */error: Failed to restore domain from sv-chubut-2011-04-04-17:38/* > > */error: monitor socket did not show up.: Connection refused/* > > > > I cannot get any useful information (at least form me) on the > log you > > mention. > > I'd appreciate a lot a new suggestion. > > Thanks > > Marcela > > > > > > > > > > 2011/4/4 Daniel P. Berrange <berrange@redhat.com <mailto:berrange@redhat.com> > <mailto:berrange@redhat.com <mailto:berrange@redhat.com>> > > <mailto:berrange@redhat.com <mailto:berrange@redhat.com> <mailto:berrange@redhat.com <mailto:berrange@redhat.com>>>> > > > > On Sun, Apr 03, 2011 at 10:43:45AM +0200, Marcela Castro > León wrote: > > > Hello: > > > I need to know if I can use the restore operation (virsh o the > > equivalent in > > > libvirt) to recover a previous state of a guest, but recovered > > previously in > > > another host. > > > I did a test, but I got an error: > > > > > > The exactly sequence using virsh I testes is: > > > On [HOST SOURCE]: Using virsh > > > 1) save [domain] [file] > > > 2) restore file > > > 3) destroy [domain] > > > > > > On [HOST SOURCE] using ubuntu sh > > > 4) cp [guest.img] [guest.xml] [file] to HOST2 > > > > > > On [HOST TARGET] using virsh > > > 5) define [guest.xml] (using image on destination in HOST2) > > > 6) restore [file] > > > > As a general rule you should only ever 'restore' from a > > file *once*. This is because after the first restore > > operation, the guest may have made writes to its disk. > > Restoring a second time the guest OS will likely have > > an inconsistent view of the disk & will cause filesystem > > corruption. > > > > If you want to be able to restore from a saved image > > multiple times, you need to also take a snapshot of > > the disk image at the same time, and restore that > > snapshot when restoring the memory image. > > > > > > That aside, saving on one host & restoring on a > > different host is fine. So if you leave out steps > > 2+3 in your example above, then your data would > > still be safe. > > > > > The restore troughs the following message: > > > *virsh # restore sv-chubut-2011-04-01-09:58 > > > error: Failed to restore domain from > sv-chubut-2011-04-01-09:58 > > > error: monitor socket did not show up.: Connection refused* > > > > There is probably some configuration difference on your 2nd host > > that prevented the VM from starting up. If you're lucky the file > > /var/log/libvirt/qemu/$NAME.log will tell you more > > > > Daniel > > -- > > |: http://berrange.com -o- > > http://www.flickr.com/photos/dberrange/ :| > > |: http://libvirt.org -o- > > http://virt-manager.org :| > > |: http://autobuild.org -o- > > http://search.cpan.org/~danberr/ <http://search.cpan.org/%7Edanberr/> > <http://search.cpan.org/%7Edanberr/> > > <http://search.cpan.org/%7Edanberr/> :| > > |: http://entangle-photo.org -o- > > http://live.gnome.org/gtk-vnc :| > > > > > > > > -- > > libvir-list mailing list > > libvir-list@redhat.com <mailto:libvir-list@redhat.com> <mailto:libvir-list@redhat.com <mailto:libvir-list@redhat.com>> > > https://www.redhat.com/mailman/listinfo/libvir-list > > > -- > Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com> <mailto:minovotn@redhat.com <mailto:minovotn@redhat.com>>>, > RHCE > Virtualization Team (xen userspace), Red Hat > >
-- Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com>>, RHCE Virtualization Team (xen userspace), Red Hat
-- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

Hello The restore finished ok, I found at a log that was looking the image at an "old" location. Anyway, the image don't start well, but I've to revise all the configuration again, to see what's exactly is happening now. Thank you a lot, I learned a lot. The version are the same *source* radic@chubut:/var/log/libvirt/qemu$ virsh virsh # version Compiled against library: libvir 0.7.5 Using library: libvir 0.7.5 Using API: QEMU 0.7.5 Running hypervisor: QEMU 0.12.3 *target *radic@rionegro:~$ virsh virsh # version Compiled against library: libvir 0.7.5 Using library: libvir 0.7.5 Using API: QEMU 0.7.5 Running hypervisor: QEMU 0.12.3 Thank you very much!! Regards. 2011/4/5 Michal Novotny <minovotn@redhat.com>
Hi, what about /var/log/libvirt/qemu/$NAME.log file from the attempt? This seems like the monitor socket cannot be connected which may be the result of different version of QEMU on source and target system IMHO. Could you please provide result of
# virsh version
command from both source and target machine and most likely install both source and target machine?
Thanks, Michal
On 04/05/2011 05:20 PM, Marcela Castro León wrote:
Hello OK, this is the new log. Now, the old error appeared again... /*error: Failed to restore domain from XX error: monitor socket did not show up.: Connection refused */
Regards.
2011/4/5 Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com
Hi Marcela, I was investigating the log file and it seems like the image file cannot be opened on the remote host.
According to the lost you're doing the restore on the host named rionegro so not the localhost. This seems like the saved guest image is not accessible from the rionegro system. Could you please try to connect to rionegro system using SSH and then connect to the default system hypervisor using:
# virsh restore <image>
with no specification of remote system to connect to the default hypervisor (default is qemu:///system under root account).
Also, what may be causing issues is the colon character (':') AFAIK so try renaming the image from sv-chubut-2011-04-04-17:38 to some other name without spaces and colon characters, e.g. to sv-chubut-2011-04-04-17-38 and try to restore this way.
Since according to the code it's about opening file error I guess the remote system is not having access to the file.
Michal
On 04/05/2011 04:54 PM, Marcela Castro León wrote: > Hello > This is the log I got doing the restore. It's says that it coun't get > the image, but the image is ok, because I can startup the guest. > Neither I can migrate the guest, so I suppose I've a problem in my > configuration. > Thank you very much in advance. > Marcela. > > 2011/4/5 Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com> <mailto:minovotn@redhat.com <mailto:minovotn@redhat.com>>> > > Hi Marcela, > is any other guest on the host that cannot restore this VM working > fine ? > > You could also try running the: > > */# LIBVIRT_DEBUG=1 virsh restore sv-chubut-2011-04-04-17:38 2> > virsh-restore.log > > /*command which would enable the libvirt logging and output the debug > log into the virsh-restore.log file. This file could be sent to > the list > for analysis what's wrong. > > Thanks, > Michal > > On 04/05/2011 11:57 AM, Marcela Castro León wrote: > > Hello Daniel > > Thank you for all your information, but I still didn't solve the > > problem. I tried the option you mention, with two differents guest > > into two differents host, but all the cases I've got: > > > > */virsh # restore sv-chubut-2011-04-04-17:38/* > > */error: Failed to restore domain from sv-chubut-2011-04-04-17:38/* > > */error: monitor socket did not show up.: Connection refused/* > > > > I cannot get any useful information (at least form me) on the > log you > > mention. > > I'd appreciate a lot a new suggestion. > > Thanks > > Marcela > > > > > > > > > > 2011/4/4 Daniel P. Berrange <berrange@redhat.com <mailto:berrange@redhat.com> > <mailto:berrange@redhat.com <mailto:berrange@redhat.com>> > > <mailto:berrange@redhat.com <mailto:berrange@redhat.com> <mailto:berrange@redhat.com <mailto:berrange@redhat.com>>>> > > > > On Sun, Apr 03, 2011 at 10:43:45AM +0200, Marcela Castro > León wrote: > > > Hello: > > > I need to know if I can use the restore operation (virsh o the > > equivalent in > > > libvirt) to recover a previous state of a guest, but recovered > > previously in > > > another host. > > > I did a test, but I got an error: > > > > > > The exactly sequence using virsh I testes is: > > > On [HOST SOURCE]: Using virsh > > > 1) save [domain] [file] > > > 2) restore file > > > 3) destroy [domain] > > > > > > On [HOST SOURCE] using ubuntu sh > > > 4) cp [guest.img] [guest.xml] [file] to HOST2 > > > > > > On [HOST TARGET] using virsh > > > 5) define [guest.xml] (using image on destination in HOST2) > > > 6) restore [file] > > > > As a general rule you should only ever 'restore' from a > > file *once*. This is because after the first restore > > operation, the guest may have made writes to its disk. > > Restoring a second time the guest OS will likely have > > an inconsistent view of the disk & will cause filesystem > > corruption. > > > > If you want to be able to restore from a saved image > > multiple times, you need to also take a snapshot of > > the disk image at the same time, and restore that > > snapshot when restoring the memory image. > > > > > > That aside, saving on one host & restoring on a > > different host is fine. So if you leave out steps > > 2+3 in your example above, then your data would > > still be safe. > > > > > The restore troughs the following message: > > > *virsh # restore sv-chubut-2011-04-01-09:58 > > > error: Failed to restore domain from > sv-chubut-2011-04-01-09:58 > > > error: monitor socket did not show up.: Connection refused* > > > > There is probably some configuration difference on your 2nd host > > that prevented the VM from starting up. If you're lucky the file > > /var/log/libvirt/qemu/$NAME.log will tell you more > > > > Daniel > > -- > > |: http://berrange.com -o- > > http://www.flickr.com/photos/dberrange/ :| > > |: http://libvirt.org -o- > > http://virt-manager.org :| > > |: http://autobuild.org -o- > > http://search.cpan.org/~danberr/ <http://search.cpan.org/%7Edanberr/> > <http://search.cpan.org/%7Edanberr/> > > <http://search.cpan.org/%7Edanberr/> :| > > |: http://entangle-photo.org -o- > > http://live.gnome.org/gtk-vnc :| > > > > > > > > -- > > libvir-list mailing list > > libvir-list@redhat.com <mailto:libvir-list@redhat.com> <mailto:libvir-list@redhat.com <mailto:libvir-list@redhat.com>> > > https://www.redhat.com/mailman/listinfo/libvir-list > > > -- > Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com> <mailto:minovotn@redhat.com <mailto:minovotn@redhat.com>>>, > RHCE > Virtualization Team (xen userspace), Red Hat > >
-- Michal Novotny <minovotn@redhat.com <mailto:minovotn@redhat.com>>, RHCE Virtualization Team (xen userspace), Red Hat
-- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

On 04/05/2011 05:59 PM, Marcela Castro León wrote:
Hello The restore finished ok, I found at a log that was looking the image at an "old" location. Anyway, the image don't start well, but I've to revise all the configuration again, to see what's exactly is happening now. Thank you a lot, I learned a lot.
Hi, that's fine it passed however what do you mean by "the image don't start well" ? Michal -- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

Yes, its say that recover all right and the guest is running, but I cannot connect doing ssh, and in the virt-manager say "connecting to graphical console". I've just found in the log: *radic@rionegro:/var/log/libvirt/qemu$ sudo cat chompi1.log * *LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -S -M pc-0.12 -enable-kvm -m 4096 -smp 4 -name chompi1 -uuid 22f013aa-25d4-b317-9eac-b232692db8c7 -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/chompi1.monitor,server,nowait -monitor chardev:monitor -boot c -drive file=/home/radic/mv/discoguest/chompi1.img,if=ide,index=0,boot=on,format=raw -drive if=ide,media=cdrom,index=2,format=raw -net nic,macaddr=52:54:00:82:ce:80,vlan=0,model=virtio,name=virtio.0 -net tap,fd=33,vlan=0,name=tap.0 -chardev pty,id=serial0 -serial chardev:serial0 -parallel none -usb -vnc 127.0.0.1:0 -vga cirrus -incoming exec:cat * *char device redirected to /dev/pts/1* *cat: -: Permission denied* *load of migration failed* 2011/4/5 Michal Novotny <minovotn@redhat.com>
On 04/05/2011 05:59 PM, Marcela Castro León wrote:
Hello The restore finished ok, I found at a log that was looking the image at an "old" location. Anyway, the image don't start well, but I've to revise all the configuration again, to see what's exactly is happening now. Thank you a lot, I learned a lot.
Hi, that's fine it passed however what do you mean by "the image don't start well" ?
Michal
-- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat

On 04/05/2011 06:07 PM, Marcela Castro León wrote:
Yes, its say that recover all right and the guest is running, but I cannot connect doing ssh, and in the virt-manager say "connecting to graphical console". I've just found in the log:
*radic@rionegro:/var/log/libvirt/qemu$ sudo cat chompi1.log * *LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -S -M pc-0.12 -enable-kvm -m 4096 -smp 4 -name chompi1 -uuid 22f013aa-25d4-b317-9eac-b232692db8c7 -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/chompi1.monitor,server,nowait -monitor chardev:monitor -boot c -drive file=/home/radic/mv/discoguest/chompi1.img,if=ide,index=0,boot=on,format=raw -drive if=ide,media=cdrom,index=2,format=raw -net nic,macaddr=52:54:00:82:ce:80,vlan=0,model=virtio,name=virtio.0 -net tap,fd=33,vlan=0,name=tap.0 -chardev pty,id=serial0 -serial chardev:serial0 -parallel none -usb -vnc 127.0.0.1:0 <http://127.0.0.1:0> *
Well, I guess this is the problem since you have the VNC server bound to 127.0.0.1 which is localhost-only access. You have to change the libvirt configuration to put 0.0.0.0 there instead to bind to all network interfaces and not just loopback interface. Michal -- Michal Novotny <minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat
participants (4)
-
Daniel P. Berrange
-
Eric Blake
-
Marcela Castro León
-
Michal Novotny