Scripting Hooks ?

Discussion in 'Linux Virtual Machine' started by hschneider, Aug 20, 2008.

  1. hschneider

    hschneider Pro

    Messages:
    498
    Is there a way to start some script after a VM is resumed ?

    Background:
    I use Ubuntu 7.04 with Avahi (=Bonjour) to announce the server's web service under Safari.
    When I resume, I have to restart the Avahi daemon which seems to initiate some kind of broadcast.
    Otherwise it doesn't become visible on Safari's Bonjour menu.

    Same prob with Netatalk .. sometimes it also hangs after sleep.

    -- Harald
     
    Last edited: Aug 20, 2008
  2. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
  3. hschneider

    hschneider Pro

    Messages:
    498
    Thanks, but the problem is not about the hibernate mode but the VMs sleep mode: I click the VM's close button and select "Suspend".
     
  4. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    Try to look for scripts after sleep mode
     
  5. hschneider

    hschneider Pro

    Messages:
    498
    Where should I look ?

    To assure that you got me right:
    It's not about the Mac's sleep mode. It's about Parallels Desktop's sleep function. When I quit Parallels, it asks me to suspend or to quit the VM immideately and I choose "suspend". When resuming the VM I run into the probs above.

    From the guest OS's point of view there is no chance to detect if it was resumed or not.
     
  6. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    I understand , Parallels emulates sleep mode.
    Check on Ubuntu forums
     
  7. hschneider

    hschneider Pro

    Messages:
    498
    Putting a script into /etc/acpi/resume works when I put it into sleep mode via KDE's exit menu, but fails when I put the VM into sleep.

    It looks to me like the VM is just halted and not like it runs into ACPI mode. There is also nothing logged in /var/messages that it was put to sleep or resumed. It's halted and resumed without any notice to the guest.
     
  8. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    Ok, will try to clarify situation
     
  9. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    Suspend state is different from sleep and hibernate, and solution for now will be to put VM in sleep first using KDE feature and then suspend VM
     
  10. hschneider

    hschneider Pro

    Messages:
    498
    Will this be solved in a more comfortable way in Parallels Desktop 4.0 ?
     
  11. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    We are planning to add scripting capabilities in PD4, but exact detail will be available with beta 4, please check our site when it will be announced
     
  12. hschneider

    hschneider Pro

    Messages:
    498
    These are good news ! Thank you very much ! :)
     
  13. Crashdummy

    Crashdummy Bit poster

    Messages:
    5
    Is there a way to add an application quit hook?
    I'd like to automatically log off the user when they quit parallels.
     
  14. Crashdummy

    Crashdummy Bit poster

    Messages:
    5
    Sorry, wrong forum, I meant to ask this in the Mac OS forum.
     

Share This Page