Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

Basic XEN Commands

Leer en espanol
Basic XEN Commands

Table of contents

Information textshell> xe vm-list Using this command we can see a list of the machines: UUID, its ===

I bring a small list of basic commands to manage virtual servers in XEN

Information

text
shell> xe vm-list

Using this command we can see a list of the machines: UUID, its name and the status

Start up

text
shell> xe vm-start name-label=nombreserver

It could also be done with the uuid identifier

text
shell> xe vm-start uuid=UUID

Using the –force/force=true option we can force Startups, Shutdowns or restart

text
shell> xe vm-start uuid=UUID –force

Turn off

Like the beginning, we can use the UUID identifier.

text
shell> xe vm-shutdown name-label=nombreserver
shell> xe vm-shutdown name-label=nombreserver force=true

Reboot

text
shell> xe vm-reboot name-label=nombreserver

As with shutdown and startup, you can pass the –force/force=true option to force a restart if it does not respond and the UUID.

text
shell> xe vm-reboot name-label=nombreserver force=true

Migrate

A machine is migrated from one physical server to another physical server. For this command to be correct, the servers will need to be clustered and also have a shared storage medium for the machine to be migrated.
The machine, for its part, will need xen-tools installed for the entire process to be correct.

text
shell> xe vm-migrate name-label=nombreserver host=server_02

Export

Export the machine as a file (a copy of the disk) to be able to backup it. The machine in this case needs to be turned off.

text
shell> xe vm-export name-label=nombreserver filename=/mnt/NAME.xva

Matter

It allows you to import the machine from a previously exported file, whether from the same system or from another system.

text
shell> xe vm-import /mnt/NAME.xva

If we see that a machine is not responding, we are trying to perform a reboot...start it or turn it off and nothing...

text
shell> xe vm-reset-powerstatee uuid=uuid force=true

Turn off

This command does not destroy the machine, it is a shutdown as if we removed the power cable on a physical server.

text
shell> xm destroy nombreserver

Start

This command allows you to turn on the previously turned off server.

text
shell> xm create nombreserver

Access the virtual server via console from the parent machine

Allows you to enter, from the hypervisor, the Linux virtual machine console. This is a good idea in case it is necessary to review the startup process of our machine.

Allows access to the virtual machine from the console. I usually use this command when I do destroy/create and I want to see how the server is starting.

text
shell> xm console nombreserver

Consumption

This command is similar to the top one on GNU/Linix machines, it allows you to see the consumption of all virtual servers.

text
shell> xentop

All the best,

Comments