SUSE Conversations

Managing your Xen DomU: Difference between “xm new” and “xm create”

By: coolguys-suse

April 9, 2013 9:20 am





When you use Yast to “Create Virtual Machines”, it does several things. For example, suppose you create a VM (DomU) called “oes11″. The information you provide is saved in a file: /etc/xen/oes11. That information is also imported into the XenStore where it can be managed. You can then use “Virtual Machine Manager” to make changes to the DomU configuration saved in the XenStore. You can add devices, increase memory etc. but you will notice that none of those changes are reflected in /etc/xen/oes11.1. To see what DomU’s are being managed by xend:

xm list

2. To see the current xen configuration for your oes11 DomU:

xm list -l oes11

(That’s a lower case ELL after the “-”)

3. To save the current xen configuration for your oes11 DomU:

xm list -l oes11 >

the current xen configuration will be save to file, in your current directory

4. Now, if you no longer want xend to manage your oes11 Domu:

xm delete oes11

Note: this doesn’t delete the DomU or the virtual filestore. It just removes the definition from the XenStore.

5. To verify that Xen no longer knows about your oes11 DomU:

xm list

That will list all the DomU’s managed by xend. oes11 is no longer listed.

6. Even though the DomU is no longer managed by xend, you can still “run” it using the original configuration:

xm create /etc/xen/oes11

7. You can also import the configuration back into the XenStore using the file created in step 3:

xm new -F

8. Step 7 just imports the configuration. It doesn’t start the DomU. To start the DomU:

xm start oes11

There are a few more important points to consider:

  • The XenStore contains the current configuration including changes made with “Virtual Machine Manager”.
  • The file you use with xm create is static. It contains the initial configuration without any subsequent changes. For this reason it is often obsolete.
  • You are limited to making relatively simple changes to your DomU using “Virtual Machine Manager”.

This is the preferred method for changing your Xen configuration:

A. Shutdown the DomU using the appropriate OS specific method or from the Dom0:

xm shutdown <DomU>

B. Verify the DomU is no longer running:

xm list

C. Save the current xen configuration for your DomU in a file:

xm list -l <DomU> >

D. Save a copy of the file (just in case!).

E. Make any changes to the configuration using your favorite text editor and save the changes. <Modified Configuration>

F. Delete the current configuration from the XenStore

xm delete <DomU>

G. Import the modified configuration back into the XenStore using the file created in step E:

xm new -F <Modified Configuration>

H. Start the DomU

xm start <DomU>

An added benefit of following this procedure is you retain a backup copy of your DomU configuration should anything happen to the XenStore.

Editor’s Note:  This originally appeared in the Support Forums, and was last updated on 27-Feb-2013
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Tags: ,
Categories: Open Enterprise Server on SLES, SUSE Linux Enterprise Server, Technical Solutions, Virtualization

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.