LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 09-23-2016, 01:27 PM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Rep: Reputation: Disabled
Missing images in virt-manager GUI display


I want to backup and made extra copies of KVM images.
And thought if I want to transfer a KVM image to another
distribution, I just have to copy it into virt-manager's image folder.
and run it via virt-manager again.

I made a copy of a VM image like so:

NOTE: There are some copies that were deleted using virt-manager, but still shows up in the listing below. WHY?

Quote:
/var/lib/libvirt/images $ sudo cp centos7-1024ram-minimal.qcow2 centos7-1024ram-minimal-clone1.qcow2

/var/lib/libvirt/images $ sudo ls -al
total 18268668
drwx--x--x 2 root root 4096 Sep 23 11:59 .
drwxr-xr-x 7 root root 4096 Sep 22 11:03 ..
-rw------- 1 root root 12887130112 Sep 19 18:25 centos7-1024ram-dvd-1.qcow2
-rw------- 1 root root 12887130112 Sep 19 18:20 centos7-1024ram-dvd.qcow2
-rw------- 1 root root 15034941440 Sep 23 12:00 centos7-1024ram-minimal-clone1.qcow2
-rw------- 1 root root 15034941440 Sep 21 21:29 centos7-1024ram-minimal.qcow2
-rw------- 1 root root 12887130112 Sep 19 17:50 centos7-1024RAM.qcow2
-rw------- 1 root root 5306253312 Sep 20 15:46 centos7-1500ram-iso-clone1.qcow2
-rw------- 1 root root 5306253312 Sep 21 09:19 centos7-1500ram-iso-clone2.qcow2
-rw------- 1 root root 15034941440 Sep 20 15:22 centos7-1500ram-iso.qcow2

But my manually copied image (centos7-1500ram-iso-clone1.qcow2) does not show up in virt-manager!

Likewise, some images in above listing did not show up in virt-manager app.

I closed and restart virt-manager mutiple times.
Same missing images occurs.

The images that were installed or cloned by virt-manager shows up.
Those I deleted using virt-manager disappeared from virt-manager's GUI, but seems to still exists in /var/lib/libvirt/images. WHY?

If I am not able to see those copied images, then I cannot start or reconfigure a (K)VM image using virt-manager, obviously ....

So how do I make virt-manager display manually copied (cloned) images
in its /var/lib/libvirt/images directory?

Thank you.
 
Old 09-24-2016, 02:54 AM   #2
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
Maybe click on the Refresh "Volume List" button?
 
Old 09-24-2016, 06:41 AM   #3
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
@gradinaruvasile:

Where is Refresh "Volume List" in virt-manager?
 
Old 09-24-2016, 07:30 PM   #4
end
Member
 
Registered: Aug 2016
Posts: 266

Rep: Reputation: Disabled
re

try

virsh --connect qemu:///system list

and open again virt manager or

virsh --connect qemu:///system start .img

and open manager again
 
Old 09-24-2016, 08:49 PM   #5
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
Quote:
Originally Posted by fanoflq View Post
@gradinaruvasile:

Where is Refresh "Volume List" in virt-manager?
See the attachment.
Attached Thumbnails
Click image for larger version

Name:	virtmanager.png
Views:	174
Size:	71.2 KB
ID:	23103  
 
Old 09-24-2016, 09:17 PM   #6
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
@gradinaruvasile:

Your screenshot, it is virt-manager?
My virt-manager do not have those types of GUI.
It looks like this:
https://www.virt-manager.org/wp-cont...er-vm-list.png

I am using Linuxx Mint 18.

What OS is your host?
What is the name of your app?

Last edited by fanoflq; 09-24-2016 at 09:19 PM.
 
Old 09-25-2016, 01:09 AM   #7
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
It's virt-manager 1.4.0 on Debian Testing. The screen i shown is when you click edit->connection details->storage tab.
 
Old 09-25-2016, 07:35 AM   #8
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
@end:

Tried all your methods.
None of them seems to work.

Quote:
/var/lib/libvirt/images $ virsh --connect qemu:///system list
Id Name State
----------------------------------------------------

/var/lib/libvirt/images $ virsh --connect qemu:///system start .img
error: failed to get domain '.img'
error: Domain not found: no domain with matching name '.img'
 
Old 09-25-2016, 08:01 AM   #9
end
Member
 
Registered: Aug 2016
Posts: 266

Rep: Reputation: Disabled
replace .img with your centos7-1500ram-iso-clone1.qcow2 or any other

virsh --connect qemu:///system start virsh centos7-1500ram-iso-clone1.qcow2

or try coppy with this command cp -adpR centos7-1500ram-iso-clone1.qcow2

i follow

http://techlinux.net/2014/09/kvm-centos-7/

http://www.charleslabri.com/installi...7-x64-and-kvm/

Last edited by end; 09-25-2016 at 08:25 AM.
 
Old 09-25-2016, 08:02 AM   #10
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
@gradinaruvasile:

i did this:

Quote:
sudo cp centos7-1500ram-iso.qcow2 centos7-1500ram-iso-clone3.qcow2
When I refresh the storage tab, it shows up.
BUT it did not show up in the app's main display area like this:
https://www.virt-manager.org/wp-cont...er-vm-list.png

Then I tried to run it:
Quote:
virt-viewer --connect qemu:///system centos7-1500ram-iso-clone3
It returns error: "Cannot find guest domain centos7-1500ram-iso-clone3"

So it seems I may have to use virt-clone utility like so for it to show up in virt-manager:

Quote:
/var/lib/libvirt/images $ sudo virt-clone --original centos7-1500ram-iso --auto-clone
Allocating 'centos7-1500ram-iso-clone.qcow2' | 14 GB 00:02:27

Clone 'centos7-1500ram-iso-clone' created successfully.
 
Old 09-25-2016, 01:04 PM   #11
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
Well. You should RTM.A qcow2 file is JUST a virtual hdd imge. It is NOT a virtual machine definition file. Ergo, copying it will NOT create a new virtual machine.

The libvirt vm definition files are in xml format here (this is for Debian, i suppose these are the same for all distros):

Code:
/etc/libvirt/qemu/{vmname}.xml
All vms that are running under libvirt have a .xml file here.
 
Old 09-25-2016, 09:32 PM   #12
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
@gradinaruvasile:

Need elaboration:
Quote:
You should RTM. A qcow2 file is JUST a virtual hdd imge.
What is RTM?

So the only way to clone is to use virt-clone or virt-manager.
 
Old 09-26-2016, 03:09 AM   #13
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
Quote:
Originally Posted by fanoflq View Post
@gradinaruvasile:
So the only way to clone is to use virt-clone or virt-manager.
That's the way of doing it, yes. You can copy the xml files too but you will have to modify them (change UUIDs/MACs/whatever) and restart the libvirt service.

Quote:
Originally Posted by fanoflq View Post
What is RTM?
It's Read The Manual

PS
I wanted to be sarcastic here, but it seems googling RTM might not be as straightforward as i thought for someone not familiar with the term. Also, although wikipedia is the first on the hit list it also provides a long list of meanings - still under the section "Technology and Internet" the first link is "Read the manual" (which redirects to RTFM ...)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Set up VM to connect Tripleo QuickStart Overcloud via Virt-manager GUI LXer Syndicated Linux News 0 05-29-2016 01:54 PM
can virt-manager work without installing a full GUI? shemeza Linux - Virtualization and Cloud 3 02-21-2013 05:27 AM
Guests missing from virt-manager. How do I restore them? uhcafigdc Linux - Virtualization and Cloud 1 02-20-2012 04:33 PM
LXer: Hacking libvirt/virsh/virt-manager/virt-install at Xen 4.0 Dom0 on top of Ubunt LXer Syndicated Linux News 0 05-06-2010 02:50 PM
LXer: Virt-install&Virt-manager at Xen 4.0-rc8 (2.6.32.10 pvops) Dom0 on top Ubuntu K LXer Syndicated Linux News 0 03-26-2010 09:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 07:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration