On Sat, 6/19/10, Kirby Zhou <[email protected]> wrote: > What I want is to save current running guests automatically, and > to restore saved guest automatically.
The state can be saved with "virsh save". Never set a save file to autostart at boot (just a domain), but there's no reason why someone couldn't add "virsh restore (dom) (fil)" in rc.local or similar, including cycling through a directory in a simple loop, in an init script. Interesting, I'll have to check on this further. There's no reason why either Xen or KVM can't be started at boot from a state file. Just never looked into the KVM equivalent of this Xen "default state directory" myself. Virtualization Guides on virsh: http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.5/html/Virtualization_Guide/chap-Virtualization-Managing_guests_with_virsh.html http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6-Beta/html/Virtualization/chap-Virtualization-Managing_guests_with_virsh.html > -----Original Message----- > From: [email protected] > [mailto:[email protected]] > On Behalf Of Bryan J. Smith > Sent: Saturday, June 19, 2010 11:43 PM > To: Red Hat Enterprise Linux 5 (Tikanga) discussion > mailing-list > Subject: Re: [rhelv5-list] What is the replacement of > /var/lib/xen/save and > xendomains service in KVM? > > Kirby Zhou <[email protected]> > wrote: > > What is the replacement of /var/lib/xen/save and > xendomains > > service in KVM? > > With XEN, I can save my guest into the directory > /var/lib/xen/save, > > then xendomains services will restore the guest > automatically > > while booting. > > How can I do it with KVM? > > The HyperVisor-neutral way to do it (typically with > "virsh") is > covered in the Virtualization Guides of both RHEL 5.5 and > RHEL 6 Beta: > > http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.5/html/Virtualiz > ation_Guide/chap-Virtualization-Tips_and_tricks.html#sect-Virtualization-Tip > s_and_tricks-Automatically_starting_guests > > http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6-Beta/html/Virtua > lization/chap-Virtualization-Tips_and_tricks.html#sect-Virtualization-Tips_a > nd_tricks-Automatically_starting_guests > > "Automatically starting guests > > This example uses virsh to set a guest, TestServer, > to > automatically start when the host boots. > > # virsh autostart TestServer > Domain TestServer marked as autostarted > > The guest now automatically starts with the host. > To stop a guest automatically booting use the > --disable parameter > > # virsh autostart --disable TestServer > Domain TestServer unmarked as autostarted > > The guest no longer automatically starts with the > host." _______________________________________________ rhelv5-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/rhelv5-list
