Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupt QCow2 Image when new qcow2 image created from Cloud Image #2

Open
sswastik02 opened this issue Jan 3, 2024 · 0 comments
Open

Comments

@sswastik02
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant