Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Suspend with XEN?

  1. #1
    Join Date
    Nov 2011
    Beans
    6

    Question Suspend with XEN?

    Hi,

    I am working with Xen on my laptop running Ubuntu 12.04. I wonder if there are any ways to suspend/hibernate while running Xen? Currently if I use pm-suspend, the machines goes to suspend as usual but cannot wake up, black screen appears. To note that my machine can suspend/hibernate normally before installing Xen.
    I have searched around for this issue but nothing seemed positive.

    Any help is appreciated. Thanks!

  2. #2
    Join Date
    Mar 2010
    Location
    Metro-ATL; PM free zone.
    Beans
    Hidden!
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Suspend with XEN?

    You need to save each running VM first. There is a Xen command for that - xm save {vm-name}, I think.

    Sorry - I stopped using Xen about 2 yrs ago - KVM is working much better for our needs and we had a few reoccurring issues with Xen after almost every Xen kernel update. Sometimes it wouldn't boot with the new kernel and we'd be forced to drop back the hostOS and all paravirtual kernels to a prior version for a few weeks.

  3. #3
    Join Date
    Nov 2011
    Beans
    6

    Re: Suspend with XEN?

    Quote Originally Posted by TheFu View Post
    You need to save each running VM first. There is a Xen command for that - xm save {vm-name}, I think.

    Sorry - I stopped using Xen about 2 yrs ago - KVM is working much better for our needs and we had a few reoccurring issues with Xen after almost every Xen kernel update. Sometimes it wouldn't boot with the new kernel and we'd be forced to drop back the hostOS and all paravirtual kernels to a prior version for a few weeks.
    Hi, thanks for the reply.

    I have tried to shut off all vm, also disconnected xen via virt-manager, but the machine could not awake. Another problem I have with Xen is that I cannot use normal kernel after installing Xen. It is something like 'kernel panic', caps lock keeps blinking. Then the only option I have is xen kernel.

    I am learning about libvmi - an introspection library. It supports Xen and KVM. But KVM needs some patch to work with libvmi. I am afraid I cannot apply the patch correctly so libvmi does not work. That's the reason why I stick with Xen.

    I think I would give KVM a try. Going to backup the whole system and reinstall an os

  4. #4
    Join Date
    Mar 2010
    Location
    Metro-ATL; PM free zone.
    Beans
    Hidden!
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Suspend with XEN?

    Xen needs a completely different Kernel to work. KVM is just a kernel module.

    I migrated my Xen VMs to KVM using normal backup and recovery methods. Not that big of a deal, it turned out.
    For KVM, I use
    * kvm
    * libvirt
    * virsh - CLI vm manager - can run from the same or remote machine
    * virt-manager - GUI vm manager running from the same or a remote machine
    Virt-manager is a GUI like vSphere or VirtualBox or VMware Player that manages VMs on libvirt systems. The VMs can be local or remote - it uses ssh, so managing any remote VM is secured by ssh-keys.

    sudo apt-get install kvm virsh on the VM host. Add your normal login to the libvirt group.
    sudo apt-get install virt-manager on any remote clients you'd like to manage from.
    I think that will handle dependencies for you. Setup some ssh keys, be happy.

    Of course, don't expect fast GUI from any remote machines. You can try the spice guest kernel and a local spice interface, but when I've tried it, it wasn't stable. For remote desktops when ssh just isn't enough, I use FreeNX on the server and the NoMachine NX client.

  5. #5
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    8,583
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Suspend with XEN?

    Xen is designed for real server hardware running 24/7 serving several virtual machines. I don't believe it has the hooks for sleep/suspend. Running Xen on a laptop is an exercise, but you would not use it for production. Being a module of a normal linux kernel, KVM is what you want on a laptop.

    Because Xen runs a heavily-modified kernel as the Host OS, don't expect it to behave like a regular linux kernel. Reinstall is your only choice at this point, unfortunately.

    Find some old server hardware that you can allow to run 24/7 and put Xen on that. You will then see the power of Xen. On a laptop? Not so much.

    As many things in linux: Just because you can doesn't mean it's a good idea.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  6. #6
    Join Date
    Mar 2010
    Location
    Metro-ATL; PM free zone.
    Beans
    Hidden!
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Suspend with XEN?

    Quote Originally Posted by tgalati4 View Post
    Find some old server hardware that you can allow to run 24/7 and put Xen on that. You will then see the power of Xen. On a laptop? Not so much.

    As many things in linux: Just because you can doesn't mean it's a good idea.
    +1! Xen can work well (most of the time) on common desktop machines ($300) with VT-x, so don't think you need a Xeon powered monster for $2500.

    Pro: Linux is extremely flexible.
    Con: Linux is extremely flexible.

  7. #7
    Join Date
    Nov 2011
    Beans
    6

    Re: Suspend with XEN?

    Thanks so much guys,
    I am going to reinstall
    I hope someday I would have chances to work with real Xen server as described as you did

  8. #8
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    8,583
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Suspend with XEN?

    I bought a couple of Xeon monsters for $300 each. Servers are cheap these days. All of that virtualization has freed up a lot of single-rack servers that are just waiting for new homes and operating systems.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  9. #9
    Join Date
    Nov 2011
    Beans
    6

    Re: Suspend with XEN?

    I successfully installed KVM. Tho I failed to run a KVM VM with Windows 8. I configured the vm's cpu with vt-x already but after a windows logo, black screen appeared and cpu runs like hell. I am still struggling with the problem. I used to able to run Windows 8 vm under Xen.
    Life is not easy

  10. #10
    Join Date
    Mar 2010
    Location
    Metro-ATL; PM free zone.
    Beans
    Hidden!
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Suspend with XEN?

    Quote Originally Posted by thenoname View Post
    I successfully installed KVM. Tho I failed to run a KVM VM with Windows 8. I configured the vm's cpu with vt-x already but after a windows logo, black screen appeared and cpu runs like hell. I am still struggling with the problem. I used to able to run Windows 8 vm under Xen.
    Life is not easy
    I said:
    Of course, don't expect fast GUI from any remote machines. You can try the spice guest kernel and a local spice interface, but when I've tried it, it wasn't stable.
    Whoa! This is the first time you mentioned Windows. Running a desktop OS brings completely different requirements into play. Xen and KVM are primarily designed to run server OSes, not desktops/GUIs.

    Can you explain the "configured VM CPU with vt-x?" That doesn't make sense to me. Inside a client VM, vt-x should not be seen/possible. It is needed on the physical server, but not inside each guest. I'm probably just misunderstanding. I don't believe it is possible to enable VT-x for anything except an entire physical server. Please teach me.

    Did you try the spice video to connect to the VM? How are you connecting to Win8? I use RDP to Win7 and it works fine for normal desktop apps, but not for video or audio. Avoid using VNC (the built-in desktop connection method). RDP feels about 5x faster than the built-in VNC that virt-manager provides. Also, did you follow normal VM setup "best practices" for CPU, RAM, network and disk devices?

    If you want to run a desktop inside a VM and access it for desktop-like needs, especially if it is Windows, most people are better off using VirtualBox. The graphics in virtualbox are good enough for video and lite-gaming. I run Win7 inside a KVM VM - it records TV for the house. It cannot be used to watch the recorded or live TV - other devices are used for that. That same KVM host runs 6 other VMs too - all Linux servers. Linux virtualizes much better than Windows, IME.

    Linux desktops can work well inside a KVM VM, with a good remote desktop setup. I use FreeNX. My daily use "desktop" is a Linux install running inside a private cloud ... KVM + freenx on the server. Again, video and audio don't work well. If that is a requirement, you'll **need** Spice+KVM or just install VirtualBox.

    VirtualBox includes trade-offs too. If you intend to run 1 VM and it is a desktop running on a desktop, you won't care, but if you want concurrent server VMs running and need fantastic stability, then KVM is a better choice.
    Last edited by TheFu; September 10th, 2013 at 12:13 PM. Reason: more stuff

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •