Bug 988493

Summary: virt-sandbox-service needs to save a persistent libvirt config for all its containers
Product: Red Hat Enterprise Linux 7 Reporter: Daniel Walsh <dwalsh>
Component: libvirt-sandboxAssignee: Daniel Berrangé <berrange>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: acathrow, ajia, berrange, dyuan, gsun, jshao, weizhan, zpeng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-sandbox-0.5.0-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 13:00:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Walsh 2013-07-25 17:18:05 UTC
THis would allow us to start a container when a user logs in for OpenShift.
It would also allow us to manage containers using the libvirt protocol so tools like boxes or virt-manager and eventually more powerful tools can start/stop containers.

Comment 2 Daniel Berrangé 2013-08-01 14:56:05 UTC
When creating a sandbox, it is now persisted with libvirt

NB, when upgrading from 0.2.1 to 0.5.0, you won't be able to use an sandboxes you previously created. To fix existing sandboxes you must run

 virt-sandbox-service upgrade SANDBOXNAME

for each sandbox.

Comment 3 Daniel Berrangé 2013-08-01 14:59:05 UTC
*** Bug 968232 has been marked as a duplicate of this bug. ***

Comment 4 zhe peng 2013-08-07 08:26:15 UTC
verify with :
libvirt-sandbox-0.5.0-1.el7.x86_64
libvirt-1.1.1-2.el7.x86_64
kernel-3.10.0-6.el7.x86_64

step:
1: use virt-sandbox-service to create a container and start
#virt-sandbox-service create -C -u httpd.service apache01
#virsh -c lxc:/// start apache01

2: use virsh to check container status
#virsh -c lxc:/// list --all
 Id    Name                           State
----------------------------------------------------
 8072  apache01                          running

3:destroy the container
#virsh -c lxc:/// destroy apache01 

4:check container status
# virsh -c lxc:/// list --all
 Id    Name                           State
----------------------------------------------------
 -     apache01                       shut off

5:start the container using libvirt

#virsh -c lxc:/// start apache01
Domain apache01 started

try using virt-manager to start&stop container, worked as expect.

use libvirt-sandbox-0.2.1-1.el7 to create container,
#virt-sandbox-service create -C -u httpd.service http1
Created sandbox container dir /var/lib/libvirt/filesystems/http1
Created unit file /etc/systemd/system/http1_sandbox.service
Created sandbox config /etc/libvirt-sandbox/services/http1.sandbox

upgrade to libvirt-sandbox-0.5.0-1.el7.x86_64

upgrade container
# virt-sandbox-service upgrade http1
Created unit file /etc/systemd/system/http1_sandbox.service
Created sandbox config /etc/libvirt-sandbox/services/http1/config/sandbox.cfg

# virsh -c lxc:/// list --all
 Id    Name                           State
----------------------------------------------------
 -     apache01                       shut off
 -     http1                          shut off

# virsh -c lxc:/// start http1
Domain http1 started


verification passed. move to verified.

Comment 6 Ludek Smid 2014-06-13 13:00:38 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.