This discussion is archived
1 Reply Latest reply: Feb 28, 2013 8:10 AM by user157995 RSS

VM Persistence

960874 Newbie
Currently Being Moderated
I created a couple of OL6-U3 PVM's on a SuSE-Xen host (using virt-install) and manually migrated the VM's to my OVS-Xen host. The migration was successful. However, the VM's aren't persistent. i.e., the VM's won't survive a reboot:
[root@xen3 ~]# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   568     2     r-----  34467.9
oracle1                                      1   786     1     -b----     58.2
oracle2                                      3   786     1     -b----     58.2

[root@xen3 ~]# xenstore-ls | grep '   name ='
   name = "Domain-0"
   name = "oracle1"
   name = "oracle2"
   name = "Pool-0"

[root@xen3 ~]# xm shutdown oracle1
[root@xen3 ~]# xm shutdown oracle2

[root@xen3 ~]# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   568     2     r-----  34564.1

[root@xen3 ~]# xm start oracle1
Error: Domain 'oracle1' does not exist.
I've noticed that there aren't any configuration files in /etc/xen:
[root@xen3 ~]# ls -1 /etc/xen
auto
cpupool
README
README.incompatibilities
scripts
xend-config.sxp
xend-pci-permissive.sxp
xend-pci-quirks.sxp
xl.conf
xm-config.xml
xmexample1
xmexample2
xmexample3
xmexample.hvm
xmexample.hvm-stubdom
xmexample.nbd
xmexample.pv-grub
xmexample.vti
[root@xen3 ~]# ls -1 /etc/xen/auto/
...and that if I try the method recommended in Chapter 5.3, Configuring a Virtual Machine by Modifying its Xend Settings, of the SuSE manual Virtualization with Xen, Xend complains:
[root@xen3 ~]# xm new -F ~/oracle1.cfg 
Unexpected error: exceptions.ImportError

Please report to xen-devel@lists.xensource.com
Traceback (most recent call last):
  File "/usr/sbin/xm", line 7, in ?
    main.main(sys.argv)
  File "/usr/lib64/python2.4/site-packages/xen/xm/main.py", line 3983, in main
    _, rc = _run_cmd(cmd, cmd_name, args)
  File "/usr/lib64/python2.4/site-packages/xen/xm/main.py", line 4007, in _run_cmd
    return True, cmd(args)
  File "<string>", line 1, in <lambda>
  File "/usr/lib64/python2.4/site-packages/xen/xm/main.py", line 1518, in xm_importcommand
    cmd = __import__(command, globals(), locals(), 'xen.xm')
  File "/usr/lib64/python2.4/site-packages/xen/xm/new.py", line 26, in ?
    from xen.xm.xenapi_create import *
  File "/usr/lib64/python2.4/site-packages/xen/xm/xenapi_create.py", line 25, in ?
    from lxml import etree
ImportError: No module named lxml
How can I make these VM's persistent?
[url=http://xenbits.xen.org/docs/unstable/man/xm.1.htmlxm man page:}
list [OPTIONS] [domain-id ...]
Prints information about one or more domains. If no domains are specified it prints out information about all domains.

OPTIONS

-l, --long
The output for xm list is not the table view shown below, but instead presents the data in SXP format.
Eric Pretorious
Truckee, CA
  • 1. Re: VM Persistence
    user157995 Explorer
    Currently Being Moderated
    For one, dont do anything manually, your likely to run into issues. Your assuming OVM-Xen is architected like a plain old Xen box. OVM uses xm create /path/to/vm.cfg type calls to start machines, for example.

    If your moving Xen guests from another server you should build a OVM 3.2 setup completely, create a new guest in OVM and import the disks and attach them to the newly created VM.

    Search this forum for "SimpleHTTPServer" and you will see some tips on how to use python to serve up directories so you can import disks directly.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points