
--_000_CB9A52EC845Adustinschoenbrunnetappcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Greetings, I was wondering if someone could point me in the proper direction in the co= de where VMs are created within the oVirt Engine. Any help that I can get = would be greatly appreciated. Thanks! -- Dustin Schoenbrun Software Engineer - Data Center Platforms NetApp Inc. dustin.schoenbrun@netapp.com --_000_CB9A52EC845Adustinschoenbrunnetappcom_ Content-Type: text/html; charset="us-ascii" Content-ID: <CCA2BF034FEEE147A25A23F112FC48D2@tahoe.netapp.com> Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
</head> <body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-lin= e-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-fami= ly: Calibri, sans-serif; "> <div> <div> <div>Greetings,</div> <div><br> </div> <div>I was wondering if someone could point me in the proper direction in t= he code where VMs are created within the oVirt Engine. Any help that = I can get would be greatly appreciated. Thanks!</div> <div><br> </div> <div> <div> <div style=3D"font-family: Calibri, sans-serif; "><font class=3D"Apple-styl= e-span" color=3D"rgb(0, 0, 0)"><font class=3D"Apple-style-span" face=3D"Cal= ibri">--</font></font></div> <div style=3D"font-family: Calibri, sans-serif; "><font class=3D"Apple-styl= e-span" color=3D"rgb(0, 0, 0)"><font class=3D"Apple-style-span" face=3D"Cal= ibri"><span class=3D"Apple-style-span" style=3D"font-size: 14px;">Dustin Sc= hoenbrun</span></font></font></div> <div>Software Engineer - Data Center Platforms</div> <div>NetApp Inc.</div> <div>dustin.schoenbrun@netapp.com</div> <div><br> </div> </div> </div> </div> </div> </body> </html> --_000_CB9A52EC845Adustinschoenbrunnetappcom_--

--_000_62CD604BB12CB045864DDF2DA6C3C9CAD70EA837E5EXSFMMB02inte_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi everyone, I am new to ovirt and can't find any documentation about how to import an e= xisting VM into ovirt. I have a qcow2 image that I know runs under a KVM hy= pervisor. Ideally there would be a way for me to import it as a template be= cause I plan to create other virtual machines based off this VM. I tried virt-v2v, but it will only work if I have a datacenter setup with N= FS. In my case, I have a datacenter setup for local storage hosts. Thanks, Andrey --_000_62CD604BB12CB045864DDF2DA6C3C9CAD70EA837E5EXSFMMB02inte_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"><head><meta http-equiv=3DContent-Type content= =3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros= oft Word 12 (filtered medium)"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.apple-style-span {mso-style-name:apple-style-span;} span.EmailStyle18 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli= nk=3Dpurple><div class=3DWordSection1><div><div><div><div><div><p class=3DM= soNormal><span style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif"= ;color:#1F497D'>Hi everyone,<o:p></o:p></span></p><p class=3DMsoNormal><spa= n style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= D'><o:p> </o:p></span></p><p class=3DMsoNormal><span style=3D'font-siz= e:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I am new to ovir= t and can’t find any documentation about how to import an existing VM= into ovirt. I have a qcow2 image that I know runs under a KVM hypervisor. = Ideally there would be a way for me to import it as a template because I pl= an to create other virtual machines based off this VM. <o:p></o:p></span></= p><p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri= ","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=3DMsoNor= mal><span style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";colo= r:#1F497D'>I tried virt-v2v, but it will only work if I have a datacenter s= etup with NFS. In my case, I have a datacenter setup for local storage host= s. <o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'font-size:11.0= pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></spa= n></p><p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Cal= ibri","sans-serif";color:#1F497D'>Thanks,<o:p></o:p></span></p><p class=3DM= soNormal><span style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif"= ;color:#1F497D'>Andrey<o:p></o:p></span></p></div><div><p class=3DMsoNormal=
<span style=3D'font-size:10.5pt;font-family:"Calibri","sans-serif";color:b= lack'><o:p> </o:p></span></p></div></div></div></div></div></div></bod= y></html>=
--_000_62CD604BB12CB045864DDF2DA6C3C9CAD70EA837E5EXSFMMB02inte_--

This is a multi-part message in MIME format. --------------010602070809060403070001 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2012-3-30 10:14, Andrey Falko wrote:
Hi everyone,
I am new to ovirt and can't find any documentation about how to import an existing VM into ovirt. I have a qcow2 image that I know runs under a KVM hypervisor. Ideally there would be a way for me to import it as a template because I plan to create other virtual machines based off this VM.
I tried virt-v2v, but it will only work if I have a datacenter setup with NFS. In my case, I have a datacenter setup for local storage hosts.
Don's know where are your datacenters. If both of your datacenters are managed by oVirt, You can export the existing VM in datacenter. And then let the other datacenter to import it.
Thanks,
Andrey
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- Shu Ming<shuming@linux.vnet.ibm.com> IBM China Systems and Technology Laboratory --------------010602070809060403070001 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> On 2012-3-30 10:14, Andrey Falko wrote: <blockquote cite="mid:62CD604BB12CB045864DDF2DA6C3C9CAD70EA837E5@EXSFM-MB02.internal.salesforce.com" type="cite"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="Generator" content="Microsoft Word 12 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.apple-style-span {mso-style-name:apple-style-span;} span.EmailStyle18 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> <div class="WordSection1"> <div> <div> <div> <div> <div> <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi everyone,<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I am new to ovirt and can’t find any documentation about how to import an existing VM into ovirt. I have a qcow2 image that I know runs under a KVM hypervisor. Ideally there would be a way for me to import it as a template because I plan to create other virtual machines based off this VM. <o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">I tried virt-v2v, but it will only work if I have a datacenter setup with NFS. In my case, I have a datacenter setup for local storage hosts. </span></p> </div> </div> </div> </div> </div> </div> </blockquote> Don's know where are your datacenters. If both of your datacenters are managed by oVirt, You can export the existing VM in datacenter. And then let the other datacenter to import it.<br> <br> <blockquote cite="mid:62CD604BB12CB045864DDF2DA6C3C9CAD70EA837E5@EXSFM-MB02.internal.salesforce.com" type="cite"> <div class="WordSection1"> <div> <div> <div> <div> <div> <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks,<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Andrey<o:p></o:p></span></p> </div> <div> <p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"><o:p> </o:p></span></p> </div> </div> </div> </div> </div> </div> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <pre wrap="">_______________________________________________ Users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Users@ovirt.org">Users@ovirt.org</a> <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a> </pre> </blockquote> <br> <br> <pre class="moz-signature" cols="72">-- Shu Ming <a class="moz-txt-link-rfc2396E" href="mailto:shuming@linux.vnet.ibm.com"><shuming@linux.vnet.ibm.com></a> IBM China Systems and Technology Laboratory</pre> </body> </html> --------------010602070809060403070001--

On Thu, 29 Mar 2012 19:14:58 -0700 Andrey Falko <afalko@salesforce.com> wrote:
Hi everyone,
I am new to ovirt and can't find any documentation about how to import an existing VM into ovirt. I have a qcow2 image that I know runs under a KVM hypervisor. Ideally there would be a way for me to import it as a template because I plan to create other virtual machines based off this VM.
I tried virt-v2v, but it will only work if I have a datacenter setup with NFS. In my case, I have a datacenter setup for local storage hosts.
Thanks, Andrey
You should create export domain (nfs but still locally on same machine) and import existing image to this domain. After succesfull import you can restore machine to your local images domain and start VM. -- Michal

-----Original Message----- From: Michal Kopacki [mailto:mkopacki@gmail.com] Sent: Thursday, March 29, 2012 10:15 PM To: Andrey Falko Cc: users@ovirt.org Subject: Re: [Users] Importing an existing VM
On Thu, 29 Mar 2012 19:14:58 -0700 Andrey Falko <afalko@salesforce.com> wrote:
Hi everyone,
I am new to ovirt and can't find any documentation about how to import an existing VM into ovirt. I have a qcow2 image that I know runs under a KVM hypervisor. Ideally there would be a way for me to import it as a template because I plan to create other virtual machines based off this VM.
I tried virt-v2v, but it will only work if I have a datacenter setup with NFS. In my case, I have a datacenter setup for local storage hosts.
Thanks, Andrey
You should create export domain (nfs but still locally on same machine) and import existing image to this domain. After succesfull import you can restore machine to your local images domain and start VM.
-- Michal
I was able to do this successfully. Thanks! My VM however does not start up :(. I keep hitting this error: VM testVM2 is down. Exit message internal error process exited while connecting to monitor: Supported machines are: pc RHEL 6.2.0 PC (alias of rhel6.2.0) rhel6.2.0 RHEL 6.2.0 PC (default) rhel6.1.0 RHEL 6.1.0 PC rhel6.0.0 RHEL 6.0.0 PC rhel5.5.0 RHEL 5.5.0 PC rhel5.4.4 RHEL 5.4.4 PC rhel5.4.0 RHEL 5.4.0 PC . I see this in vdsm.log on the host: Thread-64891::DEBUG::2012-03-30 22:45:50,372::vm::357::vm.Vm::(_startUnderlyingVm) vmId=`ccb15c61-c20e-4195-9efc-3ca8edf2d9e6`::_ongoingCreations released Thread-64891::ERROR::2012-03-30 22:45:50,372::vm::381::vm.Vm::(_startUnderlyingVm) vmId=`ccb15c61-c20e-4195-9efc-3ca8edf2d9e6`::The vm start process failed Traceback (most recent call last): File "/usr/share/vdsm/vm.py", line 347, in _startUnderlyingVm self._run() File "/usr/share/vdsm/libvirtvm.py", line 1101, in _run self._connection.createXML(domxml, flags), File "/usr/share/vdsm/libvirtconnection.py", line 63, in wrapper ret = f(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2087, in createXML if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self) libvirtError: internal error process exited while connecting to monitor: Supported machines are: pc RHEL 6.2.0 PC (alias of rhel6.2.0) rhel6.2.0 RHEL 6.2.0 PC (default) rhel6.1.0 RHEL 6.1.0 PC rhel6.0.0 RHEL 6.0.0 PC rhel5.5.0 RHEL 5.5.0 PC rhel5.4.4 RHEL 5.4.4 PC rhel5.4.0 RHEL 5.4.0 PC How do I go about troubleshooting this? Thanks, Andrey

On 03/31/2012 01:49 AM, Andrey Falko wrote:
-----Original Message----- From: Michal Kopacki [mailto:mkopacki@gmail.com] Sent: Thursday, March 29, 2012 10:15 PM To: Andrey Falko Cc: users@ovirt.org Subject: Re: [Users] Importing an existing VM
On Thu, 29 Mar 2012 19:14:58 -0700 Andrey Falko<afalko@salesforce.com> wrote:
Hi everyone,
I am new to ovirt and can't find any documentation about how to import an existing VM into ovirt. I have a qcow2 image that I know runs under a KVM hypervisor. Ideally there would be a way for me to import it as a template because I plan to create other virtual machines based off this VM.
I tried virt-v2v, but it will only work if I have a datacenter setup with NFS. In my case, I have a datacenter setup for local storage hosts.
Thanks, Andrey
You should create export domain (nfs but still locally on same machine) and import existing image to this domain. After succesfull import you can restore machine to your local images domain and start VM.
-- Michal
I was able to do this successfully. Thanks!
My VM however does not start up :(. I keep hitting this error: VM testVM2 is down. Exit message internal error process exited while connecting to monitor: Supported machines are: pc RHEL 6.2.0 PC (alias of rhel6.2.0) rhel6.2.0 RHEL 6.2.0 PC (default) rhel6.1.0 RHEL 6.1.0 PC rhel6.0.0 RHEL 6.0.0 PC rhel5.5.0 RHEL 5.5.0 PC rhel5.4.4 RHEL 5.4.4 PC rhel5.4.0 RHEL 5.4.0 PC .
I see this in vdsm.log on the host:
Thread-64891::DEBUG::2012-03-30 22:45:50,372::vm::357::vm.Vm::(_startUnderlyingVm) vmId=`ccb15c61-c20e-4195-9efc-3ca8edf2d9e6`::_ongoingCreations released Thread-64891::ERROR::2012-03-30 22:45:50,372::vm::381::vm.Vm::(_startUnderlyingVm) vmId=`ccb15c61-c20e-4195-9efc-3ca8edf2d9e6`::The vm start process failed Traceback (most recent call last): File "/usr/share/vdsm/vm.py", line 347, in _startUnderlyingVm self._run() File "/usr/share/vdsm/libvirtvm.py", line 1101, in _run self._connection.createXML(domxml, flags), File "/usr/share/vdsm/libvirtconnection.py", line 63, in wrapper ret = f(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2087, in createXML if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self) libvirtError: internal error process exited while connecting to monitor: Supported machines are: pc RHEL 6.2.0 PC (alias of rhel6.2.0) rhel6.2.0 RHEL 6.2.0 PC (default) rhel6.1.0 RHEL 6.1.0 PC rhel6.0.0 RHEL 6.0.0 PC rhel5.5.0 RHEL 5.5.0 PC rhel5.4.4 RHEL 5.4.4 PC rhel5.4.0 RHEL 5.4.0 PC
How do I go about troubleshooting this?
http://lists.ovirt.org/pipermail/users/2012-March/001401.html since this seems to be going around, how about opening a bug (use keyword: Improvement) to better handle detection of emualted machines at host/cluster level) thanks

On 03/29/2012 11:56 PM, Schoenbrun, Dustin wrote:
Greetings,
I was wondering if someone could point me in the proper direction in the code where VMs are created within the oVirt Engine. Any help that I can get would be greatly appreciated. Thanks!
if you mean creating the VM at configuration level: AddVm. it has a few variants: 1. from template - will create the VM and clone/cow the disks 2. from scratch/blank template - will create the VM, and you will need to later add/attach the disks manually. 3. from an existing snapshot (will collapse layers iirc) (you can also import a VM) to run the VM: RunVm relevant code classes in engine under this path: ./backend/manager/modules/bll/src/main/java/org/ovirt/engine/core /bll/AddVmFromTemplateCommand.java /bll/AddVmFromSnapshotCommand.java /bll/AddVmTemplateInterfaceCommand.java /bll/AddVmFromScratchCommand.java for creating and attaching a disk to a VM bll/AddDiskToVmCommand.java

Hey Itamar, Thanks for the information! This is exactly what I was after. -- Dustin -----Original Message----- From: Itamar Heim [mailto:iheim@redhat.com] Sent: Friday, March 30, 2012 7:28 AM To: Schoenbrun, Dustin Cc: users@ovirt.org Subject: Re: [Users] VM Creation On 03/29/2012 11:56 PM, Schoenbrun, Dustin wrote:
Greetings,
I was wondering if someone could point me in the proper direction in the code where VMs are created within the oVirt Engine. Any help that I can get would be greatly appreciated. Thanks!
if you mean creating the VM at configuration level: AddVm. it has a few variants: 1. from template - will create the VM and clone/cow the disks 2. from scratch/blank template - will create the VM, and you will need to later add/attach the disks manually. 3. from an existing snapshot (will collapse layers iirc) (you can also import a VM) to run the VM: RunVm relevant code classes in engine under this path: ./backend/manager/modules/bll/src/main/java/org/ovirt/engine/core /bll/AddVmFromTemplateCommand.java /bll/AddVmFromSnapshotCommand.java /bll/AddVmTemplateInterfaceCommand.java /bll/AddVmFromScratchCommand.java for creating and attaching a disk to a VM bll/AddDiskToVmCommand.java
participants (5)
-
Andrey Falko
-
Itamar Heim
-
Michal Kopacki
-
Schoenbrun, Dustin
-
Shu Ming