RE: Unable to start VM using COWed image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks a lot for your reply.

> From: Keqin Hong [khong@xxxxxxxxxx]
> Sent: 10 November 2010 01:56
> To: Prasad Joshi
> Subject: Re: Unable to start VM using COWed image

> ----- "Prasad Joshi" <P.G.Joshi@xxxxxxxxxxxxxxxxxxxxx> wrote:

> Hello,
>
> I am trying to run KVM machine from the image created as COW from the
> original image. But it not working.
>
> Screenshot that shows the KVM works with the original image
>
>  [root@prasad images]# qemu-kvm /var/lib/libvirt/images/Ubuntu.img -m
> 512
> ^Z
> [1]+  Stopped                 qemu-kvm
> /var/lib/libvirt/images/Ubuntu.img -m 512
> [root@prasad images]# bg
> [1]+ qemu-kvm /var/lib/libvirt/images/Ubuntu.img -m 512 &
> [root@prasad images]# pwd
> /var/lib/libvirt/images
> [root@prasad images]# lsmod | grep -i kvm
> kvm_intel              42122  3
> kvm                   257132  1 kvm_intel
>
> 1. Created COW copy of the image after stoping the VM that was
> running
>
> [root@prasad images]# pwd
> /var/lib/libvirt/images
>
> [root@prasad images]# qemu-img create -b Ubuntu.img -f qcow
> /home/prasad/Virtual/Ubuntu_copy.ovl

> try adding "-F base-fmt". Also qcow is obsolete, you'd better use qcow2
> e.g. qemu-img create -b Ubuntu.img -F raw -f qcow2 /home/prasad/Virtual/Ubuntu_copy.ovl

[root@prasad images]# pwd
/var/lib/libvirt/images

[root@prasad images]# date; qemu-img create -b Ubuntu.img -F raw -f qcow2 /home/prasad/Virtual/Ubuntu_copy.ovl
Wed Nov 10 09:44:31 GMT 2010
Formatting '/home/prasad/Virtual/Ubuntu_copy.ovl', fmt=qcow2 size=8589934592 backing_file='Ubuntu.img' backing_fmt='raw' encryption=off cluster_size=0 

[prasad@prasad Virtual]$ ls -l 
total 136
-rw-r--r--. 1 root root 262144 Nov 10 09:44 Ubuntu_copy.ovl

[prasad@prasad Virtual]$ sudo qemu-kvm ${PWD}/Ubuntu_copy.ovl -m 512
qemu: could not open disk image /home/prasad/Virtual/Ubuntu_copy.ovl: No such file or directory

[prasad@prasad Virtual]$ sudo qemu-kvm Ubuntu_copy.ovl -m 512
qemu: could not open disk image Ubuntu_copy.ovl: No such file or directory

[prasad@prasad Virtual]$ sudo qemu-kvm ./Ubuntu_copy.ovl -m 512
qemu: could not open disk image ./Ubuntu_copy.ovl: No such file or directory

>
> 2. Trying to run VM using the copy created
>
> [prasad@prasad Virtual]$ ls -l
> total 36
> -rw-r--r--. 1 root root 32832 Nov  9 15:33 Ubuntu_copy.ovl
>
> [prasad@prasad Virtual]$ qemu-kvm Ubuntu_copy.ovl -m 512
> qemu: could not open disk image Ubuntu_copy.ovl: Permission denied
>
> [prasad@prasad Virtual]$ sudo qemu-kvm Ubuntu_copy.ovl -m 512
> qemu: could not open disk image Ubuntu_copy.ovl: No such file or
> directory
something like this may help:
qemu -drive file=$file,index=0,media=disk,format=qcow2

>
> [prasad@prasad Virtual]$ sudo qemu-kvm ./Ubuntu_copy.ovl -m 512
> qemu: could not open disk image ./Ubuntu_copy.ovl: No such file or
> directory
>
> [prasad@prasad Virtual]$ qemu-kvm ${PWD}/Ubuntu_copy.ovl -m 512
> qemu: could not open disk image /home/prasad/Virtual/Ubuntu_copy.ovl:
> Permission denied
>
> [prasad@prasad Virtual]$ sudo qemu-kvm ${PWD}/Ubuntu_copy.ovl -m 512
> qemu: could not open disk image /home/prasad/Virtual/Ubuntu_copy.ovl:
> No such file or directory
>
> Why is it failing?
>
> Thanks and Regards,
> Prasad Joshi
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux