[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v3 00/15] libxl: synchronise domain configuration



Version 3 of this series based on master branch.  This series can be pulled
from:

 git://xenbits.xen.org/people/liuw/xen.git wip.config-sync3-b

Delta from v2 is listed in individual commit log.

This version has passed following tests:
  test-amd64-amd64-xl
  test-amd64-amd64-xl-qemuu-debianhvm-amd64
  test-amd64-amd64-xl-qemut-debianhvm-amd64

I've also done some manual tests for things cannot be tested in OSSTest.  If
you are interested in any specific test please let me know.

Tests I've done:

### Rename-restart test (test xl domain death handling path)
root@dt14:~# xl list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   511     8     r-----    4325.1
debian.guest.osstest-20140904T1759Z         49   512     1     ---s--       6.4
debian.guest.osstest                        50   512     0     --p---       0.0

### xl config-update (test command compatability and domain death handling)
on_restart = "restart"
root@dt14:~# xl config-update debian.guest.osstest debian.guest.osstest.cfg
WARN: xl now has better capability to manage domain configuration, avoid using 
this command when possible
setting dom55 configuration
[ "xl" file appears in userdata store ]
[ reboot guest ]
[ "xl" file gone, transformed into "libxl-json" file ]

### xl list --long on Dom0 only system (test stub file generation)
[
    {
        "domid": 0,
        "config": {
            "c_info": {
                "type": "pv",
                "name": "Domain-0"
            },
            "b_info": {
                "max_memkb": 524288,
                "target_memkb": 523903,
                "sched_params": {

                },
                "type.pv": {

                }
            }
        }
    }
]


### xl block-attach and block-detach for Dom0
root@dt14:~#  xl block-attach Domain-0 
'file:/root/standalone.test-amd64-amd64-xl-qemut-debianhvm-amd64.debianhvm-empty.iso,hdc:cdrom,r'
root@dt14:~# xl block-list Domain-0
Vdev  BE  handle state evt-ch ring-ref BE-path                       
5632  0   0      4     76     8        /local/domain/0/backend/qdisk/0/5632
root@dt14:~#  xl block-detach Domain-0 hdcroot@dt14:~# xl block-list Domain-0
Vdev  BE  handle state evt-ch ring-ref BE-path                       
root@dt14:~# 


### hotplug a device then migrate guest (test configuration preservation)
root@dt14:~# xl create debian.guest.osstest.cfg
root@dt14:~# xl network-list debian.guest.osstest 
Idx BE Mac Addr.         handle state evt-ch   tx-/rx-ring-ref BE-path          
             
0   0  5e:36:06:59:00:01     0     4     11    10/11          
/local/domain/0/backend/vif/65/0
root@dt14:~#  xl network-attach debian.guest.osstest 'bridge=xenbr0'
root@dt14:~# xl network-list debian.guest.osstest 
Idx BE Mac Addr.         handle state evt-ch   tx-/rx-ring-ref BE-path          
             
0   0  5e:36:06:59:00:01     0     4     11    10/11          
/local/domain/0/backend/vif/65/0
1   0  00:16:3e:4b:9c:27     1     4     12    51/82          
/local/domain/0/backend/vif/65/1
root@dt14:~# xl migrate debian.guest.osstest localhost
migration target: Ready to receive domain.
Saving to migration stream new xl format (info 0x1/0x0/1275)
Loading new save file <incoming migration stream> (new xl fmt info 0x1/0x0/1275)
 Savefile contains xl domain config in JSON format
xc: Reloading memory pages: 131131/262144   50%migration target: Transfer 
complete, requesting permission to start domain.
migration sender: Target has acknowledged transfer.
migration sender: Giving target permission to start.
migration target: Got permission, starting domain.
migration target: Domain started successsfully.
migration sender: Target reports successful startup.
Migration successful.
root@dt14:~# xl network-list debian.guest.osstest 
Idx BE Mac Addr.         handle state evt-ch   tx-/rx-ring-ref BE-path          
             
0   0  5e:36:06:59:00:01     0     4     11    82/51          
/local/domain/0/backend/vif/66/0
1   0  00:16:3e:4b:9c:27     1     4     12    11/10          
/local/domain/0/backend/vif/66/1

Thanks
Wei.

Legend: A - acked

Wei Liu (15):
 A  libxl: make userdata_path libxl internal function
 A  libxl: functions to lock / unlock libxl userdata store
    libxl: properly lock userdata store
 A  libxl: libxl-json format and internal functions to get / set it
 A  libxl: store a copy of configuration when creating domain
 A  libxl: introduce libxl__device_from_pcidev
    libxl: disallow attaching the same device more than once
    libxl: introduce helper to initialise Dom0
    libxl: synchronise configuration when we hotplug a device
    libxl: make libxl_cd_insert "eject" + "insert"
    libxl: refactor libxl_get_memory_target
    libxl: introduce libxl_retrieve_domain_configuration
    libxl: introduce libxl_userdata_unlink
    xl: use libxl_retrieve_domain_configuration and JSON format
 A  xl: long output of "list" command now contains Dom0 information

 .gitignore                                  |    1 +
 docs/man/xl.pod.1                           |    5 +
 tools/hotplug/Linux/init.d/xencommons.in.in |    5 +-
 tools/libxl/Makefile                        |   10 +-
 tools/libxl/libxl.c                         |  526 +++++++++++++++++++++++++--
 tools/libxl/libxl.h                         |   34 ++
 tools/libxl/libxl_create.c                  |   22 ++
 tools/libxl/libxl_device.c                  |   19 +
 tools/libxl/libxl_dom.c                     |  112 +++++-
 tools/libxl/libxl_internal.c                |  146 ++++++++
 tools/libxl/libxl_internal.h                |  184 ++++++++++
 tools/libxl/libxl_pci.c                     |   80 +++-
 tools/libxl/libxl_types.idl                 |    3 +
 tools/libxl/xen-init-dom0.c                 |  120 ++++++
 tools/libxl/xl_cmdimpl.c                    |  127 ++++---
 tools/libxl/xl_cmdtable.c                   |    4 +-
 16 files changed, 1283 insertions(+), 115 deletions(-)
 create mode 100644 tools/libxl/xen-init-dom0.c

-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.