PDA

View Full Version : Xen VM configuration files and VM Persistence



epretorious
26-Feb-2013, 20:37
I have a bit of a quandry: I've migrated two PVM's away from the host system but they persist in Xend even though they are not active on the host; they're not in XenStore (/var/lib/xenstore/tdb), and; there are no configuration files for the VM's (in /etc/xen/vm):

xen2:~ # ls /etc/xen/vm
sles11-1 sles11-1.xml

xen2:~ # xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 502 2 r----- 6185.1
oracle1 786 1 15.3
oracle2 786 1 14.0

xen2:~ # xenstore-ls | grep "name = "
name = "Domain-0"
name = "Pool-0"
pool_name = "Pool-0"
name = "Domain-0"

Where is this information being stored? :confused:

Eric Pretorious
Truckee, CA

From Chapter 3.1, Creating a Virtual Machine (https://www.suse.com/documentation/sles11/book_xen/?page=/documentation/sles11/book_xen/data/book_xen.html), of the SuSE manual Virtualization with Xen (https://www.suse.com/documentation/sles11/book_xen/?page=/documentation/sles11/book_xen/data/book_xen.html):


The actual configuration file for the Xen guests that is used for the installation is stored at /etc/xen/vm/.

From Chapter 3.5, Deleting Virtual Machines (https://www.suse.com/documentation/sles11/book_xen/?page=/documentation/sles11/book_xen/data/book_xen.html), also of the SuSE manual Virtualization with Xen (https://www.suse.com/documentation/sles11/book_xen/?page=/documentation/sles11/book_xen/data/book_xen.html):


To delete all components of a virtual machine configured with a file-backed virtual disk, you must manually delete... its initial startup file (/etc/xen/vm).

From Chapter 5.3, Configuring a Virtual Machine by Modifying its Xend Settings (https://www.suse.com/documentation/sles11/book_xen/?page=/documentation/sles11/book_xen/data/book_xen.html), also of the SuSE manual Virtualization with Xen (https://www.suse.com/documentation/sles11/book_xen/?page=/documentation/sles11/book_xen/data/book_xen.html):


It is no longer recommended that you edit the initial start-up files stored in /etc/xen/vm, because they are used only during the creation of a new virtual machine.

epretorious
26-Feb-2013, 21:19
Where is this information being stored? :confused:
I should also mention that even though...


there are no configuration files stored locally (in /etc/xen) and
there's no information stored in XenStore

...the VM's can be manually restarted:

xen2:~ # xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 502 2 r----- 40.1
oracle1 786 1 18.2
oracle2 786 1 16.9

xen2:~ # xm start oracle1

xen2:~ # xm start oracle2

xen2:~ # xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 502 2 r----- 62.8
oracle1 1 786 1 ------ 10.8
oracle2 2 786 1 r----- 2.8
So, this begs the question: Where is this information being stored? :confused:

KBOYLE
27-Feb-2013, 08:41
epretorious wrote:

> So, this begs the question: Where is this information being stored?

Your "xm list" reports oracle1 and oracle2. They are not running
therefore they must exist in the XenStore.

To see the configuration of the DomU:


xm list -l oracle1


See here for more information:
https://forums.suse.com/content.php?125-Managing-your-Xen-DomU-Difference-between-xm-new-and-xm-create

--
Kevin Boyle - Knowledge Partner
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...

epretorious
27-Feb-2013, 23:49
...I've migrated two PVM's away from the host system but they persist in Xend even though they are not active on the host; they're not in XenStore (/var/lib/xenstore/tdb), and; there are no configuration files for the VM's (in /etc/xen/vm):

xen2:~ # xenstore-ls | grep "name = "
name = "Domain-0"
name = "Pool-0"
pool_name = "Pool-0"
name = "Domain-0"


Your "xm list" reports oracle1 and oracle2. They are not running therefore they must exist in the XenStore.

To see the configuration of the DomU:


xm list -l oracle1


See here for more information:
https://forums.suse.com/content.php?125-Managing-your-Xen-DomU-Difference-between-xm-new-and-xm-create

Thanks for sharing your article "Managing your Xen DomU: Difference between "xm new" and "xm create (https://forums.suse.com/content.php?125-Managing-your-Xen-DomU-Difference-between-xm-new-and-xm-create)", Ken:

However, I'm more confused than before (because now I see that my understanding of Xend & XenStore is not necessarily correct)! :p

AFAICT, the xenstore-ls command (above) illustrates that the configuration settings of the PVM's "oracle1" & "oracle2" do not exist in XenStore. However, as you suggested (above) the xm list command contradicts this:

xen2:~ # xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 502 2 r----- 267.9
oracle1 786 1 211.9
oracle2 786 1 22.8

xen2:~ # xenstore-ls | grep oracle

xen2:~ # xm list -l oracle1
(domain
(cpu_weight 256)
(cpu_cap 0)
(pool_name Pool-0)
(bootloader /usr/bin/pygrub)
(vcpus 1)
(cpus (()))
(on_poweroff destroy)
(description '')
(on_crash restart)
(uuid a8422077-d938-3e6b-0f68-9cc83910ad4a)
(bootloader_args '')
(name oracle1)
(on_reboot restart)
(maxmem 786)
(memory 786)
(shadow_memory 0)
(features '')
(on_xend_start ignore)
(on_xend_stop ignore)
...
(device
(vbd
(protocol x86_64-abi)
(uuid 25b28895-67a7-0656-83e8-6a67a677972a)
(bootable 1)
(devid 51712)
(driver paravirtualised)
(dev xvda:disk)
(uname
phy:/dev/disk/by-id/scsi-14945540000000000705f69534353492d73616e325f300000
)
(mode w)
(VDI '')
(backend 0)
)
)
)

And so does this command:


xen2:~ # file /var/lib/xenstored/tdb
/var/lib/xenstored/tdb: TDB database version 6, little-endian hash size 7919 bytes

xen2:~ # strings /var/lib/xenstored/tdb | grep oracle
oracle2
oracle1
oracle1BBBl
oracle1
oracle1otocol
oracle1ol
oracle1
oracle1ckend-id
oracle1otocol
oracle1ol
oracle1dT
So I guess that, without any authoritative instructions for the xenstore command, I'm back to Square #1.

Hm. :(