Operating System - HP-UX
1829771 Members
6912 Online
109992 Solutions
New Discussion

Why do I need to restart a guest when adding disks?

 
Geoff Wild
Honored Contributor

Why do I need to restart a guest when adding disks?

Why oh why do I have to restart a vm when adding disk?

Seems to happen whenever I go to the next Dev in the Physical storage allocation to a VM.
That is, I can have dev 1, target 0-9, then as soon as I try to add 1 more (dev 2 target 0) - it complains that the guest needs to be restarted.

root@pcvm01 [ /home/gwild ]
# hpvmmodify -P pcvm0101 -F -a disk:scsi::lv:/dev/vgpcvm0101/rlvdisk17

root@pcvm01 [ /home/gwild ]
# hpvmmodify -P pcvm0101 -F -a disk:scsi::lv:/dev/vgpcvm0101/rlvdisk18

root@pcvm01 [ /home/gwild ]
# hpvmmodify -P pcvm0101 -F -a disk:scsi::lv:/dev/vgpcvm0101/rlvdisk19

root@pcvm01 [ /home/gwild ]
# hpvmmodify -P pcvm0101 -F -a disk:scsi::lv:/dev/vgpcvm0101/rlvdisk20
hpvmmodify: Unable to dynamically create device disk:scsi:0,5,0:lv:/dev/vgpcvm0101/rlvdisk20 - No such device.
hpvmmodify: Guest needs to be restarted for all changes to take effect.

root@pcvm01 [ /home/gwild ]
# hpvmmodify -P pcvm0101 -F -a disk:scsi::lv:/dev/vgpcvm0101/rlvdisk21
hpvmmodify: Unable to dynamically create device disk:scsi:0,5,1:lv:/dev/vgpcvm0101/rlvdisk21 - No such device.
hpvmmodify: Guest needs to be restarted for all changes to take effect.

# hpvmmodify -P pcvm0101 -F -a disk:scsi::lv:/dev/vgpcvm0101/rlvdisk22
hpvmmodify: Unable to dynamically create device disk:scsi:0,5,2:lv:/dev/vgpcvm0101/rlvdisk22 - No such device.
hpvmmodify: Guest needs to be restarted for all changes to take effect.


See the id's: 0,5,0 and 0,5,1 and 0,5,2 ??
Now look below, I have 0,1,0-9 and 0,4,0-9:


# hpvmstatus -P pcvm0101 -v
Version A.03.00.00
[Virtual Machine Details]
Virtual Machine Name VM # OS Type State ==================== ===== ======= ========
pcvm0101 1 HPUX On (OS)

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

[Virtual CPU Details]
#vCPUs Entitlement Maximum
====== =========== =======
4 20.0% 100.0%

[Memory Details]
Total Reserved
Memory Memory
======= ========
16 GB 64 MB

[Dynamic Memory Information]
Minimum Target Maximum
Memory Memory Memory
=========== =========== ===========
512 MB 16375 MB 16384 MB

[Storage Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
disk scsi 0 1 0 0 0 lv /dev/vgpcvm0101/rlvdisk1
disk scsi 0 1 0 1 0 lv /dev/vgpcvm0101/rlvdisk2
disk scsi 0 1 0 2 0 lv /dev/vgpcvm0101/rlvdisk3
disk scsi 0 1 0 3 0 disk /dev/rdsk/c3t4d2
disk scsi 0 1 0 4 0 lv /dev/vgpcvm0101/rlvdisk4
disk scsi 0 1 0 5 0 lv /dev/vgpcvm0101/rlvdisk6
disk scsi 0 1 0 6 0 lv /dev/vgpcvm0101/rlvdisk5
disk scsi 0 1 0 7 0 lv /dev/vgpcvm0101/rlvdisk7
disk scsi 0 1 0 8 0 lv /dev/vgpcvm0101/rlvdisk8
disk scsi 0 1 0 9 0 lv /dev/vgpcvm0101/rlvdisk9
disk scsi 0 4 0 0 0 lv /dev/vgpcvm0101/rlvdisk10
disk scsi 0 4 0 1 0 lv /dev/vgpcvm0101/rlvdisk11
disk scsi 0 4 0 2 0 lv /dev/vgpcvm0101/rlvdisk12
disk scsi 0 4 0 3 0 lv /dev/vgpcvm0101/rlvdisk13
disk scsi 0 4 0 4 0 lv /dev/vgpcvm0101/rlvdisk14
disk scsi 0 4 0 5 0 lv /dev/vgpcvm0101/rlvdisk15
disk scsi 0 4 0 6 0 lv /dev/vgpcvm0101/rlvdisk16
disk scsi 0 4 0 7 0 lv /dev/vgpcvm0101/rlvdisk17
disk scsi 0 4 0 8 0 lv /dev/vgpcvm0101/rlvdisk18
disk scsi 0 4 0 9 0 lv /dev/vgpcvm0101/rlvdisk19

[Network Interface Details]
Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address
========= ========== ========== ======= === === === =================
vswitch lan vsw0 1 0 0 0 da-08-5b-b0-ea-1f
vswitch lan vsw2 1 0 2 0 f6-f1-92-74-d8-09

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



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
4 REPLIES 4
Rita C Workman
Honored Contributor

Re: Why do I need to restart a guest when adding disks?

...cause that's what ya gotta do...


And I'm with you!

Rgrds,
Rita
Eric SAUBIGNAC
Honored Contributor

Re: Why do I need to restart a guest when adding disks?

Bonsoir Geoff,

You can add online a new disk as soon as it will be attached to an EXISTING ext_bus into the VM.

If a new ext_bus must be created to handle a new disk, it will be effective only at next reboot. I guess you had the same trouble when you have added /dev/vgpcvm0101/rlvdisk10.

I can't remember where, but I think it is written somewhere in documentations. But it is a bit late here, I am too lazy to find it for you ;-)

Regards

Eric
Tim Nelson
Honored Contributor

Re: Why do I need to restart a guest when adding disks?

The virtual ain't so virtual :)

I agree that it is a pain but glad you posted this, I would have ran into this eventually.

A good gotcha would be to present less larger devices than many smaller ones ?

Geoff Wild
Honored Contributor

Re: Why do I need to restart a guest when adding disks?

Received the following from HP as a work around:

Yes, basically we can't dynamically create a virtual _controller_. The latter is defined by the first two #s in the devices, bus,dev,target triple. So, in the example above, there is a virtual controller (0,4).

So, HPVM 3.0 and previous actually support 15 devices per virtual controller. But we prevent default access to 10-15 (probably a little to aggressively) so that one has at least 5 slots available for dynamic addition (per virtual controller). To get at these remaining 5, you have to explicitly identify them.

So, in the example below, the dynamic addition:
# hpvmmodify -P pcvm0101 \
-a disk:scsi:0,4,10:lv:/dev/vgpcvm0101/rlvdisk17

should work. Now, you'll eventually hit the "wall" at 0,4,15 and will have to reboot to add any more after that. But at least you will get to add 5 more with the above information.

To "plan ahead," one can explicitly create the first two or three storage devices so that virtual controllers are established. For example,

hpvmcreate -P myvm \
-a disk:scsi:0,4,0:lv: \
-a disk:scsi:0,5,0:lv:<2nd path> \
-a disk:scsi:0,6,0:lv:<3rd path>

That will create 3 controllers, allowing for up to 45 total virtual storage devices.



Rgds....Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.