Welcome to Delicate template
Header
Just another WordPress site
Header

XenServer: Create a VM from CLI

septiembre 29th, 2011 | Posted by cristiansan in CLI | XenServer - (0 Comments)

A Virtual Machine (VM) is a software computer that, like a physical computer, runs an operating system and applications. The VM is comprised of a set of specification and configuration files and is backed by the physical resources of a host. Every VM has virtual devices that provide the same functionality as physical hardware, and can have additional benefits in terms of portability, manageability, and security.

Citrix

I talk about XenServer CLI and how do things with the Shell. Now i talk about how create VMs on XS5.6.

Install a VM with XenCenter is easy. But, maybe is necessary create a VM across the Shell. How i do it?

Run the Shell on XenServer or connect across Putty or another SSH client and run the next commands.

Install VM from Template:

 xe vm-install new-name-label=<VM_NAME> template=<TEMPLATE NAME>

*This command return the UUID of the Machine

List the ISOs available:

 xe cd-list

Putt he ISO into the virtual CD drive

 xe vm-cd-ad vm=<VM_NAME> cd-name=<NAME_ISO.iso> device=3

Start and instal the OS:

 xe vm-start vm=<VM-NAME>

In this point is necessary the XenCenter Console, because the VM console isn’t see with the CLI on XenServer. See how to install a VM with CLI.

Yo can see a list of VM templates with the next command:

 xe template-list

we create the VM with a Template:

and XS return the UUID of the VM.

and i can see on XenCenter the new VM:

Now it’s moment to see the ISO available with the comand xe cd-list.

I use this ISO for install 2008R2. For this…

 you can use <tab> for autocomplete the ISO name or VM name 😉

 And now, it’s moment to Start de VM: