LinuxQuestions.org
Visit Jeremy's Blog.
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 01-27-2017, 02:00 PM   #1
mav1c
LQ Newbie
 
Registered: Mar 2010
Location: Dulles, VA
Posts: 8

Rep: Reputation: 0
How to create a new VM from qcow2 file?


I have a qcow2 file that I'd like to use to create a new VM. How is this done in the Virtual Machine Manager GUI (or from the command line if that's the only way)?

Thanks
 
Old 01-27-2017, 03:05 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
A qcow2 file is a virtual filesystem. It can sometimes be converted to a different type of virtual filesystem using qemu-image tools like convert. It doesn't always work for me but not sure why not. Then you'd have to import it to a vm. Sometimes you can convert it to a raw image and then just use it like one would use a dd'ed image.

One can boot the system using qemu and then use any standard copy/clone method to move it to a new vm blank drive.


It may be possible that some vm's can fully support a qcow2 file format that you could then use to image off to a native format.
 
Old 01-27-2017, 04:15 PM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
When you start to create a new machine with Virt Manager, one of the choices for the installation source is, "Import existing disk image." It works just fine. You do have to select a compatible OS type, etc., so that the default configuration settings can be reasonable.
 
Old 01-31-2017, 09:35 AM   #4
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
what you are looking for is virt-install --import
 
1 members found this post helpful.
  


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
How to undelete a large .qcow2 file on ext3 file system? sxlderek Linux - Software 3 01-22-2016 05:16 PM
qcow2 - backing file shshsh Linux - Virtualization and Cloud 1 09-29-2013 11:37 PM
Why can't I just copy a .qcow2 file in KVM, while the VM is stopped, as a backup? rylan76 Linux - Virtualization and Cloud 2 11-05-2012 02:32 PM
QCow2 (IOW : a dynamic file) for suspend to file serafean Linux - Software 4 09-19-2011 10:14 AM
Security and how to create qcow2 in a non-default directory anon1231 Linux - Virtualization and Cloud 1 10-07-2010 11:34 PM

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

All times are GMT -5. The time now is 03:30 AM.

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