[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Disable networking for suspended VM before starting it

Posted on 2009-12-16
8
Medium Priority
?
1,041 Views
Last Modified: 2013-12-06
Hello,

I have a SCO OpenServer 5.0.7 server running as a guest OS under VMware Server 1.0.10.  There are no vmware-tools for SCO 5 (except for the "V versions," which I do not have).  The host system is running CentOS 5.4

Every night, I have a perl script that suspends the VM and copies the VM files to a backup / test server and then starts up the VM again on the live server.

The problem is that I need a way to start up the suspended VM on the backup / test server without interfering with the live server.  Since they both have the same IP address, I cannot just start up the VM on the backup server, and, since the VM is suspended, I cannot change from Bridged to Host-only networking.

I am considering using IPTables on the host to accomplish this by blocking all in- and outgoing traffic to the IP of the VM, but I am not sure if this will prevent the VM from responding to ARP requests, etc.  

Preferably, I would like to turn off all networking for the VM  using vmware-cmd or similar, but I am not very knowledgeable in VMware.

Any help on this would be greatly appreciated.

Thanks,
Lars
0
Comment
Question by:Lars007
  • 6
  • 2
8 Comments
 
LVL 27

Expert Comment

by:Tolomir
ID: 26064557
take a look at this:

Clone Virtual Machine with VMware Server 2.0
http://communities.vmware.com/message/1311110#1311110
0
 
LVL 27

Expert Comment

by:Tolomir
ID: 26064577
so basically you clone the machine to make sure you don't have 2 virtual machines with the same id.

of cause you have to change the ip, dns name etc. But this is nothing vmware related.
0
 
LVL 27

Expert Comment

by:Tolomir
ID: 26064595
since you clone the machine you CAN change the network to host only.
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 27

Expert Comment

by:Tolomir
ID: 26064624
you cannot change network settings for a suspended machine, it's like changing the motor in a driving car (while the driver sleeps ;-)
0
 

Author Comment

by:Lars007
ID: 26064975
Tolomir,

I looked at the post you referred to, but it did not answer my question.  

Obviously I would have to change the IP, etc. of the VM to use it on the network, but since there are no vmware tools for SCO, there is no way to automate this.  And the moment I start the VM on the backup host, I will have an IP conflict before I have a chance to change the IP.

The backup itself is working great.  All that remains is to solve this last issue of starting up the suspended VM without network access.  It may or may not be doable within VMware - it might have to be done via IPTables or similar.  Basically, I would like to "pull the virtual network cable" on the VM before starting it up.  This means I will only be able to run it via the VMware Server Console or similar, but this is ok.

Again, help on this would be appreciated.

Lars

0
 
LVL 27

Accepted Solution

by:
Tolomir earned 2000 total points
ID: 26065616
ok check the vmx file of the backup.

scroll down to:

# First network interface card
ethernet0.present = "TRUE"
ethernet0.virtualDev = "vlance"
ethernet0.connectionType = "nat"
ethernet0.addressType = "generated"
ethernet0.generatedAddressOffset = "0"

---

change

ethernet0.present = "FALSE"

---

this should unplug the network cable.
0
 
LVL 27

Expert Comment

by:Tolomir
ID: 26065620
safe the file and bootup the suspended machine.
0
 

Author Comment

by:Lars007
ID: 26067188
Tolomir,

That did it!  And it can easily be scripted as a find and replace.

Thanks for your help,
Lars
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question