Friday 30 September 2011

Vmware: “SIOCSIFADDR: No such device eth0″ after cloning

After copying my virtual machine and rebooting it and choosing answer to question 'I_copied it'

there is a problem with the network device "SIOCSIFADDR: No such device eth0″


There is a file 70-persistent-net.rules.

The 70-persistent-net.rules file has contents similar to:


# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:50:xx:xx", ATTR{type}=="1", NAME="eth0"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:36:xx:xx", ATTR{type}=="1", NAME="eth1"


This can be edited and the eth1 line removed.


But since this seems to only work sometimes it seems easier to just rename the file or delete it as it seems to get regenerated on a reboot:


# Ubuntu 
sudo mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.old

More on this here (google results):
http://preview.tinyurl.com/6xdpq4t

Friday 5 August 2011

Remote desktop X server linux using Cygwin

x -query [server ipaddress] :1 -from [myipaddress]

Also it seems that I need an entry for the client I am connecting from in the hosts file on the xwindows server.

I never used to need the -from switch... but I seem to now.


ALSO

change the window size:
x -query [server ipaddress] :1 -from [myipaddress] -screen 0 1024x768

some stuff here:
http://jamesmcdonald.id.au/faqs/mine/coLinux/coLinuxXDMVNC.html

Friday 29 July 2011

Copy vmware virtual machines

This works for copying virtual machines.

All this whilst virtual machine is powered off.

*Note: Create the folder that you are copying to, via \\uncpath of the NAS if you want to have correct rights to copy stuff off after. If created through ssh in vmware it will be hard work to copy off files later.

vmkfstools -i /vmfs/volumes/datastore/centOS/centOS.vmdk
 /vmfs/volumes/esxdatastore/centOS/centOS.vmdk

Repeat with other .vmdk files. e.g. centOS-000001.vmdk

The copying of the centOS.vmdk file copies the centOS-flat.vmdk also, so no need to try copying the centOS-flat.vmdk files themselves.

Then copy rest of files with 'cp'

Moving folders off NAS; make sure permissions are correct. User = vi-admin group = users, mode = 777. This is accomplished by creating the folder through the samba share in windows i.e \\uncpath-to-share on the NAS

NOTE:- Recently I had issues creating user vi-admin, I noticed the directory had a different user nfsnobod.  I then later realised that the 777 permissions were the permissions needed for the DIRECTORY not the files in the directory. Which as mentioned below should be 644. I was getting mixed up changing the files to 777.

NOTE ABOUT NOTE:- More will be revealed.... I seemingly had to change all the file permissions to 777 (which made them disappear from browsing samba) back to 644. Ok maybe they weren't 644 to begin with so in essence I just changed them to 644... errr... anyway..

Also make sure all files in folder -rw-r--r-- thats 644. http://www.draac.com/chmodchart.html


I tested the backup was successful by removing current vm from inventory and adding the one on the remote datastore to the inventory. Sometimes this was an issue like this error: "The Specified Key, Name, or Identifier Already Exists" http://communities.vmware.com/thread/79339

this was resolved by restarting management agents, I did this on the physical server, as the service command was not found, probably easy to find but couldnt be bothered at the time.

This then led onto the network card being sorted before it worked, see my other post: SIOCSIFADDR: No such device eth0



Wednesday 20 July 2011

Windows 7 control userpasswords2

What happened to control userpasswords2?

•WinKey+R > control userpasswords2
•Start > Search > netplwiz

Tuesday 19 July 2011

Using SystemRescueCd and truecrypt from command line

This link http://m2otech.com/linux/7-troubleshooting/21-mount-ntfs-truecrypt-volume-readwrite-with-ntfs-3g

Mentions:

There are two popular ways to mount NTFS volumes on Linux systems. One is ntfsprogs, the other is ntfs-3g. They both offer similar functionality with read/write access to NTFS volumes.

If you use ntfs-3g mounting a TrueCrypt volume which is formatted as NTFS will not be done read/write by default. Only read access will be provided when mounting through the graphical interface. Solve the problem is by using command line option --filesystem to explicitly call ntfs-3g mounting option.

For example mount TrueCrypt volume /dev/sdb1 to /media/truecrypt1 will be done as follows:

truecrypt --mount /dev/sdb1 /media/truecrypt1 --filesystem=ntfs-3g

(Note that the mounting point /media/truecrypt1 must exist)

To unmount a TrueCrypt volume from command line use the --dismount or -d option:

truecrypt -d /dev/sdb1

or

truecrypt -d
but..... for me this didn't work, I also had to read this:

http://forums.debian.net/viewtopic.php?f=10&t=57474

which mentioned :

truecrypt -t -k "" --password=MYPASSWORD --protect-hidden=no
/dev/sda1 /media/truecrypt1
and more importantly:

--mount-options=system
so I ended up using this command:

truecrypt --mount /dev/sda2 /mnt/windows --filesystem=ntfs-3g
--mount-options=system

Which worked for me. The above lines have been written on 2 lines
so they don't trail off into my twitter feed on the right.

Whats happened to word wrap.

and why does IE squash all my lines together and firefox looks ok?

:)

Friday 15 July 2011

sDelete is good

sDelete util

sdelete –p 3 –z C:

Prob dont want to do it on the c: drive but good for cleaning up old HDDs

Dirk likes it.





Friday 8 July 2011

mediawikki migration nightmare

I can migrate joomla fine. move files, export import mysql db

But mediawiki is proving to be real hard work.

Bollox to the poll tax is what i say

Tuesday 5 July 2011

linux copy retaining permissions

Building my mediawiki on 2 different servers, or should I say replicating from one server to another.


The command is
cp -r --preserve /source_dir /destin_dir

Here -r for copy all inner sub directory, and --preserve for retain the exact file permission.
I will try this tommoz at work.

Monday 4 July 2011

Robocopied....zzzzz

Robocopy taking a long time today. Seems that the Local Settings has a lot in it.
Spend my time looking at these Vmware appliances they look pretty useful...