Jump to content
Welcome to our new Citrix community!
  • 0

How to find out what a vm last shutdown


Richard Worwood

Question

4 answers to this question

Recommended Posts

  • 0

Richard,

In the "other-config" token there is a last_shutdown_time parameter, for example, using "xe vm-list uuid=(UUID-of-VM) params=other-config":

 

                  other-config (MRW): vgpu_pci: ; import_task: OpaqueRef:e89defe7-5c50-1495-d45a-3dc6091e9ad2; mac_seed: c331eb14-fd46-4e56-55b5-51a73311a350; last_shutdown_time: 20130517T19:47:44Z; last_shutdown_action: Destroy; last_shutdown_initiator: internal; last_shutdown_reason: halted; install-methods: cdrom

 

There is independent of that a start_time and also a power_state token that can let you know if the VM is running or not and if so, when it was last started up.

 

HTH,

-=Tobias

Link to comment
  • 0

We're running 6.5 and I don't get this information back:

 

xe vm-list uuid=2e0b7229-a0b0-40fa-9bbb-9d8390ada134 params=other-config

other-config (MRW)    : vgpu_pci: ; import_task: OpaqueRef:539fb320-b7da-05a1-7d00-9f65810a48b7; mac_seed: 24d2b3f8-9357-43d9-0ce1-de21d2320791; disks: <?xml version="1.0"?>

<provision/>; base_template_name: Debian Wheezy 7.0 (64-bit); linux_template: true; install-methods: cdrom,http,ftp; install-arch: amd64; debian-release: wheezy

Link to comment
  • 0

We're running XS 6.5 SP1, so evidently there's a difference? This was on a random Windows VM. Do you have a Windows instance you can try this on to see if it's somehow not registered for Linux VMs? Your VM isn't in some odd power state, is it? Did you try that command on other VMs to see if they report something back? I do believe this parameter has been around for a very long time, even prior to XS 6.0.

 

The XenServer is as follows:

# uname -a
Linux virt1.XYZ 3.10.0+2 #1 SMP Wed Mar 11 11:20:46 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

 

Sounds like otherwise it may be time for you to upgrade, Richard!  :D
 

-=Tobias

 

P.S. Are XenTools properly installed?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...