onevm shutdown terminate the vm that is why it is not appear in list<br><br>/Zee<br><br><div class="gmail_quote">On Thu, Sep 15, 2011 at 3:36 PM, Valentin Bud <span dir="ltr"><<a href="mailto:valentin.bud@gmail.com">valentin.bud@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello Community,<div><br></div><div> I have installed OpenNebula 3.0 beta 2 from source on Ubuntu Lucid (10.04-amd64). I have built OpenNebula with MySQL</div>
<div>support because I want a MySQL backend. After building it I have installed it using install.sh as follows:</div>
<div># ./install.sh -u oneadmin -g cloud </div><div><br></div><div> Everything went well and I ended up with a fresh OpenNebula install. I have configured the MySQL databases credentials in /etc/oned.conf</div><div>and started oned. Next step was to register one Debian Squeeze image.</div>
<div><br></div><div># oneimage show 0 </div><div>IMAGE 0 INFORMATION </div><div><div>ID : 0 </div><div>NAME : debian-squeeze </div>
<div>USER : oneadmin </div><div>GROUP : oneadmin </div><div>TYPE : OS </div><div>REGISTER TIME : 09/15 15:13:44 </div><div>PUBLIC : Yes </div>
<div>PERSISTENT : No </div><div>SOURCE : /var/lib/one/images/5c55b64e99e37b5b8b0d7dde918a91f1</div><div>SIZE : 612 </div><div>STATE : rdy </div>
<div>RUNNING_VMS : 0 </div><div><br></div><div>IMAGE TEMPLATE </div><div>DESCRIPTION="Debian Squeeze."</div><div>DEV_PREFIX=hd</div>
<div>NAME=debian-squeeze</div><div>PATH=/home/images/debian-squeeze.img</div><div>TYPE=OS</div><div><br></div><div>I have create a virtual machine template and registered it.</div><div># onetemplate show 0</div><div><div>
TEMPLATE 0 INFORMATION </div><div>ID : 0 </div><div>NAME : debian-squezee </div><div>USER : oneadmin </div>
<div>GROUP : oneadmin </div><div>REGISTER TIME : 09/15 15:16:18 </div><div>PUBLIC : No </div><div><br></div><div>TEMPLATE CONTENTS </div>
<div>CPU=1</div><div>DISK=[</div><div> BUS=ide,</div><div> DRIVER=qcow2,</div><div> IMAGE_ID=0 ]</div><div>DISK=[</div><div> READONLY=no,</div><div> SIZE=1024,</div><div> TYPE=swap ]</div><div>GRAPHICS=[</div><div>
LISTEN=0.0.0.0,</div>
<div> TYPE=vnc ]</div><div>MEMORY=1024</div><div>NAME=debian-squezee</div><div>NIC=[</div><div> IP=192.168.150.11,</div><div> NETWORK_ID=0 ]</div><div>OS=[</div><div> ARCH=x86_64 ]</div><div>TEMPLATE_ID=0</div></div>
<div>
<br></div><div>The virtual network with id 0 is also created.</div><div>#onevnet show 0</div><div><div>VIRTUAL NETWORK 0 INFORMATION </div><div>ID : 0 </div>
<div>USER : oneadmin </div><div>GROUP : oneadmin </div><div>PUBLIC : Yes </div><div>USED LEASES : 0 </div><div><br></div><div>VIRTUAL NETWORK TEMPLATE </div>
<div>BRIDGE=vlan150</div><div>DNS=192.168.150.1</div><div>GATEWAY=192.168.150.1</div><div>NAME=VLAN150</div><div>NETWORK_ADDRESS=192.168.150.0</div><div>NETWORK_SIZE=C</div><div>TYPE=RANGED</div></div><div><br></div><div>
I have instantiated the virtual machine defined in the above template. So far so good, everything works as expected. What I want</div><div>to do next is to update the debian image (apt-get update && apt-get upgrade) and save it as a new image. Said and done. I first start</div>
<div>the Debian VM, update it and then using onevm saveas I want to save the VM disk with ID 0 under a new name.</div><div><br></div><div># onevm saveas 5 0 debian-upd1</div><div> </div><div>I mention that I ran the above command while the Debian VM was on. As far as I understand from documentation this is not a problem but</div>
<div>the contents of the image are only created after the VM is shutdown gracefully (using onevm shutdown). So I did just that.</div><div><br></div><div># onevm shutdown 5</div><div># onevm list </div><div><div> ID USER GROUP NAME STAT CPU MEM HOSTNAME TIME</div>
<div> 5 oneadmin oneadmin one-5 shut 0 0K node02 00 00:09:18</div></div><div><br></div><div>I verify if the image is created using oneimage. I have double checked listing the SOURCE and it is there.</div>
<div><br></div><div># oneimage show 2</div><div><div>IMAGE 2 INFORMATION </div><div>ID : 2 </div><div>NAME : debian-s-upd1 </div>
<div>USER : oneadmin </div><div>GROUP : oneadmin </div><div>TYPE : OS </div><div>REGISTER TIME : 09/15 16:15:06 </div><div>PUBLIC : No </div>
<div>PERSISTENT : No </div><div>SOURCE : /var/lib/one/images/b92349a9f4ad479facf95f6706777d11</div><div>SIZE : 721 </div><div>STATE : rdy </div>
<div>RUNNING_VMS : 0 </div><div><br></div><div>IMAGE TEMPLATE </div><div>DEV_PREFIX=hd</div><div>NAME=debian-s-upd1</div><div>SOURCE=-</div>
</div><div><br></div><div>The problem. The Debian VM is gone, it is not listed anymore. onevm returns empty list. The Debian VM was the only</div><div>one active. Is this normal behavior if you save the only disk the VM has?</div>
<div><br></div><div>Thank you,</div><div>v</div>-- <br><font color="#888888">network warrior<br>
</font></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br>