Operating System - HP-UX
1833780 Members
2390 Online
110063 Solutions
New Discussion

Virtual Machine 3.50 Sharing tape devices with a guest

 
SOLVED
Go to solution
Mike Bray
Advisor

Virtual Machine 3.50 Sharing tape devices with a guest

This has been quite a joy trying to figure it all out. I have finally reached a point where using "hpvmmodify" I have been able to add a tape device from our host server (an RX6600) to a virtual guest. At least what the master VM host is telling me via "hpvmstatus" commands. I believe the reason the virtual guest is not still seeing the tape device is due to it not being "shared" on the host side. I've tried to make it "shared" with similiar commands I used to make the DVD device sharable among multiple guests.

Here is the error I am getting when trying to do this for the tape device. Sounds like the Host Server (RX6600) can't have it seen as "claimed" maybe? If so any ideas? I have HP working on this too for past day but I'm already ahead of where they are at in terms of at least finding "hpvmmodify" commands to add the tape device to our guest server. This is VM 3.50 and 11.23v2 OS for both the Host server and Guest.

# hpvmdevmgmt -m gdev:/dev/rscsi/c3t3d0:attr:SHARE=YES
hpvmdevmgmt: ERROR (host): ATTACHED I/O devices cannot be shared.
Failed to modify device '/dev/rscsi/c3t3d0' attribute 'SHARE' to value 'YES'.
Invalid argument
hpvmdevmgmt: Unable to continue.

Here is how I added the tape device for those who may need to know how to do it down the road. The strange thing is I had to bounce the virtual guest in order for the host server to have it add the device. Very strange but it worked. I didn't have to do this for the DVD device or lan card.

# hpvmstatus -P rigelvm
[Virtual Machine Details]
Virtual Machine Name VM # OS Type State
==================== ===== ======= ========
rigelvm 1 HPUX On (OS)

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

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

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

[Storage Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
disk scsi 0 1 0 0 0 disk /dev/rdsk/c5t0d1
disk scsi 0 1 0 1 0 disk /dev/rdsk/c5t0d2
dvd scsi 0 1 0 2 0 disk /dev/rdsk/c1t1d0
tape scsi 0 1 0 3 0 attach /dev/rscsi/c3t3d0

[Network Interface Details]
Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address
========= ========== ========== ======= === === === =================
vswitch lan rigelvm 1 0 0 0 ce-4b-36-7a-69-0c

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

Re: Virtual Machine 3.50 Sharing tape devices with a guest

Sorry here is command to add tape device form the host server to your virtual guest. Keep in mind you have to "transfer" the /dev/rmt/c3t3d0BESTn device names to one it understands. ie, SCTL /dev/rscsi/c3t3d0

#hpvmmodify -P rigelvm â a tape:scsi::attach:/dev/rscsi/c3t3d0
# hpvmstop -P rigelvm
hpvmstop: Stop the virtual machine 'rigelvm'? [n/y]: y
# hpvmstatus -P rigelvm
#hpvmstart -P rigelvm
Torsten.
Acclaimed Contributor

Re: Virtual Machine 3.50 Sharing tape devices with a guest

I don't know the meaning of your second post, but a tape drive cannot be shared between guests.
"Sharing" is always used in combination with at least 2 guests - not the host and a guest.

If your guest does not "see" the tape, it probably see an unknown device (the tape drive), because the driver is missing.

You can do a

# kcmodule stape=static

and reboot to include this module into the kernel.

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!   
Mike Bray
Advisor

Re: Virtual Machine 3.50 Sharing tape devices with a guest

Second post was just for anybody trying to figure out how to add a tape device.

I guess I'm way confused here. You can share something like a DVD drive on the host and any virtual guest but not a tape device? I'd like to cut an ignite tape and possibly some fbackups of my new virual guest prior to something happening to it and having to start over. I know cutting an image to a disk partition or possibly a DVD is an option but would think you could cut to a tape device. Also if you have mulitple guests would think you could share a tape device just like you can share the DVD?

Thanks for any info by the way. Greatly appreciated.
Torsten.
Acclaimed Contributor

Re: Virtual Machine 3.50 Sharing tape devices with a guest

A DVD drive is a read-only device, so sharing is not a problem. Since a tape is supposed to be a "writable" device, the situation is different.
You can delete the device from a guest and assign it to another - doing this the device belongs to only 1 guest at a time.

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!   
Eric SAUBIGNAC
Honored Contributor

Re: Virtual Machine 3.50 Sharing tape devices with a guest

Bonjour Mike,


no many more things to add to Torsten's answer : for the moment, you can't share a tape device between two active guests.

For the moment or definitively ? Torsten said < Since a tape is supposed to be a "writable" device, the situation is different.> Yes, but in a SAN environment, tape libraries are often shared. But there is an arbitrator, for example data protector, that controls that just one host at a time accesses a given drive. So we could imagine that in the future we will be able to "share" tapes. Why not ? Yes but for the moment it is not possible :-(

Mike said
It's not mandatory to reboot a VM when you add a virtual device. An ioscan/insf is sufficient if you present the device on an existing virtual Bus/Device interface. That is, one virtual device must already exists on the same Device/Bus on which the virtual device wil be attached. In the configuration you have described, that means it's better to give Bus,Device,Target informations in the hpvmmodify command to be sure of the Device/Bus that will be assign to the virtual device :

hpvmmodify -P rigelvm -a tape:scsi:0,1,X:attach:/dev/rscsi/c3t3d0

X is the target SCSI ID of the virtual device, from 0 to 14.

Mike said
I strongly suggest that you forget ignite tapes. I you have at least two physical servers it's a more comfortable and reliable process to work with ignite servers than with tapes : no more tape manipulations, you can schedule an ignite backup, restoring from an ignite server in a local network is easy and faster than with tapes, ... Two ignite servers is to achieve cross backup : you lose server 1, then you can restore from server 2. And conversely.

Hope this will help

Regards

Eric
Mike Bray
Advisor

Re: Virtual Machine 3.50 Sharing tape devices with a guest

We'll thanks guys for the information but doesn't help me with initial issue. Good information on the "not sharing among guests" thanks. However, I can't even get one virtual guest to see the tape device I presented to it from the host? I thought maybe it needs to be shared and unable to get that command to work as well as shown above.

I only have one physical server so need to figure out a way to get ignite tapes to work. I'm opening a ticket with HP and told might be some sort of work around. If I find a way will post it out here. Thanks for the help thus far guys. =)
Torsten.
Acclaimed Contributor
Solution

Re: Virtual Machine 3.50 Sharing tape devices with a guest

"However, I can't even get one virtual guest to see the tape device I presented to it from the host"

Really? Do you have an UNKNOWN device?
If there was no tape drive present during installation, the driver is not configured.

To do this, run

kcmodule stape=static

on the guest and reboot.

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!   
Eric SAUBIGNAC
Honored Contributor

Re: Virtual Machine 3.50 Sharing tape devices with a guest

Mike,

.

Have you created pass through devices with "hpvmdevmgmt -I" command ? Are you sure that c3t3d0 is the right device ? Can you access the tape from the Host ?



You can have VM guests that make ignite image to the Host configured as an Ignite server. In this case, the Host, and only the host, will need to ignite to tapes.

Note : when you make an ignite image from an ignite server (to a tape or an other iognite server), you should exclude the directory /var/opt/ignite/recovery/archives as it will grow without reason the ignite image itself. It is better to have this directory included in the centralized backup strategy.

Regards

Eric
Mike Bray
Advisor

Re: Virtual Machine 3.50 Sharing tape devices with a guest

EXCELLENT THANK YOU!!!! THis worked.

Yes I can see and use tape device on the host: Here is from the host:

# ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 0 0/6/1/0.3.0 stape CLAIMED DEVICE HP C7438A
/dev/rmt/0m /dev/rmt/c3t3d0BESTn
/dev/rmt/0mb /dev/rmt/c3t3d0BESTnb
/dev/rmt/0mn /dev/rmt/c3t3d0DDS
/dev/rmt/0mnb /dev/rmt/c3t3d0DDSb
/dev/rmt/c3t3d0BEST /dev/rmt/c3t3d0DDSn
/dev/rmt/c3t3d0BESTb /dev/rmt/c3t3d0DDSnb


From the Guest:

# ioscan -fnC tape
# kcmodule stape=static
NOTE: The configuration being loaded contains the following change(s)
that cannot be applied immediately and which will be held for
the next boot:
-- The configuration is supposed to include a module 'stape' which
is not available without a kernel rebuild.
WARNING: The automatic 'backup' configuration currently contains the
configuration that was in use before the last reboot of this
system.
==> Do you wish to update it to contain the current configuration
before making the requested change? y
* The automatic 'backup' configuration has been updated.
* Building a new kernel for configuration 'nextboot'...
* Adding version information to new kernel...
* The requested changes have been saved, and will take effect at
next boot.
Module State Cause
stape (now) unused
(next boot) static explicit
# shutdown -r now

# ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
tape 0 0/0/1/0.3.0 stape CLAIMED DEVICE HP C7438A
/dev/rmt/0m /dev/rmt/c0t3d0BESTn
/dev/rmt/0mb /dev/rmt/c0t3d0BESTnb
/dev/rmt/0mn /dev/rmt/c0t3d0DDS
/dev/rmt/0mnb /dev/rmt/c0t3d0DDSb
/dev/rmt/c0t3d0BEST /dev/rmt/c0t3d0DDSn
/dev/rmt/c0t3d0BESTb /dev/rmt/c0t3d0DDSnb
Torsten.
Acclaimed Contributor

Re: Virtual Machine 3.50 Sharing tape devices with a guest

Problem solved so far?

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!   
Mike Bray
Advisor

Re: Virtual Machine 3.50 Sharing tape devices with a guest

Yep I just cut an ignite backup and will check on creating an Virtual Guest that could be an Ignite Server for us to handle multiple guests needing Ignite images done.