VM Backup of system disk

OpenVMS x86 Field Test questions, reports, and feedback.
Post Reply

Topic author
zeiszler
Member
Posts: 7
Joined: Mon Jul 11, 2022 1:23 pm
Reputation: 0
Status: Offline

VM Backup of system disk

Post by zeiszler » Fri Feb 24, 2023 10:28 am

Working on backing up the system disk on a VM to a new disk so that I have a backup of the system disk before I perform patch installations. The methods I have used before with bare metal systems was to backup to new disk and run the write boot. Then I could boot from it. With VM system I am trying to do same thing by presenting new disk, perform backup /image to new disk, then run writeboot. I am not finding a write boot executable but have found a md_writeboot.

What is the proper process for backing up a system disk to a new disk in a VM configuration and then making that new disk bootable?

Boot manager is a seperate process that comes up when booting, assuming I can add the new disk there when it scans for devices. Is there anything specific to setup in the boot manager to find the new system disk?


jonesd
Valued Contributor
Posts: 74
Joined: Mon Aug 09, 2021 7:59 pm
Reputation: 0
Status: Offline

Re: VM Backup of system disk

Post by jonesd » Fri Feb 24, 2023 11:38 am

Traditionally, backup/image was pretty good about making the target disk bootable if the source save set was of a bootable device. Did that change with X86?

I'd use the VM management tools to just make a copy of the virtual disk. Or snapshot it, do the update, then merge the snapshot into a new virtual disk.


sms
Master
Posts: 317
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: VM Backup of system disk

Post by sms » Fri Feb 24, 2023 2:04 pm

Code: Select all

> Working on backing up the system disk on a VM [...]

   I'll bite.  _Which_ VM software?

> [...] perform backup /image to new disk, then run writeboot. I am not
> finding a write boot executable but have found a md_writeboot.

   I know nothing, but a quick look in SYS$SYSTEM found SYS$SETBOOT.EXE:

V87 $ mcr SYS$SETBOOT
OpenVMS SETBOOT version V6.0-4
 
 
SETBOOT will now prompt you for information necessary to
write a bootblock onto a target disk device.  You can exit
(without writing the bootblock) at any prompt; enter CTRL/Z.
 
 
 
Specify the target architecture for the bootblock update now.
Valid architecture values are Alpha, VAX, IA64, and X86_64.
If the target architecture is not specified, the current system
architecture will be assumed.
 
Target Architecture for Bootblock?  



> [...] Did that change with X86?

   I haven't tried it, but I'd guess not.  Has anyone here actually
tried it (and seen it fail)?  Or is someone _assuming_ that some special
action is required?

> I'd use the VM management tools to just make a copy of the virtual
> disk. [...]

   Of course, the details for that might depend on which VM software
you're using.

   Another possibility (which I also haven't tried): BACKUP /PHYSICAL


Topic author
zeiszler
Member
Posts: 7
Joined: Mon Jul 11, 2022 1:23 pm
Reputation: 0
Status: Offline

Re: VM Backup of system disk

Post by zeiszler » Thu Mar 09, 2023 3:25 pm

VMWare vSphere. This is our first VM testing x86.

used MC SYS$SETBOOT.EXE and will check. Trying to find my old command for dumping the bootblock that shows it is a bootable disk.

Performed a snapshot of the VM. Now need to figure how to setup to boot to other disk.

Didn't try a backup /physical since the disks are thin provisioned and not sure how it will work with that.

We currently don't have backup software that performs a backup of the disks to alternate location. I know I can do snapshot of VM space, but that doesn't allow me to boot and pull specific files or recover; but I think it just puts me back to an older location of right then but the whole system - all data disks too. Not sure since I haven't done snapshots.

Trying to make it so I have another disk in VM I can use as alternate boot if I have issues after installing a patch. Rarely happens, but just in case.

Added in 57 minutes 23 seconds:
I found my old notes for verification of an alpha boot disk. It does not work with Itanium or x86 disk. Just sharing.

disk = "DKA0:"
dump/block=(start:1,count:1) 'disk'[0,0]indexf.sys


sms
Master
Posts: 317
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: VM Backup of system disk

Post by sms » Fri Mar 10, 2023 1:14 am

Code: Select all

> Performed a snapshot of the VM. [...]

   I haven't yet done anything snapshots.

> [...] Now need to figure how to setup to boot to other disk.

> VMWare vSphere. [...]

   I've been playing around with the Mac version, VMware Fusion, and the
non-commercial "Player" edition of that, so I know approximately
nothing, but I thought that I had been controlling the boot device using
the "BOOTMGR> BOOT <device>" command.  Lately, however, selecting a
random disk that way has been doing this:

BOOTMGR> BOOT DKA100
%VMS_BOOTMGR-E-COMMAND,  DKA100 is not a suitable boot device.

   How anything is made "suitable" is beyond my ken, however.

   There's also a (Mac-like) VMware VM:Settings > Setup > Startup Disk
panel, but I'm not sure how that interacts with the BOOTMGR stuff.  It
seems to set the default boot device, and gets around the "not a
suitable boot device" complaint, but for only one device at a time --
Choosing the device at "BOOTMGR> BOOT" is not enough by itself.  (Was it
ever?  I couldn't prove it from my notes.)

   For a good time, I tried booting from the (E9.2) installation disc
(image), and did a BACKUP /IMAGE from the original (36GB) "Hard Disk
(SATA)" (DKA0:) to a (72GB) "Hard Disk 2 (SATA)" (DKA100:).  Aside from
having to revisit the "Startup Disk" panel to select a different boot
device every time, it seemed to work:

V87 $ show devi d

Device                  Device           Error   Volume          Free  Trans Mnt
 Name                   Status           Count    Label         Blocks Count Cnt
V87$DMM0:               Offline              0
V87$DKA0:               Online               0
V87$DKA100:             Mounted              0 VMS092V87     137012816   293   1
V87$DKA200:             Online wrtlck        0
DNFS0:                  Online               0

   Which seems to suggest that BACKUP /IMAGE on a boot disk acts as it
should.

   I thought that I had a tenuous grasp on the IA64 EFI stuff
(SYS$MANAGER:BOOT_OPTIONS.COM), but clearly I don't know enough about
this stuff.  "BOOTMGR> SHELL", for example, seems to restart the
BOOTMGR, rather than showing me anything new and interesting.

> Didn't try a backup /physical since the disks are thin provisioned and
> not sure how it will work with that.

   I'd guess that (virtual) disk I/O is (virtual) disk I/O, so what
could go wrong?  But if /IMAGE works, I'd choose it over /PHYSICAL.

   I did my BACKUP disk-to-disk, but presumably disk-to-save-set would
work as well, and you could send that save set elsewhere using
conventional weapons.


> [...] does not work with Itanium or x86 disk. [...]

> disk = "DKA0:"
> dump/block=(start:1,count:1) 'disk'[0,0]indexf.sys

   Around here, IA64 was a disappointment:

ITS $ dump/block=(start:1,count:1) sys$sysdevice:[0,0]indexf.sys

Dump of file SYS$SYSDEVICE:[0,0]INDEXF.SYS;1 on 10-MAR-2023 00:00:52.54
File ID (1,1,0)   End of file block 1064736 / Allocated 1064736

Virtual block number 1 (00000001), 512 (0200) bytes

 03039401 001E65C0 11C00200 15C600A0 ..Ã...Ã.Ãe...... 000000
 8BDFFF76 905F0000 000501FB 000609F7 S...û....._.v.Ã. 000010
 20202020 2020504D 45540087 80FDFF74 t.ÿ...TEMP       000020
 73206120 746F6E20 73692020 20202020       is not a s 000030
 0000000A 0A0D6B73 6964206D 65747379 ystem disk...... 000040
 [...]

   But on x86_64 it seemed informative:

V87 $ dump/block=(start:1,count:1) sys$sysdevice:[0,0]indexf.sys

Dump of file SYS$SYSDEVICE:[0,0]INDEXF.SYS;1 on  8-SEP-2022 22:32:56.95
File ID (1,1,0)   End of file block 34155 / Allocated 34160

Virtual block number 1 (00000001), 512 (0200) bytes

 206E6120 73692073 69685420 36303030 0006 This is an  000000
 74737973 20363858 20534D56 6E65704F OpenVMS X86 syst 000010
 65736165 6C502020 2E6B7369 64206D65 em disk.  Please 000020
 68742072 65746C61 20746F6E 206F6420  do not alter th 000030
 7261702D 65722072 6F6E2052 424D2065 e MBR nor re-par 000040
 6B736964 20736968 74206E6F 69746974 tition this disk 000050
 7572726F 6320756F 79207473 656C202C , lest you corru 000060
 00000000 00000000 00002E74 69207470 pt it........... 000070
[...]
Last edited by sms on Fri Mar 10, 2023 1:21 am, edited 2 times in total.

User avatar

volkerhalle
Master
Posts: 196
Joined: Fri Aug 14, 2020 11:31 am
Reputation: 0
Status: Offline

Re: VM Backup of system disk

Post by volkerhalle » Fri Mar 10, 2023 8:34 am

On VMware Player version 16:

To enter the UEFI boot manager, type BOOTMGR> EXIT and hit <ESC> a couple of times until the UEFI menue shows up.

You can change the boot order: Enter Setup -> Configure Boot Options -> Change Boot Order

You can also enter the EFI Shell (unsupported).

In the .vmx file, you could add: bios.bootdelay="5000"

This gives you 5 seconds to enter the UEFI boot manager during 'power-up' of the VM - just type <ESC>

Looks like we need to learn another boot environment ;-)

Volker.


sms
Master
Posts: 317
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: VM Backup of system disk

Post by sms » Fri Mar 10, 2023 9:43 am

Code: Select all

> To enter the UEFI boot manager, type BOOTMGR> EXIT and hit <ESC> a
> couple of times until the UEFI menue shows up.

   Ah.  Thanks.  It took a few tries to get in there soon enough.  If I
get really bored, I might try adding some of that delay.

   The first serious annoyance from the lame "terminal" provided seems
to be the lack of a scroll bar, without which it looks pretty painful. 
I did guess that "fs0" must have been in the gone-too-fast-to-read
stuff, and "fs0:", "ls", and "cd" seemed to work.  Could be worse?

   With this non-commercial Fusion Player (Player Version 12.2.5
(20904517)) thing, I had to edit the .vmx file just to get the Telnet
"serial" port configured, so adding a line like that delay shouldn't be
too hard.

   FYI: The Settings > Serial Port panel (now) says:

      This serial port is configured to use:
         Custom unsupported setting

with "Choose a file..." as the only other option.  The relevant
(manually adjusted) stuff in the .vmx file is:

serial0.fileType = "network"
serial0.fileName = "telnet://10.0.0.174:2023"
serial0.present = "TRUE"

> Looks like we need to learn another boot environment ;-)

   Or suffer from ignorance.  I'm not sure which is worse.


tim.stegner
VSI Expert
Valued Contributor
Posts: 55
Joined: Wed Jul 21, 2021 9:14 am
Reputation: 0
Status: Offline

Re: VM Backup of system disk

Post by tim.stegner » Fri Mar 10, 2023 9:46 am

The Boot Manager's Guide for V92* covers all this. BootMGR also has internal help. Remember the Shell> prompt is for the underlying hardware, not OpenVMS nor Boot Manager.


sms
Master
Posts: 317
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: VM Backup of system disk

Post by sms » Sat Mar 11, 2023 10:34 am

Code: Select all

> The Boot Manager's Guide for V92* covers all this. [...]

   Much of it, at least.  Thanks for the reminder.  I believe that I
tried reading that, but that was before I had any relevant hardware or
software, so it didn't stick as well as it might have.

> [...] the lack of a scroll bar, [...]

   The use of Page-Up/Page-Down, explained in section "3.2.5. Page Mode
and Scrolling", is just one of the things I missed/forgot.

   One remaining annoyance is that after a VMS SHUTDOWN, someone does
something which flips a mode on my xterm/Telnet console, so that when
the next BOOT occurs, the lower-case characters are rendered as
line-drawing characters.  An xterm "Do Soft Reset" flips it back to
normal, but the first dozen or so lines of VMS-start messages are tough
to interpret when I forget to do the xterm reset.  Whether that's a Boot
Manager defect, I couldn't say.

Post Reply