this is obsolete doc -- see http://doc.nethence.com/ instead
HPVM (Integrity VM) administration
Prepare
Create a vswitch and start it,
hpvmnet -c -S vswitch1 -n 0
hpvmnet -b -S vswitch1
note. '-n 0' for 'lan0'
check,
hpvmnet
Prepare the Virtual FileDVDs,
lvcreate -n data -L 100000 vg00
mkfs -F vxfs -o largefiles /dev/vg00/data
mkdir -p /data
vi /etc/fstab
mount /data
cd /data
ioscan -fnC disk
put DVD1 in the tray and make the ISO,
dd if=/dev/.../rdsk/... of=baseoe1.iso bs=4096k
then DVD2,
dd if=/dev/.../rdsk/... of=baseoe2.iso bs=4096k
Create a VM guest and install HP/UX
Create an LV and a VM on top of it,
lvcreate -n guest2 -L 25000 vgvm
hpvmcreate -P guest2 -O HPUX -c 1 -r 2G \
-a disk:scsi::lv:/dev/vgvm/rguest2 \
-a network:avio_lan::vswitch:vswitch1
Note. CPUs : 1
Note. RAM: 2GB
Note. vdisk1: guest2 ('disk:scsi:' for the VM guest, ':lv:' for the VM host)
Note. vlan0 connected to vswitch 1 which is connected to VM host's lan0
Provide DVD1 iso image as Virtual FileDVD for the installation,
hpvmmodify -P guest2 -a dvd:scsi::file:/data/baseoe1.iso
Note. otherwise use Virtual DVD : dvd:scsi::disk:/dev/.../rdsk/...
Start the guest and go to its console,
hpvmstart -P guest2
hpvmconsole guest2
Note. you can also get to vMP and start the guest from there
Inside the guest (boots from the CDROM by default),
#Boot from a file > CDROM > INSTALL.EFI
Once the second DVD is asked,
hpvmmodify -P guest2 -d dvd:scsi::file:/data/baseoe1.iso
hpvmmodify -P guest2 -a dvd:scsi::file:/data/baseoe2.iso
When the installation has finished, remove the virtual CD/DVD player,
hpvmmodify -P guest2 -d dvd:scsi::file:/data/baseoe2.iso
Maintainance
Start a guest and get to its console,
hpvmstart -P guest2
hpvmconsole -P guest2
Note. you can also get to vMP and start the guest from there
Check for connected disks and dvds (KSH),
guests=`hpvmstatus | sed '1,3d' | awk '{print $1}'`
for guest in $guests; do
print $guest
hpvmstatus -P $guest -v | grep scsi
done
unset guests
Modify a guest,
hpvmmodify -P guest2 -c 1 -r 2G
Stop a guest,
hpvmstop -P guest2
Shutdown all VMs,
hpvmstop -a -F
Completely delete a guest,
hpvmremove -P guest2
lvremove /dev/vgvm/guest2
hpvmstatus -v -P guest3
Advanced maintainance
Check for disks and clone a VM guest,
hpvmstatus -P guest2 -v | grep scsi
hpvmstop -P guest2
hpvmclone -P guest2 -N guest3 -d disk:scsi::lv:/dev/vgvm/rguest2
size=`lvdisplay /dev/vgvm/guest2 | grep 'LV Size' | awk '{print $4}'`
lvcreate -n guest3 -L $size vgvm
unset size
time dd if=/dev/vgvm/rguest2 of=/dev/vgvm/rguest3 bs=4096k
hpvmmodify -P guest3 -a disk:scsi::lv:/dev/vgvm/rguest3
Best is to use a template VM guest to clone from. But if you cloned from a production VM, you need to change the hostname and IP before the network starts. Start the VM in single user mode,
hpvmstart -P guest4
hpvmconsole guest4
^B
co
HP-UX Primary Boot
boot -is
cd /etc/rc.config.d
vi netconf
change,
IP_ADDRESS[0]="172.17.200.7"
switch to init 3,
sync
init 3
Relocate a VM guest from vg00 to vgvm,
hpvmstop -P guest2
hpvmmodify -P guest2 -d disk:scsi::lv:/dev/vg00/rguest2
size=`lvdisplay /dev/vg00/guest2 | grep 'LV Size' | awk '{print $4}'`
lvcreate -n guest2 -L $size vgvm
unset size
time dd if=/dev/vg00/rguest2 of=/dev/vgvm/rguest2 bs=4094k
hpvmmodify -P guest2 -a disk:scsi::lv:/dev/vgvm/rguest2
hpvmstart -p guest2
# check the VM guest still works
lvremove /dev/vg00/guest2
Extend the size of an LV,
lvextend -L 30000 /dev/vgvm/guest2