Check-in [64cd309237]
Not logged in
Overview
Comment:Fix order of names in the snapshot command
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 64cd30923769a468dfc57432d758ec2a344974fb
User & Date: vitus on 2015-12-21 08:47:55
Other Links: manifest | tags
Context
2015-12-21
09:30
Properly shutdown socket when VM started during created check-in: aa9f7e3c8a user: vitus tags: trunk
08:47
Fix order of names in the snapshot command check-in: 64cd309237 user: vitus tags: trunk
08:44
Fixed some problems appeared when integrating create into vws check-in: fe4f40d658 user: vitus tags: trunk
Changes

Modified vws from [23a7d14613] to [863e5d9a15].

287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
        print >>sys.stderr,"Cannot make snapshot of running VW"
        sys.exit(1)
    drives=get_drives(options.dir)
    os.chdir(options.dir)
    newnames={}
    for i in drives:
        name,ext=os.path.splitext(i)
        newnames[i]=name+"."+options.snapname+"."+ext
        if os.path.exists(newnames[i]):
            print >>sys.stderr,"Snapshot %s already exists",options.snapname
            return 1
    for i in drives:
        os.rename(i,newnames[i])
        os.system("qemu-img create -f qcow2 -b \"%s\" \"%s\"" %(i,newnames[i]))
    return 0

def cmd_snapshots(options): 
    os.chdir(options.dir)
    drives = get_drives(options.dir)
    lst=[]
    info={}







|





|







287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
        print >>sys.stderr,"Cannot make snapshot of running VW"
        sys.exit(1)
    drives=get_drives(options.dir)
    os.chdir(options.dir)
    newnames={}
    for i in drives:
        name,ext=os.path.splitext(i)
        newnames[i]=name+"."+options.snapname+ext
        if os.path.exists(newnames[i]):
            print >>sys.stderr,"Snapshot %s already exists",options.snapname
            return 1
    for i in drives:
        os.rename(i,newnames[i])
        os.system("qemu-img create -f qcow2 -b \"%s\" \"%s\"" %(newnames[i],i))
    return 0

def cmd_snapshots(options): 
    os.chdir(options.dir)
    drives = get_drives(options.dir)
    lst=[]
    info={}