This commit is contained in:
Vyacheslav Anzhiganov 2016-05-17 21:04:26 +03:00
parent 98a60acfc2
commit ceded625f4

View file

@ -125,7 +125,7 @@ class QEMU:
def __prepare(self, hostname): def __prepare(self, hostname):
# Create directory for new VM # Create directory for new VM
# os.popen('mkdir -p /var/lib/qemu/images/%s/templates/qemu' % hostname, "r") # os.popen('mkdir -p /tmp/libvirt/%s/templates/libvirt' % hostname, "r")
subprocess.Popen([ subprocess.Popen([
# 'mkdir', '-p', '/var/lib/libvirt/images/%s/templates/qemu' % hostname # 'mkdir', '-p', '/var/lib/libvirt/images/%s/templates/qemu' % hostname
'mkdir', '-p', '/tmp/libvirt/%s/templates/libvirt' % hostname 'mkdir', '-p', '/tmp/libvirt/%s/templates/libvirt' % hostname
@ -187,7 +187,7 @@ class QEMU:
c = [ c = [
"cd", "cd",
"/var/lib/libvirt/images;" % hostname, "/var/lib/libvirt/images;",
"/usr/bin/vmbuilder", "/usr/bin/vmbuilder",
"kvm", "kvm",
os_name, os_name,
@ -196,7 +196,7 @@ class QEMU:
"--arch=amd64", "--arch=amd64",
"--mirror=%s" % mirror, "--mirror=%s" % mirror,
"-o", "-o",
"--qemu=qemu:///system", "--libvirt=qemu:///system",
"--ip=%s" % ipv4, "--ip=%s" % ipv4,
"--gw=%s" % gw, "--gw=%s" % gw,
# PARTITIONING # PARTITIONING