Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
5849af23
authored
Jul 23, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing refactor vmdriver added PAUSE_ON_START flag
parent
5766345e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
vmdriver.py
+12
-12
No files found.
vmdriver.py
View file @
5849af23
...
...
@@ -56,7 +56,7 @@ def define(vm):
@req_connection
def
create
(
self
,
vm
):
def
create
(
vm
):
'''Create and start non-permanent virtual machine from xml
flags can be:
VIR_DOMAIN_NONE = 0
...
...
@@ -65,7 +65,7 @@ def create(self, vm):
VIR_DOMAIN_START_BYPASS_CACHE = 4
VIR_DOMAIN_START_FORCE_BOOT = 8
'''
self
.
connection
.
createXML
(
vm
.
dump_xml
(),
libvirt
.
VIR_DOMAIN_NONE
)
connection
.
createXML
(
vm
.
dump_xml
(),
libvirt
.
VIR_DOMAIN_START_PAUSED
)
logging
.
info
(
"Virtual machine
%
s is created from xml"
,
vm
.
name
)
...
...
@@ -102,41 +102,41 @@ def undefine(name):
@req_connection
def
start
(
self
,
name
):
def
start
(
name
):
'''Start an already defined virtual machine.
'''
domain
=
self
.
lookupByName
(
name
)
domain
=
lookupByName
(
name
)
domain
.
create
()
@req_connection
def
save
(
self
,
name
,
path
):
def
save
(
name
,
path
):
'''Stop virtual machine and save its memory to path.
'''
domain
=
self
.
lookupByName
(
name
)
domain
=
lookupByName
(
name
)
domain
.
save
(
path
)
@req_connection
def
resume
(
self
,
name
):
def
resume
(
name
):
'''Resume stopped virtual machines.
'''
domain
=
self
.
lookupByName
(
name
)
domain
=
lookupByName
(
name
)
domain
.
resume
()
@req_connection
def
reset
(
self
,
name
):
def
reset
(
name
):
'''Reset (power reset) virtual machine.
'''
domain
=
self
.
lookupByName
(
name
)
domain
=
lookupByName
(
name
)
domain
.
reset
()
@req_connection
def
reboot
(
self
,
name
):
def
reboot
(
name
):
'''Reboot (with guest acpi support) virtual machine.
'''
domain
=
self
.
lookupByName
(
name
)
domain
=
lookupByName
(
name
)
domain
.
reboot
()
# virDomainResume
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment