Are you allowed to use the same vswitch for 2 separate HPVMs?

Can you use the same vswitch for multiple HPVMs?

The reason I ask is because I created a vswitch and assigned it to one hpvm, and I was able to get it on the network. Then I created a second hpvm and used the same vswitch, and I am able to ssh/sftp TO the second hpvm, but I am unable to ping OUT of the second hpvm. I am unable to ping the default gateway or any other IP address (including the DNS server) and nslookup fails.

The two hpvms are on the same subnet as my host machine, all 10.25.112.x. I thought maybe I have to create a new vswitch, so I did this:

[root@hpit: /]# hpvmnet -c -S vmsw2 -n 0
[root@hpit: /]# hpvmnet
Name                  Number State   Mode      NamePPA MAC Address    IPv4 Address
===================== ====== ======= ========= ======= ============== ===============
localnet                   1 Up      Shared            N/A            N/A       
vmsw1                      2 Up      Shared    lan0    0x001cc4fc74ff 10.25.112.122
vmsw2                      4 Down    Shared    lan0                   10.25.112.122
[root@hpit: /]# hpvmmodify -P vm-hpit02 -a network:avio_lan::vswitch:vmsw2               
    vPar/VM vm-hpit02 configuration problems:
    Warning 1 on item vmsw2: Vswitch 'vmsw2' is not active.
These problems may prevent the vPar or VM vm-hpit02 from starting.
[root@hpit: /]# hpvmnet -b -S vmsw2
hpvmnet: WARNING (host): Unable to start vswitch 'vmsw2'.  Lan in use.
hpvmnet: Unable to start the vswitch.
hpvmnet: Unable to continue.

It says Lan in use so I am assuming I cannot have the same lan0 device assigned to two separate vswitches? :confused:

You can use same vswitch for multiple virtual machines.
So, one physical interface (or multiple aggregated interfaces in one) -> one vswitch -> multiple VM's.

I suspect that the network is not configured properly on VM that is not working.
Check route table netstat -rn , and if also check if DNS is working properly (resolv.conf, nsswitch.conf)

Also for network presistence configure the /etc/rc.config.d/netconf with address and gateway on the VM in question or use sam / smh for the same.

Hope that helps, if not, i can offer some additional support when i come back from vacation :wink: in about 10 days.

Ahh okay, thank you.

I checked recolv.conf and it seems to be correct, however I noticed that while my non-working VM has a nsswitch.conf file, my working VM does not.

[root@vm-hpit01: /etc]# ls ns*
nsswitch.compat       nsswitch.hp_defaults  nsswitch.nis
nsswitch.files        nsswitch.ldap

I compared the two /etc/rc.config.d/netconf files and they seem to be the same (aside from hostname/IP) except my non-working VM has

DEFAULT_INTERFACE_MODULES="pfil "

while my working VM does not have a value for DEFAULT_INTERFACE_MODULES.
My netstat -rn returns similar tables for both VMs.
Working VM:

[root@vm-hpit01: /etc]# netstat -rn
Routing tables
Destination           Gateway            Flags Refs Interface  Pmtu
127.0.0.1             127.0.0.1          UH    0    lo0       32808
10.25.112.16          10.25.112.16       UH    0    lan0      32808
10.25.112.0           10.25.112.16       U     2    lan0       1500
127.0.0.0             127.0.0.1          U     0    lo0       32808
default               10.25.112.1        UG    0    lan0       1500

Non-working VM:

# netstat -rn
Routing tables
Destination           Gateway            Flags Refs Interface  Pmtu
127.0.0.1             127.0.0.1          UH    0    lo0       32808
10.25.112.17          10.25.112.17       UH    0    lan0      32808
10.25.112.0           10.25.112.17       U     2    lan0       1500
127.0.0.0             127.0.0.1          U     0    lo0       32808
default               10.25.112.1        UG    0    lan0       1500

Non working:

# ping 10.25.112.1 <-default gateway
PING 10.25.112.1: 64 byte packets

----10.25.112.1 PING Statistics----
2 packets transmitted, 0 packets received, 100% packet loss
# ping 10.6.254.4 <- dns server
PING 10.6.254.4: 64 byte packets

----10.6.254.4 PING Statistics----
3 packets transmitted, 0 packets received, 100% packet loss
#

I guess I just set up the network incorrectly, I just have to figure out where...

Are you running IPfiler perhaps ?
Output of ipf -V and cat /etc/opt/ipf/ipf.conf non working VM host should tell you that.

If you get output that it's on and blocking, that could be your issue, then you need to disable your firewall or configure it per your needs.

Hope that helps.
Regards
Peasant.

I'm curious to see the solution here, as I have the exact same problem. I have four VM's, all on the same vSwitch. Two of them can reach the gateway, the other two cannot. The two that cannot can ping other machines on the same vSwitch, but nothing outside of the vSwitch.

I've compared netconf, netstat -rn, hosts, nsswitch.conf, ipf is disabled, no vlan tagging, no apa, no serviceguard. All are identical as far as I can see, except for hostname and IP address.

I'm stumped. :frowning:

Oh my goodness thank you so much. I don't even know what IPfilter is but I must have accidentally enabled it during the network setup. After I disabled it I am now able to ping and ssh to other hosts from within my second VM.

Now it appears that I have but one small problem left: my nslookup commands seem to be failing, even though I can ping/ssh by hostname now:

# ping ibm7
PING ibm7.domain.lab: 64 byte packets
64 bytes from 10.25.112.120: icmp_seq=0. time=0. ms
64 bytes from 10.25.112.120: icmp_seq=1. time=0. ms

----ibm7.domain.lab PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 0/0/0
# nslookup ibm7
Using /etc/hosts on:  vm-hpit02

looking up FILES
*** No address information is available for "ibm7"
# nslookup
Using /etc/hosts on:  vm-hpit02

> ibm7
Using /etc/hosts on:  vm-hpit02

looking up FILES
*** No address information is available for "ibm7"
>

This also happens when I enter the FQDN. Some part of my DNS must be set up properly because I can ping/ssh by name, but I'm unsure what is causing my nslookup to fail.

Check /etc/resolv.conf for proper DNS server(s) and /etc/nsswitch.conf entry hosts if you want to also resolve using files (/etc/hosts) and dns.

Hope that helps
Regards
Peasant.

Thank you Peasant. I noticed my first VM did not even have an nsswitch.conf file so I deleted it from my second VM and my nslookup commands are now working properly :slight_smile:

So I ended up opening an HP support case. The problem turned out to be a product flaw. Nothing wrong at all with my config. I was running HP-VM version 4.20 which according to HP support, is buggy.

They recommended either upgrading to 4.30 and installing a bunch of patches on top of that, OR upgrading to the latest 6.x version.

The upgrade resolved the problem.