[one-users] onevm saveas, "ID not defined"
Jason Heiss
jheiss at aput.net
Fri Aug 27 22:25:36 PDT 2010
I'm using 2.0 beta 1. I'm using the mysql backend in case it is relevant.
Here's the complete "onevm show" output. Note that in doing some other work I reinstalled OpenNebula, so the VM has a different ID. However saveas is still failing in the same way.
# onevm show 2
VIRTUAL MACHINE 2 INFORMATION
ID : 2
NAME : vm1
STATE : ACTIVE
LCM_STATE : RUNNING
START TIME : 08/26 05:36:54
END TIME : -
DEPLOY ID: : one-2
VIRTUAL MACHINE TEMPLATE
CPU=1
DISK=[
CLONE=YES,
DISK_ID=0,
IMAGE=CentOS-5.5-x86_64-netinstall.iso,
IMAGE_ID=0,
READONLY=YES,
SAVE=NO,
SOURCE=/opt/tpkg/one/var/images/8b44d66b02ea1c28f94b2d44c87aabc8fa37b1c0,
TARGET=hdc,
TYPE=CDROM ]
DISK=[
CLONE=YES,
DISK_ID=1,
IMAGE=blank20G,
IMAGE_ID=1,
READONLY=NO,
SAVE=NO,
SOURCE=/opt/tpkg/one/var/images/5464c818cfc6c8072800330bd2089af6a22ec477,
TARGET=hda,
TYPE=DISK ]
DISK=[
DISK_ID=2,
SIZE=1024,
TARGET=hdd,
TYPE=swap ]
GRAPHICS=[
LISTEN=0.0.0.0,
PASSWD=vncpass,
PORT=5002,
TYPE=vnc ]
MEMORY=1024
NAME=vm1
NIC=[
BRIDGE=br0 ]
OS=[
BOOT=cdrom ]
VMID=2
On Aug 26, 2010, at 10:00 AM, Carlos Martín Sánchez wrote:
> Hi again Jason,
>
> I've tried to replicate the error, but it works for the current git code, in both master and one-2.0 branches, and the code in one-2.0-beta1.tar.gz
> What OpenNebula version are you using?
>
> The only thing we could use to find the bug is the complete "onevm show 8" output. Maybe OpenNebula didn't write the IMAGE_ID variables for each disk.
>
> Regards,
> Carlos.
>
> Carlos Martín, Cloud Technology Engineer/Researcher
> DSA Research Group: web http://dsa-research.org and blog http://blog.dsa-research.org
> OpenNebula Open Source Toolkit for Cloud Computing: http://www.OpenNebula.org
>
>
> 2010/8/26 Jason Heiss <jheiss at aput.net>
> The disk was an image from the repository. Here's the VM template:
>
> # cat vm1.template
> NAME = vm1
> CPU = 1
> MEMORY = 1024
> DISK = [ image = "CentOS-5.5-x86_64-netinstall.iso" ]
> DISK = [ image = "blank20G" ]
> DISK = [ type = "swap", size = 1024 ]
> OS = [ boot = "cdrom" ]
> NIC = [ bridge = "br0" ]
> GRAPHICS = [ type = "vnc", listen = "0.0.0.0", passwd = "vncpass" ]
>
> And here's my image list:
>
> # oneimage list
> ID USER NAME TYPE REGTIME PUB STAT #VMS
> 0 oneadmin CentOS-5.5-x86_64-ne CD Aug 09, 2010 05:28 Yes used 1
> 1 oneadmin blank20G OS Aug 09, 2010 05:29 Yes used 1
> 2 oneadmin blank5G OS Aug 17, 2010 16:22 Yes rdy 0
>
>
> On Aug 24, 2010, at 7:54 AM, Carlos Martín Sánchez wrote:
>
>> Hi Jason,
>>
>> Could you send your VM template?
>>
>> If I'm guessing right, disk 1 wasn't created from an image in the repository.
>> The error you are getting is because the onevm command can't find the IMAGE_ID inside your DISK attribute. The reason why it tries to find the source image is because it wants to specify the type for the new image, and it wasn't provided with the -t option.
>>
>> I have opened a ticket [1], but meanwhile you could just add the "-t OS" option.
>>
>> Regards,
>> Carlos
>>
>> [1] http://dev.opennebula.org/issues/327
>>
>> Carlos Martín, Cloud Technology Engineer/Researcher
>> DSA Research Group: web http://dsa-research.org and blog http://blog.dsa-research.org
>> OpenNebula Open Source Toolkit for Cloud Computing: http://www.OpenNebula.org
>>
>>
>> On 22 August 2010 20:47, Jason Heiss <jheiss at aput.net> wrote:
>> I'm trying to use the onevm saveas functionality in 2.0 beta 1, but it doesn't seem to like me:
>>
>> # onevm saveas 8 1 myimage
>> ID not defined
>>
>> I've deleted and recreated the VM with no luck. Still fiddling around to see if I can figure it out, but I thought I'd throw it out and see if anyone had an idea.
>>
>> The VM ID should be fine:
>>
>> # onevm list
>> ID USER NAME STAT CPU MEM HOSTNAME TIME
>> 8 oneadmin vm1 runn 0 1048576 10.0.0.73 00 00:29:22
>>
>> The disk ID as well:
>>
>> # onevm show 8 | egrep 'DISK|DISK_ID|TYPE'
>> DISK=[
>> DISK_ID=0,
>> TYPE=CDROM ]
>> DISK=[
>> DISK_ID=1,
>> TYPE=DISK ]
>> DISK=[
>> DISK_ID=2,
>> TYPE=swap ]
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20100827/a92a79f7/attachment-0003.htm>
More information about the Users
mailing list