Operating System - HP-UX
1836913 Members
2018 Online
110111 Solutions
New Discussion

how to crash a guest machine in HPVM

 
SathiyaMoorthy
Occasional Advisor

how to crash a guest machine in HPVM

I have a HPVM with two guest machines ( windows and HPUX ).

Can anybody help me in crashing one of the guest machines.. ( might be some commands or the method to crash a guest machine... or even the host machine. ).

I am trying to explore, what logs it will populate, and how to use hpvmcollect after it. So it would be of a great help that if somebody can give me a command sequence which can crash a guest machine.
14 REPLIES 14
Vijaykumar_1
Valued Contributor

Re: how to crash a guest machine in HPVM

Hello sathiyamoorthy,

There is no specific command to crash a VM machine. You can only remove a VM using hpvmremove.

Try running hpvmcollect when the guest machine is running and that should give you an idea
P Muralidhar Kini
Honored Contributor

Re: how to crash a guest machine in HPVM

Hi SathiyaMoorthy,

To crash a HPUX server you can use the TC command from the system console.
Refer the following link for more detail -
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1277297636922+28353475&threadId=1283500

For HPVM,
You can stop a running VM using hpvmstop. however it wont generate a crash dump.
* hpvmstop
http://docs.hp.com/en/T2767-90067/rn01re16.html
* hpvmcollect
http://docs.hp.com/en/T2767-90067/rn01re03.html

Hope this helps.

Regards,
Murali
Let There Be Rock - AC/DC
Vijaykumar_1
Valued Contributor

Re: how to crash a guest machine in HPVM

hpvmstop does not crash a VM.You might have to check for options in the HPVM console..
Steven E. Protter
Exalted Contributor

Re: how to crash a guest machine in HPVM

Shalom,

Microsoft specifically recommends stopping the Windows guest normally.

hpvmstop -p ## or
hpvmstop -P

This will stop a machine immediately. The windows machine will crash. HP-UX might stop somewhat more gracefully.

We have such a mixed environment, but have not purposefully crashed machines for this specific reason.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Emil Velez
Honored Contributor

Re: how to crash a guest machine in HPVM

you can do a


cm
pc
C

to power cycle the VM
Emil Velez
Honored Contributor

Re: how to crash a guest machine in HPVM

you can write a program that calls the panic()
system call.

man panic
SathiyaMoorthy
Occasional Advisor

Re: how to crash a guest machine in HPVM

Am amazed to have these many replies. Thanks for all your replies.

Let me experiment with the commands i see here, and get back to you with the result.
P Muralidhar Kini
Honored Contributor

Re: how to crash a guest machine in HPVM

Hi SathiyaMoorthy,

>> Thanks for all your replies
Refer the following link which says how you can thank the forum -
http://forums13.itrc.hp.com/service/forums/helptips.do?#28

Regards,
Murali
Let There Be Rock - AC/DC
Eric SAUBIGNAC
Honored Contributor

Re: how to crash a guest machine in HPVM

Bonjour,

RS (Reset) or TC (TOC) work also as well through a virtual machine console (hpvmconsole)

Eric
Bhadresh
Trusted Contributor

Re: how to crash a guest machine in HPVM

You can use TC command on Host machine console to generate Host Crash. TC command on guest console also can be useful to generate guest crash.

hpvmcollect command is useful for analyzing system problems. The hpvmcollect command is a shell script that can be run on either the VM Host or the guest to gather system information, log files, Integrity VM logs, crash dump and configuration files for later analysis.

By default, the hpvmcollect command creates a directory called hpvmcollect_archive in your current directory, and copies and collects all the Integrity VM and VM Host information. For example, to gather information for a guest named compass1 on the VM Host, enter the following command:
# hpvmcollect -P compass1

This command creates a directory called hpvmcollect_archive in your current directory (if it does not already exist) and then collects information about the VM Host crash dump. The information is then put into a tar file format (if there is a crash dump) or tar.gz file format (if there is no crash dump).

To get more information about hpvmcollect command, look at the chapter 12.1 and Integrity VM Manpages of the HP Integrity Virtual Machines Version 4.1 Installation, Configuration and Administration Guide:

http://docs.hp.com/en/T2767-90180/T2767-90180.pdf

Is there any specific reason you want to crash a guest machine or host machine?

Regards,
Bhadresh

SathiyaMoorthy
Occasional Advisor

Re: how to crash a guest machine in HPVM

1. tc in console

I tried transfer control in hpvmconsole of both my guests using tc command. Some times i get, Command failed. And other times it is no response.

And when there is no response it is supposed to be success. So i checked the status of the guest machine using hpvmstatus command.

For windows guest, it went from ON to OFF state, and to ON (EFI ) state. The same for HPUX machine.

I collected logs using hpvmcollect command.

I gone through the following important log files, and there is no useful information.
A. command.log
B. syslog.log
C. hpvm_mon_log

And especially, while executing the command hpvmcollect following are the useful info.

Collecting crash dump ............................................... NO
Running crashinfo ................................................... NO

These says, no crash happened ?!

But, this says crash happened ?
Copying guest VM crash image ........................................ OK

But with only image, how i can proceed ?! what is the use of that ?

I started working on this, to look into logs. So kindly help me further in getting logs ( readable text ).

2. Kindly guide me further about how to use that panic ?! There is no such panic am able to find.. Give me some referral.

3. @steven -- hpvmstop of windows machine is not crashing it.
Bhadresh
Trusted Contributor

Re: how to crash a guest machine in HPVM

>>I tried transfer control in hpvmconsole of both my guests using tc command. Some times i get, Command failed. And other times it is no response.

tc should not fail. Can you please send error details when tc is failing?

>>I collected logs using hpvmcollect command.

I gone through the following important log files, and there is no useful information.
A. command.log
B. syslog.log
C. hpvm_mon_log

Command.log contains information about all the commands executed.
Syslog.log contains information about virtual network switch and scheduler logs.
hpvm_mon_log is Integrity VM monitor log file.

When output is capture there were no issues with the system. Hence it looks like there is no useful information.
If there are any errors details will be captured in the respective log files.

>>Collecting crash dump ............................................... NO
Running crashinfo ................................................... NO

There was no crash dump and crashinfo available on Host system, hence hpvmcollect did not include in output.

>>But, this says crash happened ?
Copying guest VM crash image ........................................ OK

But with only image, how i can proceed ?! what is the use of that ?
>>> you can use HP-UX crash dump analysis tools.

hpvmcollect command is used for collecting useful information whenever any issue is there. You can report the issue through support channel.

>>I started working on this, to look into logs. So kindly help me further in getting logs ( readable text ).
As I understood you were able to read command.log, syslog.log and hpvm_mon_log (most useful logs).

>>2. Kindly guide me further about how to use that panic ?! There is no such panic am able to find.. Give me some referral.
Looks like there are no issues in your system. Is there any specific reason you want to crash a guest machine or host machine?

Refer the following link which says how you can thank the forum -
http://forums13.itrc.hp.com/service/forums/helptips.do?#28

Regards,
Bhadresh

SathiyaMoorthy
Occasional Advisor

Re: how to crash a guest machine in HPVM

> tc should not fail. Can you please send error details when tc is failing?

No error printed in STDERR.

> There was no crash dump and crashinfo available on Host system, hence hpvmcollect did not include in output.

Why there is no crash dump or info ?!

I have crashed the machine using tc, so it should have ? Or it is not yet crashed ? Then tell me how to crash ?


>As I understood you were able to read command.log, syslog.log and hpvm_mon_log (most useful logs).

Yes am able to read log files. But unable to find any useful information like, this machine crashed .. Because of this reason, something like that ?!

Or atleast, this Guest got crashed should be logged somewhere, where is that ?

Thanks for all these follow ups, anyway i am not able to achieve what i have planeed for ?

Additional Info:
@Emil

I recycled the power as you said, but no luck again. It restarted the machine. I collected the crash info, again no useful info.

Dennis Handly
Acclaimed Contributor

Re: how to crash a guest machine in HPVM

>I have crashed the machine using tc, so it should have? Or it is not yet crashed?

If you have enabled crash dumps, you should see them in /var/adm/crash/.