Git Product home page Git Product logo

go-qcow2's Introduction

go-qcow2

GoDoc

Manage the QEMU qcow2 image format written in Go.

Project Goals

Fully implement the management of the qcow2 image format written in Go.
Without importing the C(cgo) files related to the QEMU.

Mainly, this package was written for docker-machine-driver-xhyve.

License

This project is released under the BSD license. Same as the typical Go packages.

qcow2 image format specifications is under the QEMU license.

go-qcow2's People

Contributors

zchee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-qcow2's Issues

Corrupt QCow2 Image when new qcow2 image created from Cloud Image

I tried creating a new qcow2 image from a cloud image of Ubuntu 18.04 LTS that I got from Ubuntu Cloud Images, here is the link.

I used this library to create the qcow2 image using cloud image as the backing file. here is the code:

	diskOpts := qcow2.Opts{
		Filename:      diskPath,
		Fmt:           "qcow2",
		Size:          vmcfg.DiskSize * 1024 * 1024 * 1024,
		ClusterSize:   64 * 1024,
		BackingFile:   imgFilePath,
		BackingFormat: "qcow2",
	}
        qcow2.Create(&diskOpts)

When I try to verify this using qemu-img,

qemu-img info <diskPath>

I get the following errors in the output

ERROR: counting reference for region exceeding the end of the file by one cluster or more: offset 0x70000 size 0x400

1 errors were found on the image.
Data may be corrupted, or further writes to the image may corrupt it.
Image end offset: 196608

Can someone please guide me here? Maybe I am doing something wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.