1847840 Members
4182 Online
104021 Solutions
New Discussion

using hpvmclone

 
Christian Deutsch_1
Esteemed Contributor

using hpvmclone

Hi folks,

I am trying to clone an HP-UX 11.23 VM.

I used hpvmclone and a new VM was created but it is still using the same backup storage file as the original.

I guess I can use hpvmmodify to change this but the syntax looks quite challenging.

Would anyone like to help a little bit?

As always points will be assigned generously!

Thanks, Christian
Yeshua loves you!
11 REPLIES 11
Torsten.
Acclaimed Contributor

Re: using hpvmclone

Hi,

it is not that hard.

Please post a

hpvmstatus -P

and we will see how to adjust this.


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!   
Christian Deutsch_1
Esteemed Contributor

Re: using hpvmclone

hpvmstatus -P martin
[Virtual Machine Details]
Virtual Machine Name VM # OS Type State
==================== ===== ======= ========
martyrion 9 HPUX Off

[Authorized Administrators]
Oper Groups:
Admin Groups:
Oper Users:
Admin Users:

[Virtual CPU Details]
#vCPUs Entitlement Maximum
====== =========== =======
2 10.0% 100.0%

[Memory Details]
Total Reserved
Memory Memory
=========== ===========
1000 MB 64 MB

[Storage Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
disk scsi 0 0 0 0 0 file /VM_DATA/dolos

[Network Interface Details]
Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address
========= ========== ========== ======= === === === =================
vswitch lan LAB_LAN 4 0 1 0 6a-f2-ec-f4-69-a9

[Misc Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
serial com1 tty console

instead of /VM_data/dolos I need /VM_data/martin.

That's all, no other changes needed. To change the hostname and IP I can start the VM and use hostname and ifconfig.

Thanks for help, Christian
Yeshua loves you!
Torsten.
Acclaimed Contributor

Re: using hpvmclone

To remove the file backing store:

# hpvmmodify -P martin -d disk:scsi::file:/VM_data/dolos

to add a new file:

# hpvmmodify -P martin -a disk:scsi::file:/VM_data/martin

Start the VM and install the OS.
You probably need a DVD drive or a virtual DVD drive (ISO image) in your VM.


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!   
Christian Deutsch_1
Esteemed Contributor

Re: using hpvmclone

Dear Torsten,

Sorry some part of the command has a problem, maybe a colon (:) too many or too few?

hpvmmodify -P martin -d disk:scsi::file:/VM_data/dolos
hpvmmodify: Unable to find device disk:scsi::file:/VM_data/dolos.
hpvmmodify: Unable to modify the guest.

?

Thanks, Christian
Yeshua loves you!
Torsten.
Acclaimed Contributor

Re: using hpvmclone

First, be aware what the hpvmclone command does:

"The hpvmclone command creates a copy of an existing virtual machine and its configuration information.
This command copies the configuration files of the existing guest.

It does not copy the actual data and
software associated with the guest."
(man page)

So this is just the same like creating a new HPVM with equal amount of resources.

A disk backing store is noted like this:
disk:scsi::file:/pathname/file
(absolute pathname to the file)


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!   
Christian Deutsch_1
Esteemed Contributor

Re: using hpvmclone

Exactly Torsten,

This is my point, so it looks like hpvmclone is not going to help me much!

What I want to do is:

1.Copy file dolos, such that the OS and data are the same and that I have a new VM with minimal setup effort.
2.Start the copied VM, change IP address and hostname.
3.Then the "original" VM will be able to run at the same time as the copied VM.

Any ideas how to do that?

Thanks, Christian
Yeshua loves you!
Torsten.
Acclaimed Contributor

Re: using hpvmclone

I guess the command is not intented for this use, but try it.

Just delete the "old" file resource from the VM and add the new copied file. Make sure to use the absolute path.

(I forgot, if you use a new file, you have to create it first:
# hpvmdevmgmt -S 4G /mountpoint/file )

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!   
Torsten.
Acclaimed Contributor

Re: using hpvmclone

You should do the same with the LAN device, because your both HPVMs have the same MAC address otherwise:

# hpvmmodify -P martin -d network:lan::vswitch:vswitch

# hpvmmodify -P martin -a network:lan::vswitch:vswitch

After this (I'm sure) your virtual NIC will have another MAC address.

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!   
Tim Nelson
Honored Contributor

Re: using hpvmclone

Just so Torsten does not get to monopolized the points :)

I agree and ran into the same, the use of hpvmclone and it's representation in the documentation as a great and all powerfull command to clone virtual guest is ^%#&.

I found the command virtually worthless and easier to create a new VM Guest in lieu of figuring out new syntax to change all the backing stores and network.

I suppose if you have some complicated configuration of what.... hmmm ... CPUs and Memory, maybe a shared DVD you could find use for the command.

Maybe next version ?

Christian Deutsch_1
Esteemed Contributor

Re: using hpvmclone

ok now I was able to solve the problem:

1.Stop "original" VM dolos
2.Copy the file (cp dolos martin)
3.Use the Integrity Virtual Machines Manager GUI (browse to physical hostname:2301 and login as root, Tools/Integrity Virtual Machines Manager) to create a new VM, specify the file to use for the new VM, specify the filename martin for the backing file
4.In a terminal window shell to the physical machine as root, open an hpvmconsole for the new VM: hpvmconsole -P martin, enter the console by typing CO
5.Start the VM using the Integrity Virtual Machines Manager GUI
6.In the terminal window/VM console window, the EFI boot menu for the VM will come up
7.In the EFI boot menu, use Boot Option Maintenance to add a boot option (IA64 EFI, the first entry HPUX, HPUX EFI, boot option ASCII)
8.Change the boot order using letter u to get this as the first boot entry
9.Boot the machine
10.Change hostname and IP: vi /etc/rc.config.d/netconf
11.Reboot the VM

just in case this could help anyone
Yeshua loves you!
Christian Deutsch_1
Esteemed Contributor

Re: using hpvmclone

.
Yeshua loves you!