Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importVapp failed #1

Open
markeclaudio opened this issue Aug 31, 2011 · 17 comments
Open

importVapp failed #1

markeclaudio opened this issue Aug 31, 2011 · 17 comments

Comments

@markeclaudio
Copy link

There's a problem when I try to restore a Vmachine.

vmbkp restore --name ChromeOS --host 172.17.2.62 --datastore "ced62:storage1" vm-845

This is the log output:

Vmbkp start.
08/31/11 14:52:14.555 [INFO, 10, com.cybozu.vmbkp.control.VmbkpCommandLine, getConfigPath] Use default config file vmbkp_global.conf.
08/31/11 14:52:15.392 [INFO, 10, com.cybozu.vmbkp.control.VmbkpCommandLine, getConfigPath] Use default config file vmbkp_group.conf.
08/31/11 14:52:15.408 [INFO, 10, com.cybozu.vmbkp.control.VmbkpMain, getAllTargetVmMorefList] Targets(moref): vm-805
08/31/11 14:52:15.409 [INFO, 10, com.cybozu.vmbkp.control.VmbkpMain, setTargets] Targets(vmName): QSrdp
08/31/11 14:52:15.427 [INFO, 10, com.cybozu.vmbkp.control.VmbkpMain, restoreVm] restoreVm() start.
08/31/11 14:52:15.427 [INFO, 10, com.cybozu.vmbkp.control.VmbkpMain, restoreVm] Restore target: "QSrdp" (vm-805).
08/31/11 14:52:15.428 [INFO, 10, com.cybozu.vmbkp.control.VmbkpMain, restoreVm] RestoreInfo: [newVmName QS][generation 0][host 172.17.2.62][datastore ced62:storage1][isNoVmdk false][isDryRun false][isSan false]
08/31/11 14:52:15.459 [INFO, 10, com.cybozu.vmbkp.control.VmbkpMain, restoreVm] -----VirtualControllerManager-----
type: buslogic, ckey: 1000, busNumber: 0

VirtualDiskManager: key: 2000, unitNumber: 0, capacityInKb: 83886080, datastore: ced62:storage1

08/31/11 14:52:15.460 [INFO, 10, com.cybozu.vmbkp.soap.Connection, connect] connecting to https://172.17.2.59/sdk...
08/31/11 14:52:15.786 [INFO, 10, com.cybozu.vmbkp.soap.Connection, connect] connected
08/31/11 14:52:16.432 [WARNING, 10, com.cybozu.vmbkp.soap.GlobalManager, importOvf] importVapp failed.
08/31/11 14:52:16.433 [WARNING, 10, com.cybozu.vmbkp.control.VmbkpMain, logException] restoreVm of vm-805 failed.
com.vmware.vim25.InvalidRequest
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.vmware.vim25.ws.XmlGen.fromXml(XmlGen.java:201)
at com.vmware.vim25.ws.XmlGen.parseSoapFault(XmlGen.java:80)
at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:132)
at com.vmware.vim25.ws.VimStub.importVApp(VimStub.java:1346)
at com.vmware.vim25.mo.ResourcePool.importVApp(ResourcePool.java:102)
at com.cybozu.vmbkp.soap.GlobalManager.importOvf(GlobalManager.java:233)
at com.cybozu.vmbkp.control.VmbkpMain.restoreVm(VmbkpMain.java:1212)
at com.cybozu.vmbkp.control.VmbkpMain.doRestore(VmbkpMain.java:401)
at com.cybozu.vmbkp.control.VmbkpMain.dispatch(VmbkpMain.java:249)
at com.cybozu.vmbkp.control.VmbkpMain.main(VmbkpMain.java:115)

thanks

@starpos
Copy link
Owner

starpos commented Sep 1, 2011

Please bring out your using softwares' version, vSphere composition, and backup environment.

Do you have permission to import ovf to the vSphere environment?
Try to import the ovf file in the backup directory manually.

If failed, please attach the ovf file.

@markeclaudio
Copy link
Author

Software version: 1.0.2
VSphere: 4.1
Backup Server: Linux 2.6.32-28-server #55-Ubuntu SMP x86_64 GNU/Linux Ubuntu 10.04.2 LTS

how can I import ovf file in the backup?

(Please Note:

root@Saon:/etc/vmbkp# ./vmbkp status ChromeOS
[vm-845][ChromeOS][Latest 0 "Wed Aug 31 03:32:08 CEST 2011"][Clean 1/1]

root@Saon:/etc/vmbkp# cat archives/vmbkp_all_vm.profile
[vm-845]
availability = true
is_template = false
name = ChromeOS
timestamp = Wed Aug 31 14:40:20 CEST 2011
timestamp_ms = 1314794420148
[vm_set]
vm-845 = ChromeOS

root@Saon:/etc/vmbkp# ls -lh archives/vm-845/
totale 12K
drwxr-xr-x 2 root root 4,0K 2011-08-31 03:32 0
-rw-r--r-- 1 root root 262 2011-08-31 03:34 vmbkp_vm.profile
-rw-r--r-- 1 root root 262 2011-09-01 09:08 vmbkp_vm.profile.bak
-rw-r--r-- 1 root root 0 2011-09-01 09:08 vmbkp_vm.profile.lock

root@Saon:/etc/vmbkp# ls -lh archives/vm-845/0
totale 851M
-rw-r--r-- 1 root root 22K 2011-08-31 03:34 0.digest
-rw-r--r-- 1 root root 851M 2011-08-31 03:34 0.dump
-rw-r--r-- 1 root root 206 2011-08-31 03:32 0.err
-rw-r--r-- 1 root root 6,1K 2011-08-31 03:34 0.log
-rw-r--r-- 1 root root 4,4K 2011-08-31 03:32 snapshot-943.ovf
-rw-r--r-- 1 root root 5,4K 2011-08-31 03:32 snapshot-943.ovf.orig
-rw-r--r-- 1 root root 1,1K 2011-08-31 03:34 vmbkp_generation.profile

@starpos
Copy link
Owner

starpos commented Sep 1, 2011

You can deploy an ovf file with vSphere client software.
Menubar -> File -> Deploy OVF template.

File "snapshot-943.ovf.orig" is the original ovf file extracted from your vSphere.
File "snapshot-943.ovf" is almost the same but disk information is removed.
Disk information is stored in vmbkp_generation.profile file.
Try to deploy snapshot-943.ovf.

@markeclaudio
Copy link
Author

Ok this work well.
thanks!

and about the disk?

@starpos
Copy link
Owner

starpos commented Sep 1, 2011

Do you want to restore just your VM once or want to use vmbkp in your system?

In the former case, create empty disks by hand and use vmdkbkp command to restore disk image. Please read README for usage.

In the latter case, please attach the ovf file. I can try to test vmbkp with the ovf in our environment and may fix the software.
Because we use still vSphere 4.0, I may yet fail to solve the problem.

@markeclaudio
Copy link
Author

OK thanks!
but
vmbkp restore --name ChromeOS --host 172.17.2.62 --datastore "ced62:storage1" vm-845

can restore only vm without HD?

@starpos
Copy link
Owner

starpos commented Sep 1, 2011

can restore only vm without HD?

No. After deploying the ovf file, then vmbkp will create empty disks
and execute vmdkbkp to restore disk images automatically.

Currently this software is not tested enough with various settings and environments
while we have used this software for about a year in our vSphere environment without big problems.

Thank you.

@markeclaudio
Copy link
Author

what's wrong? I'm trying to restore manually

root@Saon:/etc/vmbkp/archives/vm-148/0# vmdkbkp restore --digestin 0.digest 0.dump
LOG02011-08-21 11:43:41.066:VddkWorker::open() begin.
LOG02011-08-21 11:43:41.066:VmdkManager::open() begin
LOG02011-08-21 11:43:41.066:VmdkManager::open() end
LOG02011-08-21 11:43:41.066:Error: [vddk_manager.cpp:380] 3 One of the parameters was invalid
LOG02011-08-21 11:43:41.066:VddkWorker::open() failed.
LOG02011-08-21 11:43:41.066:dispatch(open) failed with -1 return value.
LOG02011-08-21 11:43:41.069:MyException: open() failed. [vddk_wrapper.cpp:509]

Failed cmd.run().
root@Saon:/etc/vmbkp/archives/vm-148/0# vmdkbkp restore --digestin 0.digest 0.vmx
LOG02011-08-21 11:43:46.428:StreamExcpetion:
(:0)
(:0)
(:0)
(:0)
(:0)
getAsString (serialize.hpp:48)
operator>> for VmdkDumpHeader (header.cpp:181)

Failed cmd.run().

@starpos
Copy link
Owner

starpos commented Sep 22, 2011

root@Saon:/etc/vmbkp/archives/vm-148/0# vmdkbkp restore --digestin 0.digest 0.dump

You need to specify --remote option and its related options: --server, --username, --password --vm.
Argument for --remote option should be like "[datastore name] /vm-name/vm-disk-name.vmdk".
Argument for --vm option should be moref like vm-123. Your vm is vm-148.

vmdkbkp restore --digestin 0.digest 0.vmx

Vmdkbkp uses its original format for dump files.
Do not specify 0.vmx directly.

@markeclaudio
Copy link
Author

root@Saon:/etc/vmbkp/archives/vm-143/0# ls -l
totale 25719932
-rw-r--r-- 1 root root 559182 2011-08-29 23:31 0.digest
-rw-r--r-- 1 root root 26336552630 2011-08-29 23:31 0.dump
-rw-r--r-- 1 root root 206 2011-08-29 23:15 0.err
-rw-r--r-- 1 root root 56360 2011-08-29 23:31 0.log
-rw-r--r-- 1 root root 4802 2011-08-29 23:15 snapshot-917.ovf
-rw-r--r-- 1 root root 5884 2011-08-29 23:15 snapshot-917.ovf.orig
-rw-r--r-- 1 root root 1124 2011-08-29 23:31 vmbkp_generation.profile

root@Saon:/etc/vmbkp/archives/vm-143/0# vmdkbkp restore --digestin 0.digest --dumpin 0.dump --remote [ced62:storage1]/test/test.vmdk --server 172.17.2.63 --username root --password test --vm vm-148
LOG02011-08-22 09:02:19.445:MyException: doRestore: one or more archives (dump or rdiff) files are required.
[command.cpp:866]

Failed cmd.run().

what's wrong?
really thanks

@starpos
Copy link
Owner

starpos commented Sep 22, 2011

--dumpin option is not used in restore, because restore command may require multiple dump files as input data.
Specify as an argument as follows:

vmdkbkp restore --digestin 0.digest --remote "[ced62:storage1] /test/test.vmdk" --server 172.17.2.63 --username root --password test --vm vm-148 0.dump

@starpos
Copy link
Owner

starpos commented Sep 22, 2011

By the way, I'm very interested in the reason why ovf import failed in your environment.
If it's OK with you, please send me the ovf files and other files also except for disk data.

It's enough that 0.err, 0.log, snapshot-917.ovf, snapshot-917.ovf.orig, and vmbkp_generation.profile.

Thank you.

@markeclaudio
Copy link
Author

All files except for disk data

Il 22/09/2011 09:19, HOSHINO Takashi ha scritto:

By the way, I'm very interested in the reason why ovf import failed in your environment.
If it's OK with you, please send me the ovf files and other files also except for disk data.

It's enough that 0.err, 0.log, snapshot-917.ovf, snapshot-917.ovf.orig, and vmbkp_generation.profile.

Thank you.

Claudio Marchesini
www.webtorbe.it

@markeclaudio markeclaudio reopened this Sep 22, 2011
@starpos
Copy link
Owner

starpos commented Sep 22, 2011

deleted.

@markeclaudio
Copy link
Author

root@Saon:/etc/vmbkp/archives/vm-143/0# vmdkbkp restore --digestin 0.digest --remote "[ced62:storage1]/test/test.vmdk" --server 172.17.2.59 --username administrator --password carped13m --vm vm-148 0.dump
VixDiskLib: Unable to load configuration options from /usr/local/lib/vmware-vix-disklib/config.
VixDiskLib: config options: libdir '', tmpDir '/tmp/vmware-root'.
VMware VixDiskLib (1.2) Release build-230216
Using system libcrypto, version 9080BF
LOG02011-08-22 09:37:43.233:VddkWorker::open() begin.
LOG02011-08-22 09:37:43.233:VmdkManager::open() begin
TicketResolveHostName: Resolving IP address for hostname 172.17.2.59.
TicketResolveHostName: Resolved to 172.17.2.59.
VixDiskLibVim: TicketLogin
VixDiskLibVim: TicketFindVMByMoRef: vmxPath = -vm-148-
VixDiskLibVim: TicketLoadVM
VixDiskLibVim: Unable to find key for disk [ced62:storage1]/test/test.vmdk
VixDiskLibVim: TicketLoadVMCb
VixDiskLibVim: TicketLoadVMCb failure - VixError = 4.
VixDiskLibVim: TicketLogout
LOG02011-08-22 09:37:44.230:VmdkManager::open() end
LOG02011-08-22 09:37:44.230:Error: [vddk_manager.cpp:380] 4 A file was not found
LOG02011-08-22 09:37:44.230:VddkWorker::open() failed.
LOG02011-08-22 09:37:44.230:dispatch(open) failed with -1 return value.
LOG02011-08-22 09:37:44.234:MyException: open() failed. [vddk_wrapper.cpp:509]

N.B.
VixDiskLibVim: Unable to find key for disk [ced62:storage1]/test/test.vmdk --> there is this file.

@starpos
Copy link
Owner

starpos commented Sep 22, 2011

vmdkbkp asssumes target vmdk disk is is created in the vSphere.
Please create empty disk using vSphere client before running vmdkbkp restore.

@starpos starpos closed this as completed Sep 22, 2011
@starpos starpos reopened this Sep 22, 2011
@starpos
Copy link
Owner

starpos commented Sep 22, 2011

All files except for disk data

Please send the email with attached files to [email protected] directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants