I bring a small list of basic commands to manage virtual servers in XEN
Information
shell> xe vm-listUsing this command we can see a list of the machines: UUID, its name and the status
Start up
shell> xe vm-start name-label=nombreserverIt could also be done with the uuid identifier
shell> xe vm-start uuid=UUIDUsing the –force/force=true option we can force Startups, Shutdowns or restart
shell> xe vm-start uuid=UUID –forceTurn off
Like the beginning, we can use the UUID identifier.
shell> xe vm-shutdown name-label=nombreserver
shell> xe vm-shutdown name-label=nombreserver force=trueReboot
shell> xe vm-reboot name-label=nombreserverAs with shutdown and startup, you can pass the –force/force=true option to force a restart if it does not respond and the UUID.
shell> xe vm-reboot name-label=nombreserver force=trueMigrate
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.
shell> xe vm-migrate name-label=nombreserver host=server_02Export
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.
shell> xe vm-export name-label=nombreserver filename=/mnt/NAME.xvaMatter
It allows you to import the machine from a previously exported file, whether from the same system or from another system.
shell> xe vm-import /mnt/NAME.xvaIf we see that a machine is not responding, we are trying to perform a reboot...start it or turn it off and nothing...
shell> xe vm-reset-powerstatee uuid=uuid force=trueTurn off
This command does not destroy the machine, it is a shutdown as if we removed the power cable on a physical server.
shell> xm destroy nombreserverStart
This command allows you to turn on the previously turned off server.
shell> xm create nombreserverAccess 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.
shell> xm console nombreserverConsumption
This command is similar to the top one on GNU/Linix machines, it allows you to see the consumption of all virtual servers.
shell> xentopAll the best,
Comments