Operating System - HP-UX
1753349 Members
4873 Online
108792 Solutions
New Discussion юеВ

clone existing HP VM dsk file to LVOL

 
p'Trick
New Member

clone existing HP VM dsk file to LVOL

Hi,

I have an existing HP VM dsk file,with an HP-UX installed. But as I prefer the performance of using VM's mapped to a LVOL rather than to a file, I would like to dump this virtual disk file to a new LVOL/file system. Has anyone done this before? Can I for example use dd to dump the dsk file to a LVOL?

Thanks in advance for any hint,
Kind regards
p'Trick
12 REPLIES 12
Steven E. Protter
Exalted Contributor

Re: clone existing HP VM dsk file to LVOL

Shalom,

Yes dd will work. It merely needs access to both disks. if is the source of is the destination.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
p'Trick
New Member

Re: clone existing HP VM dsk file to LVOL

Steven,

Thanks for the quick response. I tried the dd, and it finished finaly after 4 hours. But the result was not accessible by the HP VM manager. in fact I don't see anything in the filesystem where it is supposed to be. The dd command I used: nohup dd if=/vmstorage/templates/T_HP-UX-11.23.dsk of=/dev/vgsan01/rhpvm_omu_templ obs=1024 seek=1 &
After the dd is done I saw some inode errors in the syslog too.
Torsten.
Acclaimed Contributor

Re: clone existing HP VM dsk file to LVOL

I did not try this yet, but anyhow I doubt if this works.
I would consider to backup the (file based) virtual disk directly from the HPVM, create the LVOL based virtual disk and recover from backup.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
p'Trick
New Member

Re: clone existing HP VM dsk file to LVOL

Thanks Torsten,

I'm not so into the dd and lvols real critty stuff, can you perhaps tell me why you think the dd will not work?

Thanks!
Kr,
p'Trick
Torsten.
Acclaimed Contributor

Re: clone existing HP VM dsk file to LVOL

How did you test if this works or not?

Did you try to boot a virtual machine from this LVOL?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
p'Trick
New Member

Re: clone existing HP VM dsk file to LVOL

I used the HP VM manager Web gui to create a VM instance using the LVOL ( character based device file) where I dd'd the dsk file to.
But I got a plethora of errors from VM manager stating that it can't create the VM on that storage device. And in the syslog I saw inode errors...
Eric SAUBIGNAC
Honored Contributor

Re: clone existing HP VM dsk file to LVOL

Bonjour p'Trick,

I don't see why it could not be possible to dump a virtual file disk to a virtual LV disk. But probably some side effects depending how you do that ...

"I would like to dump this virtual disk file to a new LVOL/file system" and "And in the syslog I saw inode errors..." and "in fact I don't see anything in the filesystem where it is supposed to be."

--> I am afraid that you consider the virtual LV disk as a filesystem from host point of view. If you did a dd to a logical volume that has a mounted filesystem, I guess it is quiet normal that OS complains about inode.

And you are not supposed to see anything in "the filesystem where it is supposed to be" : it is a disk, a virtual disk, but a disk. So if you want to investigate the destination lvol, you must take care that it should have an efi partition, then an HP-UX partion, then an HP partition. In the HP-UX partition, there is a VG structure, and so on .... Don't waste time to investigate at Host level ...

Before issuing dd, check :

- size of LV must be at least the same than virtual file disk. Of course if it is greater you will have LVM limitations to deal with in the VM guest (vgmodify)

- Do NOT create a file system on this LV. It has no means.

- The VM that has the virtual file disk must be halted.

Unless there is some special issues when dumping a system disk to another, I don't understand your "seek" option with dd. I think you should simply issue : "dd if=/vmstorage/templates/T_HP-UX-11.23.dsk of=/dev/vgsan01/rhpvm_omu_templ bs=1024k". With a block size of 1 Mo it should be faster.

Once dumping is done, substitute the virtual LV disk to the virtual file disk in the VM. Be aware to keep same virtual bus, target, id.

Boot the VM from the virtual console. There is a possibility that it doesn't start HP-UX automatically. In this case you will have to start HP-UX manually.

Tell us

Eric



Stefan Brie_1
Advisor

Re: clone existing HP VM dsk file to LVOL

Hi Eric,

Thanks for your inputs; and I followed them closely:

1) I stopped the existing VM
2) dumped the dsk file to the lvol ( this is an lvol with no filesystems mounted: nohup dd if=/vmstorage/templates/T_HP-UX-11.23.dsk of=/dev/vgsan01/rhpvm_omu_01 bs=1024k &
3) then I cloned the existing VM but removed the existing backing storage and added the LVOL as backing storage:
hpvmclone -P vmhpux01 -N hpvm_omu_01 -B manual -d disk:scsi::file:/vmstorage/templates/T_HP-UX-11.23.dsk -a disk:scsi::lv:/dev/vgsan01/rhpvm_omu_01
4)verified the configuration of the created VM
5)started the VM
6)tried to boot hpux trough vmconsole:
fs0:\> hpux

(C) Copyright 1999-2006 Hewlett-Packard Development Company, L.P.
All rights reserved

HP-UX Boot Loader for IPF -- Revision 2.029
Console is on Serial COM1
Booting kernel...

Disabling 8259s

Memory Class Setup
-------------------------------------------------------------------------
Class Physmem Lockmem Swapmem
-------------------------------------------------------------------------
System : 8183 MB 8183 MB 8183 MB
Kernel : 8183 MB 8183 MB 8183 MB
User : 7010 MB 6108 MB 6132 MB
-------------------------------------------------------------------------

Loaded ACPI revision 2.0 tables.
NOTICE: cachefs_link(): File system was registered at index 4.
NOTICE: nfs3_link(): File system was registered at index 7.
NOTICE: mod_fs_reg: Cannot retrieve configured loading phase from KRS for module: cifs. Setting to load at INIT

Boot device's HP-UX HW path is: 0/0/0/0.0.0
iether0: INITIALIZING HP PCI/PCI-X 1000Base-T at hardware path 0/0/1/0

System Console is on the Built-In Serial Interface
WCalling function e000000000f7df60 for Shutdown State 8 type 0x2

Stored message buffer up to panic:
Found adjacent data tr. Growing size. 0x3441000 -> 0x7441000.
Pinned PDK malloc pool: base: 0xe000000100bbf000 size=119044K
Loaded ACPI revision 2.0 tables.
MMIO on this platform supports Write Coalescing.

MFS is defined: base= 0xe000000100bbf000 size= 2008 KB


Unpinned PDK malloc pool: base: 0xe000000108000000 size=147456K
NOTICE: cachefs_link(): File system was registered at index 4.
NOTICE: nfs3_link(): File system was registered at index 7.
NOTICE: mod_fs_reg: Cannot retrieve configured loading phase from KRS for module: cifs. Setting to load at INIT

0 cec_gen
0/0 gh2p
Initializing the Ultra320 SCSI Controller at 0/0/0/0. Controller firmware version is 00.00.00.00
0/0/0/0 mpt
0/0/1/0 iether
0/0/3/0 legacyio
0/0/3/0/1 asio0
0/1 gh2p
0/2 gh2p
0/3 gh2p
0/4 gh2p
0/5 gh2p
0/6 gh2p
0/7 gh2p
120 processor
121 processor
250 pdh
250/0 ipmi
250/1 acpi_node
0/0/0/0.0 tgt
0/0/0/0.0.0 sdisk
0/0/0/0.15 tgt
0/0/0/0.15.0 sctl
Boot device's HP-UX HW path is: 0/0/0/0.0.0
iether0: INITIALIZING HP PCI/PCI-X 1000Base-T at hardware path 0/0/1/0

System Console is on the Built-In Serial Interface
WARNING: Open failed on device 0x1f000002 (error 0x5).
WARNING: Can not read LVM BOOT information (lvmrec).
WARNING: Open failed on device 0x1f000002 (error 0x5).
WARNING: Can not read LVM BOOT information (lvmrec).
WARNING: Open failed on device 0x1f000002 (error 0x5).
WARNING: Can not read LVM BOOT information (BDRA).
WARNING: SWAP device 0xfffffffe is a non-LVM partition, disallowed on LVM disk.
WARNING: SWAP device 0xfffffffe has been deconfigured (set to 0xffffffff).
WARNING: Logical volume for Dump expected but not found.
Swap device table: (start & size given in 512-byte blocks)
WARNING: no swap device configured, so dump cannot be defaulted to primary swap.
WARNING: No dump devices are configured. Dump is disabled.
mountfs:opend

System Panic:

panic: all VFS_MOUNTROOTs failed: NEED DRIVERS ?????
Stack Trace:
IP Function Name
0xe000000000e09d80 vfs_mountroot+0x1d0
0xe00000000108cd20 im_mountroot+0x60
0xe0000000014feb50 DoCalllist+0x3a0
EFI Boot Manager ver 1.10 [14.62] [Build: Mon Jan 22 11:13:36 2007]

Please select a boot option

EFI Shell [Built-in]
Boot option maintenance menu


Use ^ and v to change option(s). Use Enter to select an option

As you see there still might be a problem with the lvol, but I don't know exactly what...

Any help is very welcome!

Thanks in advance
Eric SAUBIGNAC
Honored Contributor

Re: clone existing HP VM dsk file to LVOL

Bonjour,

"After the dd is done I saw some inode errors in the syslog too." --> No more alert in syslog now ?

Could you try to boot in maintenance mode, without LVM. Try "hpux -lm -is" instead of "hpux" and tell us.

If it works well, one idea could be that the cloned VMGuest has not the system disk on the good bus. Could you post :

hpvmstatus -P vmhpux01
hpvmstatus -P hpvm_omu_01

Eric