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

Acceptance test loopback mount qcow #90

Open
Metallion opened this issue Jan 25, 2017 · 0 comments
Open

Acceptance test loopback mount qcow #90

Metallion opened this issue Jan 25, 2017 · 0 comments

Comments

@Metallion
Copy link
Contributor

Problem

Currently the acceptance test environment is making .raw images and then converting them to .qcow. The reasoning behind this is that .raw is easy to loopback mount and .qcow has copy-on-write.

However, if we could work with .qcow from the beginning, there would be no need for the conversion that does take up some time.

Solution

It looks like nowadays loopback mounting .qcow isn't as hard as it used to be.

From http://ask.xmodulo.com/mount-qcow2-disk-image-linux.html:

sudo modprobe nbd max_part=8
sudo qemu-nbd --connect=/dev/nbd0 /path/to/qcow2/image

Example

sudo qemu-nbd --connect=/dev/nbd0 /var/lib/libvirt/images/xenserver.qcow2
sudo fdisk /dev/nbd0 -l # <= check existing partitions
sudo mount /dev/nbd0p1 /mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant