def METHOD_NAME():
    make_option = optparse.make_option
    opt = optparse.OptionParser(option_list=[
            make_option('-o',
                        dest='output',
                        help='write to FILE',
                        metavar='FILE'),
            make_option('-d',
                        dest='depends',
                        help='write dependencies to FILE',
                        metavar='FILE',
                        default=None),
            make_option('-m',
                        dest='manifest',
                        help='read manifest from FILE',
                        metavar='FILE'),
            make_option('-D',
                        type='string',
                        help='define VAR=DATA',
                        metavar='VAR=DATA',
                        action='callback',
                        callback=add_var),
            make_option('--arch',
                        dest='arch',
                        default=host_arch,
                        help="specify QEMU architecture: x86_64, aarch64")
    ])
    (options, args) = opt.parse_args()
    depends = StringIO()
    if options.depends:
        depends = file(options.depends, 'w')
    manifest = read_manifest(options.manifest)
    depends.write('%s: \\\n' % (options.output,))
    image_path = os.path.abspath(options.output)
    upload_port = find_free_port()
    arch = options.arch
    if arch == 'x64':
        arch = 'x86_64'
    if arch == 'aarch64':
        console = ''
        zfs_builder_name = 'zfs_builder.img'
    else:
        console = '--console=serial'
        zfs_builder_name = 'zfs_builder-stripped.elf'
    osv = subprocess.Popen('cd ../..; scripts/run.py -k --kernel-path build/release/%s --arch=%s --vnc none -m 512 -c1 -i "%s" --block-device-cache unsafe -s -e "%s --norandom --nomount --noinit --preload-zfs-library /tools/mkfs.so; /tools/cpiod.so --prefix /zfs/zfs/; /zfs.so set compression=off osv" --forward tcp:127.0.0.1:%s-:10000' % (zfs_builder_name,arch,image_path,console,upload_port), shell=True, stdout=subprocess.PIPE)
    upload(osv, manifest, depends, upload_port)
    ret = osv.wait()
    if ret != 0:
        sys.exit("Upload failed.")
    depends.write('\n\n')
    depends.close()